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

********************
copy_workspace_image
********************



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

  

  Copies the specified image from the specified Region to the current Region. For more information about copying images, see `Copy a Custom WorkSpaces Image <https://docs.aws.amazon.com/workspaces/latest/adminguide/copy-custom-image.html>`__.

   

  In the China (Ningxia) Region, you can copy images only within the same Region.

   

  In Amazon Web Services GovCloud (US), to copy images to and from other Regions, contact Amazon Web Services Support.

   

  .. warning::

     

    Before copying a shared image, be sure to verify that it has been shared from the correct Amazon Web Services account. To determine if an image has been shared and to see the ID of the Amazon Web Services account that owns an image, use the `DescribeWorkSpaceImages <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html>`__ and `DescribeWorkspaceImagePermissions <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImagePermissions.html>`__ API operations.

    

  

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


  **Request Syntax**
  ::

    response = client.copy_workspace_image(
        Name='string',
        Description='string',
        SourceImageId='string',
        SourceRegion='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the image.

    

  
  :type Description: string
  :param Description: 

    A description of the image.

    

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

    The identifier of the source image.

    

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

    The identifier of the source Region.

    

  
  :type Tags: list
  :param Tags: 

    The tags for the image.

    

  
    - *(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'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The identifier of the image.

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

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

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

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

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

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

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

  