:doc:`WorkSpaces <../../workspaces>` / Client / import_custom_workspace_image

*****************************
import_custom_workspace_image
*****************************



.. py:method:: WorkSpaces.Client.import_custom_workspace_image(**kwargs)

  

  Imports the specified Windows 10 or 11 Bring Your Own License (BYOL) image into Amazon WorkSpaces using EC2 Image Builder. The image must be an already licensed image that is in your Amazon Web Services account, and you must own the image. For more information about creating BYOL images, see `Bring Your Own Windows Desktop Licenses <https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/ImportCustomWorkspaceImage>`_  


  **Request Syntax**
  ::

    response = client.import_custom_workspace_image(
        ImageName='string',
        ImageDescription='string',
        ComputeType='BASE'|'GRAPHICS_G4DN'|'GRAPHICS_G6',
        Protocol='PCOIP'|'DCV'|'BYOP',
        ImageSource={
            'Ec2ImportTaskId': 'string',
            'ImageBuildVersionArn': 'string',
            'Ec2ImageId': 'string'
        },
        InfrastructureConfigurationArn='string',
        Platform='WINDOWS',
        OsVersion='Windows_10'|'Windows_11',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type ImageName: string
  :param ImageName: **[REQUIRED]** 

    The name of the WorkSpace image.

    

  
  :type ImageDescription: string
  :param ImageDescription: **[REQUIRED]** 

    The description of the WorkSpace image.

    

  
  :type ComputeType: string
  :param ComputeType: **[REQUIRED]** 

    The supported compute type for the WorkSpace image.

    

  
  :type Protocol: string
  :param Protocol: **[REQUIRED]** 

    The supported protocol for the WorkSpace image. Windows 11 does not support PCOIP protocol.

    

  
  :type ImageSource: dict
  :param ImageSource: **[REQUIRED]** 

    The options for image import source.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``Ec2ImportTaskId``, ``ImageBuildVersionArn``, ``Ec2ImageId``. 

  
    - **Ec2ImportTaskId** *(string) --* 

      The EC2 import task ID to import the image from the Amazon EC2 VM import process.

      

    
    - **ImageBuildVersionArn** *(string) --* 

      The ARN of the EC2 Image Builder image.

      

    
    - **Ec2ImageId** *(string) --* 

      The identifier of the EC2 image.

      

    
  
  :type InfrastructureConfigurationArn: string
  :param InfrastructureConfigurationArn: **[REQUIRED]** 

    The infrastructure configuration ARN that specifies how the WorkSpace image is built.

    

  
  :type Platform: string
  :param Platform: **[REQUIRED]** 

    The platform for the WorkSpace image source.

    

  
  :type OsVersion: string
  :param OsVersion: **[REQUIRED]** 

    The OS version for the WorkSpace image source.

    

  
  :type Tags: list
  :param Tags: 

    The resource tags. Each WorkSpaces resource can have a maximum of 50 tags.

    

  
    - *(dict) --* 

      Describes a tag.

      

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

        The key of the tag.

        

      
      - **Value** *(string) --* 

        The value of the tag.

        

      
    

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

    
    ::

      {
          'ImageId': 'string',
          'State': 'PENDING'|'IN_PROGRESS'|'PROCESSING_SOURCE_IMAGE'|'IMAGE_TESTING_START'|'UPDATING_OPERATING_SYSTEM'|'IMAGE_COMPATIBILITY_CHECKING'|'IMAGE_TESTING_GENERALIZATION'|'CREATING_TEST_INSTANCE'|'INSTALLING_COMPONENTS'|'GENERALIZING'|'VALIDATING'|'PUBLISHING'|'COMPLETED'|'ERROR'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The identifier of the WorkSpace image.

        
      

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

        The state of the WorkSpace image.

        
  
  **Exceptions**
  
  *   :py:class:`WorkSpaces.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.InvalidParameterValuesException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.OperationNotSupportedException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ResourceLimitExceededException`

  