:doc:`EC2 <../../ec2>` / Client / enable_fast_launch

******************
enable_fast_launch
******************



.. py:method:: EC2.Client.enable_fast_launch(**kwargs)

  

  When you enable Windows fast launch for a Windows AMI, images are pre-provisioned, using snapshots to launch instances up to 65% faster. To create the optimized Windows image, Amazon EC2 launches an instance and runs through Sysprep steps, rebooting as required. Then it creates a set of reserved snapshots that are used for subsequent launches. The reserved snapshots are automatically replenished as they are used, depending on your settings for launch frequency.

   

  .. note::

    

    You can only change these settings for Windows AMIs that you own or that have been shared with you.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableFastLaunch>`_  


  **Request Syntax**
  ::

    response = client.enable_fast_launch(
        ImageId='string',
        ResourceType='string',
        SnapshotConfiguration={
            'TargetResourceCount': 123
        },
        LaunchTemplate={
            'LaunchTemplateId': 'string',
            'LaunchTemplateName': 'string',
            'Version': 'string'
        },
        MaxParallelLaunches=123,
        DryRun=True|False
    )
    
  :type ImageId: string
  :param ImageId: **[REQUIRED]** 

    Specify the ID of the image for which to enable Windows fast launch.

    

  
  :type ResourceType: string
  :param ResourceType: 

    The type of resource to use for pre-provisioning the AMI for Windows fast launch. Supported values include: ``snapshot``, which is the default value.

    

  
  :type SnapshotConfiguration: dict
  :param SnapshotConfiguration: 

    Configuration settings for creating and managing the snapshots that are used for pre-provisioning the AMI for Windows fast launch. The associated ``ResourceType`` must be ``snapshot``.

    

  
    - **TargetResourceCount** *(integer) --* 

      The number of pre-provisioned snapshots to keep on hand for a Windows fast launch enabled AMI.

      

    
  
  :type LaunchTemplate: dict
  :param LaunchTemplate: 

    The launch template to use when launching Windows instances from pre-provisioned snapshots. Launch template parameters can include either the name or ID of the launch template, but not both.

    

  
    - **LaunchTemplateId** *(string) --* 

      Specify the ID of the launch template that the AMI should use for Windows fast launch.

      

    
    - **LaunchTemplateName** *(string) --* 

      Specify the name of the launch template that the AMI should use for Windows fast launch.

      

    
    - **Version** *(string) --* **[REQUIRED]** 

      Specify the version of the launch template that the AMI should use for Windows fast launch.

      

    
  
  :type MaxParallelLaunches: integer
  :param MaxParallelLaunches: 

    The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned snapshots for Windows fast launch. Value must be ``6`` or greater.

    

  
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ImageId': 'string',
          'ResourceType': 'snapshot',
          'SnapshotConfiguration': {
              'TargetResourceCount': 123
          },
          'LaunchTemplate': {
              'LaunchTemplateId': 'string',
              'LaunchTemplateName': 'string',
              'Version': 'string'
          },
          'MaxParallelLaunches': 123,
          'OwnerId': 'string',
          'State': 'enabling'|'enabling-failed'|'enabled'|'enabled-failed'|'disabling'|'disabling-failed',
          'StateTransitionReason': 'string',
          'StateTransitionTime': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ImageId** *(string) --* 

        The image ID that identifies the AMI for which Windows fast launch was enabled.

        
      

      - **ResourceType** *(string) --* 

        The type of resource that was defined for pre-provisioning the AMI for Windows fast launch.

        
      

      - **SnapshotConfiguration** *(dict) --* 

        Settings to create and manage the pre-provisioned snapshots that Amazon EC2 uses for faster launches from the Windows AMI. This property is returned when the associated ``resourceType`` is ``snapshot``.

        
        

        - **TargetResourceCount** *(integer) --* 

          The number of pre-provisioned snapshots requested to keep on hand for a Windows fast launch enabled AMI.

          
    
      

      - **LaunchTemplate** *(dict) --* 

        The launch template that is used when launching Windows instances from pre-provisioned snapshots.

        
        

        - **LaunchTemplateId** *(string) --* 

          The ID of the launch template that the AMI uses for Windows fast launch.

          
        

        - **LaunchTemplateName** *(string) --* 

          The name of the launch template that the AMI uses for Windows fast launch.

          
        

        - **Version** *(string) --* 

          The version of the launch template that the AMI uses for Windows fast launch.

          
    
      

      - **MaxParallelLaunches** *(integer) --* 

        The maximum number of instances that Amazon EC2 can launch at the same time to create pre-provisioned snapshots for Windows fast launch.

        
      

      - **OwnerId** *(string) --* 

        The owner ID for the AMI for which Windows fast launch was enabled.

        
      

      - **State** *(string) --* 

        The current state of Windows fast launch for the specified AMI.

        
      

      - **StateTransitionReason** *(string) --* 

        The reason that the state changed for Windows fast launch for the AMI.

        
      

      - **StateTransitionTime** *(datetime) --* 

        The time that the state changed for Windows fast launch for the AMI.

        
  