Amazon WorkSpaces

2021/09/30 - Amazon WorkSpaces - 1 new1 updated api methods

Changes  Added CreateUpdatedWorkspaceImage API to update WorkSpace images with latest software and drivers. Updated DescribeWorkspaceImages API to display if there are updates available for WorkSpace images.

CreateUpdatedWorkspaceImage (new) Link ¶

Creates a new updated WorkSpace image based on the specified source image. The new updated WorkSpace image has the latest drivers and other updates required by the Amazon WorkSpaces components.

To determine which WorkSpace images need to be updated with the latest Amazon WorkSpaces requirements, use DescribeWorkspaceImages.

See also: AWS API Documentation

Request Syntax

client.create_updated_workspace_image(
    Name='string',
    Description='string',
    SourceImageId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type Name:

string

param Name:

[REQUIRED]

The name of the new updated WorkSpace image.

type Description:

string

param Description:

[REQUIRED]

A description of whether updates for the WorkSpace image are available.

type SourceImageId:

string

param SourceImageId:

[REQUIRED]

The identifier of the source WorkSpace image.

type Tags:

list

param Tags:

The tags that you want to add to the new updated WorkSpace 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 new updated WorkSpace image.

DescribeWorkspaceImages (updated) Link ¶
Changes (response)
{'Images': {'Updates': {'Description': 'string', 'UpdateAvailable': 'boolean'}}}

Retrieves a list that describes one or more specified images, if the image identifiers are provided. Otherwise, all images in the account are described.

See also: AWS API Documentation

Request Syntax

client.describe_workspace_images(
    ImageIds=[
        'string',
    ],
    ImageType='OWNED'|'SHARED',
    NextToken='string',
    MaxResults=123
)
type ImageIds:

list

param ImageIds:

The identifier of the image.

  • (string) --

type ImageType:

string

param ImageType:

The type (owned or shared) of the image.

type NextToken:

string

param NextToken:

If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.

type MaxResults:

integer

param MaxResults:

The maximum number of items to return.

rtype:

dict

returns:

Response Syntax

{
    'Images': [
        {
            'ImageId': 'string',
            'Name': 'string',
            'Description': 'string',
            'OperatingSystem': {
                'Type': 'WINDOWS'|'LINUX'
            },
            'State': 'AVAILABLE'|'PENDING'|'ERROR',
            'RequiredTenancy': 'DEFAULT'|'DEDICATED',
            'ErrorCode': 'string',
            'ErrorMessage': 'string',
            'Created': datetime(2015, 1, 1),
            'OwnerAccountId': 'string',
            'Updates': {
                'UpdateAvailable': True|False,
                'Description': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Images (list) --

      Information about the images.

      • (dict) --

        Describes a WorkSpace image.

        • ImageId (string) --

          The identifier of the image.

        • Name (string) --

          The name of the image.

        • Description (string) --

          The description of the image.

        • OperatingSystem (dict) --

          The operating system that the image is running.

          • Type (string) --

            The operating system.

        • State (string) --

          The status of the image.

        • RequiredTenancy (string) --

          Specifies whether the image is running on dedicated hardware. When Bring Your Own License (BYOL) is enabled, this value is set to DEDICATED. For more information, see Bring Your Own Windows Desktop Images.

        • ErrorCode (string) --

          The error code that is returned for the image.

        • ErrorMessage (string) --

          The text of the error message that is returned for the image.

        • Created (datetime) --

          The date when the image was created. If the image has been shared, the Amazon Web Services account that the image has been shared with sees the original creation date of the image.

        • OwnerAccountId (string) --

          The identifier of the Amazon Web Services account that owns the image.

        • Updates (dict) --

          The updates (if any) that are available for the specified image.

          • UpdateAvailable (boolean) --

            Indicates whether updated drivers or other components are available for the specified WorkSpace image.

          • Description (string) --

            A description of whether updates for the WorkSpace image are pending or available.

    • NextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.