Amazon AppStream

2018/02/23 - Amazon AppStream - 1 new 2 updated api methods

Changes  This API update is to enable customers to copy their Amazon AppStream 2.0 images within and between AWS Regions

CopyImage (new) Link ¶

Copies the image within the same region or to a new region within the same AWS account. Note that any tags you added to the image will not be copied.

See also: AWS API Documentation

Request Syntax

client.copy_image(
    SourceImageName='string',
    DestinationImageName='string',
    DestinationRegion='string',
    DestinationImageDescription='string'
)
type SourceImageName

string

param SourceImageName

[REQUIRED]

The name of the image to copy.

type DestinationImageName

string

param DestinationImageName

[REQUIRED]

The name that the image will have when it is copied to the destination.

type DestinationRegion

string

param DestinationRegion

[REQUIRED]

The destination region to which the image will be copied. This parameter is required, even if you are copying an image within the same region.

type DestinationImageDescription

string

param DestinationImageDescription

The description that the image will have when it is copied to the destination.

rtype

dict

returns

Response Syntax

{
    'DestinationImageName': 'string'
}

Response Structure

  • (dict) --

    • DestinationImageName (string) --

      The name of the destination image.

DeleteImage (updated) Link ¶
Changes (response)
{'Image': {'State': ['COPYING'],
           'StateChangeReason': {'Code': ['IMAGE_COPY_FAILURE']}}}

Deletes the specified image. You cannot delete an image that is currently in use. After you delete an image, you cannot provision new capacity using the image.

See also: AWS API Documentation

Request Syntax

client.delete_image(
    Name='string'
)
type Name

string

param Name

[REQUIRED]

The name of the image.

rtype

dict

returns

Response Syntax

{
    'Image': {
        'Name': 'string',
        'Arn': 'string',
        'BaseImageArn': 'string',
        'DisplayName': 'string',
        'State': 'PENDING'|'AVAILABLE'|'FAILED'|'COPYING'|'DELETING',
        'Visibility': 'PUBLIC'|'PRIVATE',
        'ImageBuilderSupported': True|False,
        'Platform': 'WINDOWS',
        'Description': 'string',
        'StateChangeReason': {
            'Code': 'INTERNAL_ERROR'|'IMAGE_BUILDER_NOT_AVAILABLE'|'IMAGE_COPY_FAILURE',
            'Message': 'string'
        },
        'Applications': [
            {
                'Name': 'string',
                'DisplayName': 'string',
                'IconURL': 'string',
                'LaunchPath': 'string',
                'LaunchParameters': 'string',
                'Enabled': True|False,
                'Metadata': {
                    'string': 'string'
                }
            },
        ],
        'CreatedTime': datetime(2015, 1, 1),
        'PublicBaseImageReleasedDate': datetime(2015, 1, 1),
        'AppstreamAgentVersion': 'string'
    }
}

Response Structure

  • (dict) --

    • Image (dict) --

      Information about the image.

      • Name (string) --

        The name of the image.

      • Arn (string) --

        The ARN of the image.

      • BaseImageArn (string) --

        The ARN of the image from which this image was created.

      • DisplayName (string) --

        The image name for display.

      • State (string) --

        The image starts in the PENDING state. If image creation succeeds, the state is AVAILABLE . If image creation fails, the state is FAILED .

      • Visibility (string) --

        Indicates whether the image is public or private.

      • ImageBuilderSupported (boolean) --

        Indicates whether an image builder can be launched from this image.

      • Platform (string) --

        The operating system platform of the image.

      • Description (string) --

        The description for display.

      • StateChangeReason (dict) --

        The reason why the last state change occurred.

        • Code (string) --

          The state change reason code.

        • Message (string) --

          The state change reason message.

      • Applications (list) --

        The applications associated with the image.

        • (dict) --

          Describes an application in the application catalog.

          • Name (string) --

            The name of the application.

          • DisplayName (string) --

            The application name for display.

          • IconURL (string) --

            The URL for the application icon. This URL might be time-limited.

          • LaunchPath (string) --

            The path to the application executable in the instance.

          • LaunchParameters (string) --

            The arguments that are passed to the application at launch.

          • Enabled (boolean) --

            If there is a problem, the application can be disabled after image creation.

          • Metadata (dict) --

            Additional attributes that describe the application.

            • (string) --

              • (string) --

      • CreatedTime (datetime) --

        The time the image was created.

      • PublicBaseImageReleasedDate (datetime) --

        The release date of the public base image. For private images, this date is the release date of the base image from which the image was created.

      • AppstreamAgentVersion (string) --

        The version of the AppStream 2.0 agent to use for instances that are launched from this image.

DescribeImages (updated) Link ¶
Changes (response)
{'Images': {'State': ['COPYING'],
            'StateChangeReason': {'Code': ['IMAGE_COPY_FAILURE']}}}

Describes the specified images or all images in the account.

See also: AWS API Documentation

Request Syntax

client.describe_images(
    Names=[
        'string',
    ]
)
type Names

list

param Names

The names of the images to describe.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'Images': [
        {
            'Name': 'string',
            'Arn': 'string',
            'BaseImageArn': 'string',
            'DisplayName': 'string',
            'State': 'PENDING'|'AVAILABLE'|'FAILED'|'COPYING'|'DELETING',
            'Visibility': 'PUBLIC'|'PRIVATE',
            'ImageBuilderSupported': True|False,
            'Platform': 'WINDOWS',
            'Description': 'string',
            'StateChangeReason': {
                'Code': 'INTERNAL_ERROR'|'IMAGE_BUILDER_NOT_AVAILABLE'|'IMAGE_COPY_FAILURE',
                'Message': 'string'
            },
            'Applications': [
                {
                    'Name': 'string',
                    'DisplayName': 'string',
                    'IconURL': 'string',
                    'LaunchPath': 'string',
                    'LaunchParameters': 'string',
                    'Enabled': True|False,
                    'Metadata': {
                        'string': 'string'
                    }
                },
            ],
            'CreatedTime': datetime(2015, 1, 1),
            'PublicBaseImageReleasedDate': datetime(2015, 1, 1),
            'AppstreamAgentVersion': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Images (list) --

      Information about the images.

      • (dict) --

        Describes an image.

        • Name (string) --

          The name of the image.

        • Arn (string) --

          The ARN of the image.

        • BaseImageArn (string) --

          The ARN of the image from which this image was created.

        • DisplayName (string) --

          The image name for display.

        • State (string) --

          The image starts in the PENDING state. If image creation succeeds, the state is AVAILABLE . If image creation fails, the state is FAILED .

        • Visibility (string) --

          Indicates whether the image is public or private.

        • ImageBuilderSupported (boolean) --

          Indicates whether an image builder can be launched from this image.

        • Platform (string) --

          The operating system platform of the image.

        • Description (string) --

          The description for display.

        • StateChangeReason (dict) --

          The reason why the last state change occurred.

          • Code (string) --

            The state change reason code.

          • Message (string) --

            The state change reason message.

        • Applications (list) --

          The applications associated with the image.

          • (dict) --

            Describes an application in the application catalog.

            • Name (string) --

              The name of the application.

            • DisplayName (string) --

              The application name for display.

            • IconURL (string) --

              The URL for the application icon. This URL might be time-limited.

            • LaunchPath (string) --

              The path to the application executable in the instance.

            • LaunchParameters (string) --

              The arguments that are passed to the application at launch.

            • Enabled (boolean) --

              If there is a problem, the application can be disabled after image creation.

            • Metadata (dict) --

              Additional attributes that describe the application.

              • (string) --

                • (string) --

        • CreatedTime (datetime) --

          The time the image was created.

        • PublicBaseImageReleasedDate (datetime) --

          The release date of the public base image. For private images, this date is the release date of the base image from which the image was created.

        • AppstreamAgentVersion (string) --

          The version of the AppStream 2.0 agent to use for instances that are launched from this image.