WorkSpaces / Client / copy_workspace_image

copy_workspace_image#

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.

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 and DescribeWorkspaceImagePermissions API operations.

See also: AWS API Documentation

Request Syntax

response = client.copy_workspace_image(
    Name='string',
    Description='string',
    SourceImageId='string',
    SourceRegion='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The name of the image.

  • Description (string) – A description of the image.

  • SourceImageId (string) –

    [REQUIRED]

    The identifier of the source image.

  • SourceRegion (string) –

    [REQUIRED]

    The identifier of the source Region.

  • Tags (list) –

    The tags for the image.

    • (dict) –

      Describes a tag.

      • Key (string) – [REQUIRED]

        The key of the tag.

      • Value (string) –

        The value of the tag.

Return type:

dict

Returns:

Response Syntax

{
    'ImageId': 'string'
}

Response Structure

  • (dict) –

    • ImageId (string) –

      The identifier of the image.

Exceptions

  • WorkSpaces.Client.exceptions.ResourceLimitExceededException

  • WorkSpaces.Client.exceptions.ResourceAlreadyExistsException

  • WorkSpaces.Client.exceptions.ResourceNotFoundException

  • WorkSpaces.Client.exceptions.ResourceUnavailableException

  • WorkSpaces.Client.exceptions.OperationNotSupportedException

  • WorkSpaces.Client.exceptions.AccessDeniedException

  • WorkSpaces.Client.exceptions.InvalidParameterValuesException