AppStream / Client / create_export_image_task

create_export_image_task

AppStream.Client.create_export_image_task(**kwargs)

Creates a task to export a WorkSpaces Applications image to an EC2 AMI. This allows you to use your customized WorkSpaces Applications images with other AWS services or for backup purposes.

See also: AWS API Documentation

Request Syntax

response = client.create_export_image_task(
    ImageName='string',
    AmiName='string',
    IamRoleArn='string',
    TagSpecifications={
        'string': 'string'
    },
    AmiDescription='string'
)
Parameters:
  • ImageName (string) –

    [REQUIRED]

    The name of the WorkSpaces Applications image to export. The image must be in an available state and owned by your account.

  • AmiName (string) –

    [REQUIRED]

    The name for the exported EC2 AMI. This is a required field that must be unique within your account and region.

  • IamRoleArn (string) –

    [REQUIRED]

    The ARN of the IAM role that allows WorkSpaces Applications to create the AMI. The role must have permissions to copy images, describe images, and create tags, with a trust relationship allowing appstream.amazonaws.com to assume the role.

  • TagSpecifications (dict) –

    The tags to apply to the exported AMI. These tags help you organize and manage your EC2 AMIs.

    • (string) –

      • (string) –

  • AmiDescription (string) – An optional description for the exported AMI. This description will be applied to the resulting EC2 AMI.

Return type:

dict

Returns:

Response Syntax

{
    'ExportImageTask': {
        'TaskId': 'string',
        'ImageArn': 'string',
        'AmiName': 'string',
        'CreatedDate': datetime(2015, 1, 1),
        'AmiDescription': 'string',
        'State': 'EXPORTING'|'COMPLETED'|'FAILED',
        'AmiId': 'string',
        'TagSpecifications': {
            'string': 'string'
        },
        'ErrorDetails': [
            {
                'ErrorCode': 'string',
                'ErrorMessage': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • ExportImageTask (dict) –

      Information about the export image task that was created, including the task ID and initial state.

      • TaskId (string) –

        The unique identifier for the export image task. Use this ID to track the task’s progress and retrieve its details.

      • ImageArn (string) –

        The ARN of the WorkSpaces Applications image being exported.

      • AmiName (string) –

        The name of the EC2 AMI that will be created by this export task.

      • CreatedDate (datetime) –

        The date and time when the export image task was created.

      • AmiDescription (string) –

        The description that will be applied to the exported EC2 AMI.

      • State (string) –

        The current state of the export image task, such as PENDING, RUNNING, COMPLETED, or FAILED.

      • AmiId (string) –

        The ID of the EC2 AMI that was created by this export task. This field is only populated when the task completes successfully.

      • TagSpecifications (dict) –

        The tags that will be applied to the exported EC2 AMI.

        • (string) –

          • (string) –

      • ErrorDetails (list) –

        Details about any errors that occurred during the export process. This field is only populated when the task fails.

        • (dict) –

          The error details.

          • ErrorCode (string) –

            The error code.

          • ErrorMessage (string) –

            The error message.

Exceptions

  • AppStream.Client.exceptions.LimitExceededException

  • AppStream.Client.exceptions.InvalidRoleException

  • AppStream.Client.exceptions.InvalidAccountStatusException

  • AppStream.Client.exceptions.OperationNotPermittedException

  • AppStream.Client.exceptions.ResourceNotFoundException

  • AppStream.Client.exceptions.ConcurrentModificationException

  • AppStream.Client.exceptions.ResourceNotAvailableException