Amazon WorkSpaces

2026/01/07 - Amazon WorkSpaces - 9 updated api methods

Changes  Add StateMessage and ProgressPercentage fields to DescribeCustomWorkspaceImageImport API response.

AssociateWorkspaceApplication (updated) Link ¶
Changes (response)
{'Association': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}

Associates the specified application to the specified WorkSpace.

See also: AWS API Documentation

Request Syntax

client.associate_workspace_application(
    WorkspaceId='string',
    ApplicationId='string'
)
type WorkspaceId:

string

param WorkspaceId:

[REQUIRED]

The identifier of the WorkSpace.

type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The identifier of the application.

rtype:

dict

returns:

Response Syntax

{
    'Association': {
        'AssociatedResourceId': 'string',
        'AssociatedResourceType': 'APPLICATION',
        'Created': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1),
        'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
        'StateReason': {
            'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
            'ErrorMessage': 'string'
        },
        'WorkspaceId': 'string'
    }
}

Response Structure

  • (dict) --

    • Association (dict) --

      Information about the association between the specified WorkSpace and the specified application.

      • AssociatedResourceId (string) --

        The identifier of the associated resource.

      • AssociatedResourceType (string) --

        The resource types of the associated resource.

      • Created (datetime) --

        The time the association is created.

      • LastUpdatedTime (datetime) --

        The time the association status was last updated.

      • State (string) --

        The status of the WorkSpace resource association.

      • StateReason (dict) --

        The reason the association deployment failed.

        • ErrorCode (string) --

          The error code of the association deployment failure.

        • ErrorMessage (string) --

          The error message of the association deployment failure.

      • WorkspaceId (string) --

        The identifier of the WorkSpace.

DeployWorkspaceApplications (updated) Link ¶
Changes (response)
{'Deployment': {'Associations': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}}

Deploys associated applications to the specified WorkSpace

See also: AWS API Documentation

Request Syntax

client.deploy_workspace_applications(
    WorkspaceId='string',
    Force=True|False
)
type WorkspaceId:

string

param WorkspaceId:

[REQUIRED]

The identifier of the WorkSpace.

type Force:

boolean

param Force:

Indicates whether the force flag is applied for the specified WorkSpace. When the force flag is enabled, it allows previously failed deployments to be retried.

rtype:

dict

returns:

Response Syntax

{
    'Deployment': {
        'Associations': [
            {
                'AssociatedResourceId': 'string',
                'AssociatedResourceType': 'APPLICATION',
                'Created': datetime(2015, 1, 1),
                'LastUpdatedTime': datetime(2015, 1, 1),
                'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
                'StateReason': {
                    'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
                    'ErrorMessage': 'string'
                },
                'WorkspaceId': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Deployment (dict) --

      The list of deployed associations and information about them.

      • Associations (list) --

        The associations between the applications and the associated resources.

        • (dict) --

          Describes the association between an application and a WorkSpace resource.

          • AssociatedResourceId (string) --

            The identifier of the associated resource.

          • AssociatedResourceType (string) --

            The resource types of the associated resource.

          • Created (datetime) --

            The time the association is created.

          • LastUpdatedTime (datetime) --

            The time the association status was last updated.

          • State (string) --

            The status of the WorkSpace resource association.

          • StateReason (dict) --

            The reason the association deployment failed.

            • ErrorCode (string) --

              The error code of the association deployment failure.

            • ErrorMessage (string) --

              The error message of the association deployment failure.

          • WorkspaceId (string) --

            The identifier of the WorkSpace.

DescribeApplicationAssociations (updated) Link ¶
Changes (response)
{'Associations': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}

Describes the associations between the application and the specified associated resources.

See also: AWS API Documentation

Request Syntax

client.describe_application_associations(
    MaxResults=123,
    NextToken='string',
    ApplicationId='string',
    AssociatedResourceTypes=[
        'WORKSPACE'|'BUNDLE'|'IMAGE',
    ]
)
type MaxResults:

integer

param MaxResults:

The maximum number of associations to return.

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 ApplicationId:

string

param ApplicationId:

[REQUIRED]

The identifier of the specified application.

type AssociatedResourceTypes:

list

param AssociatedResourceTypes:

[REQUIRED]

The resource type of the associated resources.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Associations': [
        {
            'ApplicationId': 'string',
            'AssociatedResourceId': 'string',
            'AssociatedResourceType': 'WORKSPACE'|'BUNDLE'|'IMAGE',
            'Created': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1),
            'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
            'StateReason': {
                'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
                'ErrorMessage': 'string'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Associations (list) --

      List of associations and information about them.

      • (dict) --

        Describes the association between an application and an application resource.

        • ApplicationId (string) --

          The identifier of the application.

        • AssociatedResourceId (string) --

          The identifier of the associated resource.

        • AssociatedResourceType (string) --

          The resource type of the associated resource.

        • Created (datetime) --

          The time the association was created.

        • LastUpdatedTime (datetime) --

          The time the association status was last updated.

        • State (string) --

          The status of the application resource association.

        • StateReason (dict) --

          The reason the association deployment failed.

          • ErrorCode (string) --

            The error code of the association deployment failure.

          • ErrorMessage (string) --

            The error message of the association deployment failure.

    • NextToken (string) --

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

DescribeBundleAssociations (updated) Link ¶
Changes (response)
{'Associations': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}

Describes the associations between the applications and the specified bundle.

See also: AWS API Documentation

Request Syntax

client.describe_bundle_associations(
    BundleId='string',
    AssociatedResourceTypes=[
        'APPLICATION',
    ]
)
type BundleId:

string

param BundleId:

[REQUIRED]

The identifier of the bundle.

type AssociatedResourceTypes:

list

param AssociatedResourceTypes:

[REQUIRED]

The resource types of the associated resource.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Associations': [
        {
            'AssociatedResourceId': 'string',
            'AssociatedResourceType': 'APPLICATION',
            'BundleId': 'string',
            'Created': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1),
            'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
            'StateReason': {
                'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Associations (list) --

      List of information about the specified associations.

      • (dict) --

        Describes the association between an application and a bundle resource.

        • AssociatedResourceId (string) --

          The identifier of the associated resource.

        • AssociatedResourceType (string) --

          The resource type of the associated resources.

        • BundleId (string) --

          The identifier of the bundle.

        • Created (datetime) --

          The time the association is created.

        • LastUpdatedTime (datetime) --

          The time the association status was last updated.

        • State (string) --

          The status of the bundle resource association.

        • StateReason (dict) --

          The reason the association deployment failed.

          • ErrorCode (string) --

            The error code of the association deployment failure.

          • ErrorMessage (string) --

            The error message of the association deployment failure.

DescribeCustomWorkspaceImageImport (updated) Link ¶
Changes (response)
{'ProgressPercentage': 'integer',
 'State': {'CREATING_TEST_INSTANCE',
           'GENERALIZING',
           'IMAGE_COMPATIBILITY_CHECKING',
           'IMAGE_TESTING_GENERALIZATION',
           'IMAGE_TESTING_START',
           'INSTALLING_COMPONENTS',
           'PROCESSING_SOURCE_IMAGE',
           'PUBLISHING',
           'UPDATING_OPERATING_SYSTEM',
           'VALIDATING'},
 'StateMessage': 'string'}

Retrieves information about a WorkSpace BYOL image being imported via ImportCustomWorkspaceImage.

See also: AWS API Documentation

Request Syntax

client.describe_custom_workspace_image_import(
    ImageId='string'
)
type ImageId:

string

param ImageId:

[REQUIRED]

The identifier of the WorkSpace image.

rtype:

dict

returns:

Response Syntax

{
    'ImageId': 'string',
    'InfrastructureConfigurationArn': 'string',
    'State': 'PENDING'|'IN_PROGRESS'|'PROCESSING_SOURCE_IMAGE'|'IMAGE_TESTING_START'|'UPDATING_OPERATING_SYSTEM'|'IMAGE_COMPATIBILITY_CHECKING'|'IMAGE_TESTING_GENERALIZATION'|'CREATING_TEST_INSTANCE'|'INSTALLING_COMPONENTS'|'GENERALIZING'|'VALIDATING'|'PUBLISHING'|'COMPLETED'|'ERROR',
    'StateMessage': 'string',
    'ProgressPercentage': 123,
    'Created': datetime(2015, 1, 1),
    'LastUpdatedTime': datetime(2015, 1, 1),
    'ImageSource': {
        'Ec2ImportTaskId': 'string',
        'ImageBuildVersionArn': 'string',
        'Ec2ImageId': 'string'
    },
    'ImageBuilderInstanceId': 'string',
    'ErrorDetails': [
        {
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • ImageId (string) --

      The identifier of the WorkSpace image.

    • InfrastructureConfigurationArn (string) --

      The infrastructure configuration ARN that specifies how the WorkSpace image is built.

    • State (string) --

      The state of the WorkSpace image.

    • StateMessage (string) --

      The state message of the WorkSpace image import workflow.

    • ProgressPercentage (integer) --

      The estimated progress percentage of the WorkSpace image import workflow.

    • Created (datetime) --

      The timestamp when the WorkSpace image import was created.

    • LastUpdatedTime (datetime) --

      The timestamp when the WorkSpace image import was last updated.

    • ImageSource (dict) --

      Describes the image import source.

      • Ec2ImportTaskId (string) --

        The EC2 import task ID to import the image from the Amazon EC2 VM import process.

      • ImageBuildVersionArn (string) --

        The ARN of the EC2 Image Builder image.

      • Ec2ImageId (string) --

        The identifier of the EC2 image.

    • ImageBuilderInstanceId (string) --

      The image builder instance ID of the WorkSpace image.

    • ErrorDetails (list) --

      Describes in-depth details about the error. These details include the possible causes of the error and troubleshooting information.

      • (dict) --

        Describes in-depth details about the error. These details include the possible causes of the error and troubleshooting information.

        • ErrorCode (string) --

          The error code that is returned for the image import.

        • ErrorMessage (string) --

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

DescribeImageAssociations (updated) Link ¶
Changes (response)
{'Associations': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}

Describes the associations between the applications and the specified image.

See also: AWS API Documentation

Request Syntax

client.describe_image_associations(
    ImageId='string',
    AssociatedResourceTypes=[
        'APPLICATION',
    ]
)
type ImageId:

string

param ImageId:

[REQUIRED]

The identifier of the image.

type AssociatedResourceTypes:

list

param AssociatedResourceTypes:

[REQUIRED]

The resource types of the associated resource.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Associations': [
        {
            'AssociatedResourceId': 'string',
            'AssociatedResourceType': 'APPLICATION',
            'Created': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1),
            'ImageId': 'string',
            'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
            'StateReason': {
                'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
                'ErrorMessage': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Associations (list) --

      List of information about the specified associations.

      • (dict) --

        Describes the association between an application and an image resource.

        • AssociatedResourceId (string) --

          The identifier of the associated resource.

        • AssociatedResourceType (string) --

          The resource type of the associated resources.

        • Created (datetime) --

          The time the association is created.

        • LastUpdatedTime (datetime) --

          The time the association status was last updated.

        • ImageId (string) --

          The identifier of the image.

        • State (string) --

          The status of the image resource association.

        • StateReason (dict) --

          The reason the association deployment failed.

          • ErrorCode (string) --

            The error code of the association deployment failure.

          • ErrorMessage (string) --

            The error message of the association deployment failure.

DescribeWorkspaceAssociations (updated) Link ¶
Changes (response)
{'Associations': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}

Describes the associations betweens applications and the specified WorkSpace.

See also: AWS API Documentation

Request Syntax

client.describe_workspace_associations(
    WorkspaceId='string',
    AssociatedResourceTypes=[
        'APPLICATION',
    ]
)
type WorkspaceId:

string

param WorkspaceId:

[REQUIRED]

The identifier of the WorkSpace.

type AssociatedResourceTypes:

list

param AssociatedResourceTypes:

[REQUIRED]

The resource types of the associated resources.

  • (string) --

rtype:

dict

returns:

Response Syntax

{
    'Associations': [
        {
            'AssociatedResourceId': 'string',
            'AssociatedResourceType': 'APPLICATION',
            'Created': datetime(2015, 1, 1),
            'LastUpdatedTime': datetime(2015, 1, 1),
            'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
            'StateReason': {
                'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
                'ErrorMessage': 'string'
            },
            'WorkspaceId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Associations (list) --

      List of information about the specified associations.

      • (dict) --

        Describes the association between an application and a WorkSpace resource.

        • AssociatedResourceId (string) --

          The identifier of the associated resource.

        • AssociatedResourceType (string) --

          The resource types of the associated resource.

        • Created (datetime) --

          The time the association is created.

        • LastUpdatedTime (datetime) --

          The time the association status was last updated.

        • State (string) --

          The status of the WorkSpace resource association.

        • StateReason (dict) --

          The reason the association deployment failed.

          • ErrorCode (string) --

            The error code of the association deployment failure.

          • ErrorMessage (string) --

            The error message of the association deployment failure.

        • WorkspaceId (string) --

          The identifier of the WorkSpace.

DisassociateWorkspaceApplication (updated) Link ¶
Changes (response)
{'Association': {'StateReason': {'ErrorCode': {'ValidationError.ApplicationOldVersionExists'}}}}

Disassociates the specified application from a WorkSpace.

See also: AWS API Documentation

Request Syntax

client.disassociate_workspace_application(
    WorkspaceId='string',
    ApplicationId='string'
)
type WorkspaceId:

string

param WorkspaceId:

[REQUIRED]

The identifier of the WorkSpace.

type ApplicationId:

string

param ApplicationId:

[REQUIRED]

The identifier of the application.

rtype:

dict

returns:

Response Syntax

{
    'Association': {
        'AssociatedResourceId': 'string',
        'AssociatedResourceType': 'APPLICATION',
        'Created': datetime(2015, 1, 1),
        'LastUpdatedTime': datetime(2015, 1, 1),
        'State': 'PENDING_INSTALL'|'PENDING_INSTALL_DEPLOYMENT'|'PENDING_UNINSTALL'|'PENDING_UNINSTALL_DEPLOYMENT'|'INSTALLING'|'UNINSTALLING'|'ERROR'|'COMPLETED'|'REMOVED',
        'StateReason': {
            'ErrorCode': 'ValidationError.InsufficientDiskSpace'|'ValidationError.InsufficientMemory'|'ValidationError.UnsupportedOperatingSystem'|'DeploymentError.InternalServerError'|'DeploymentError.WorkspaceUnreachable'|'ValidationError.ApplicationOldVersionExists',
            'ErrorMessage': 'string'
        },
        'WorkspaceId': 'string'
    }
}

Response Structure

  • (dict) --

    • Association (dict) --

      Information about the targeted association.

      • AssociatedResourceId (string) --

        The identifier of the associated resource.

      • AssociatedResourceType (string) --

        The resource types of the associated resource.

      • Created (datetime) --

        The time the association is created.

      • LastUpdatedTime (datetime) --

        The time the association status was last updated.

      • State (string) --

        The status of the WorkSpace resource association.

      • StateReason (dict) --

        The reason the association deployment failed.

        • ErrorCode (string) --

          The error code of the association deployment failure.

        • ErrorMessage (string) --

          The error message of the association deployment failure.

      • WorkspaceId (string) --

        The identifier of the WorkSpace.

ImportCustomWorkspaceImage (updated) Link ¶
Changes (response)
{'State': {'CREATING_TEST_INSTANCE',
           'GENERALIZING',
           'IMAGE_COMPATIBILITY_CHECKING',
           'IMAGE_TESTING_GENERALIZATION',
           'IMAGE_TESTING_START',
           'INSTALLING_COMPONENTS',
           'PROCESSING_SOURCE_IMAGE',
           'PUBLISHING',
           'UPDATING_OPERATING_SYSTEM',
           'VALIDATING'}}

Imports the specified Windows 10 or 11 Bring Your Own License (BYOL) image into Amazon WorkSpaces using EC2 Image Builder. The image must be an already licensed image that is in your Amazon Web Services account, and you must own the image. For more information about creating BYOL images, see Bring Your Own Windows Desktop Licenses.

See also: AWS API Documentation

Request Syntax

client.import_custom_workspace_image(
    ImageName='string',
    ImageDescription='string',
    ComputeType='BASE'|'GRAPHICS_G4DN',
    Protocol='PCOIP'|'DCV'|'BYOP',
    ImageSource={
        'Ec2ImportTaskId': 'string',
        'ImageBuildVersionArn': 'string',
        'Ec2ImageId': 'string'
    },
    InfrastructureConfigurationArn='string',
    Platform='WINDOWS',
    OsVersion='Windows_10'|'Windows_11',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ImageName:

string

param ImageName:

[REQUIRED]

The name of the WorkSpace image.

type ImageDescription:

string

param ImageDescription:

[REQUIRED]

The description of the WorkSpace image.

type ComputeType:

string

param ComputeType:

[REQUIRED]

The supported compute type for the WorkSpace image.

type Protocol:

string

param Protocol:

[REQUIRED]

The supported protocol for the WorkSpace image. Windows 11 does not support PCOIP protocol.

type ImageSource:

dict

param ImageSource:

[REQUIRED]

The options for image import source.

  • Ec2ImportTaskId (string) --

    The EC2 import task ID to import the image from the Amazon EC2 VM import process.

  • ImageBuildVersionArn (string) --

    The ARN of the EC2 Image Builder image.

  • Ec2ImageId (string) --

    The identifier of the EC2 image.

type InfrastructureConfigurationArn:

string

param InfrastructureConfigurationArn:

[REQUIRED]

The infrastructure configuration ARN that specifies how the WorkSpace image is built.

type Platform:

string

param Platform:

[REQUIRED]

The platform for the WorkSpace image source.

type OsVersion:

string

param OsVersion:

[REQUIRED]

The OS version for the WorkSpace image source.

type Tags:

list

param Tags:

The resource tags. Each WorkSpaces resource can have a maximum of 50 tags.

  • (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',
    'State': 'PENDING'|'IN_PROGRESS'|'PROCESSING_SOURCE_IMAGE'|'IMAGE_TESTING_START'|'UPDATING_OPERATING_SYSTEM'|'IMAGE_COMPATIBILITY_CHECKING'|'IMAGE_TESTING_GENERALIZATION'|'CREATING_TEST_INSTANCE'|'INSTALLING_COMPONENTS'|'GENERALIZING'|'VALIDATING'|'PUBLISHING'|'COMPLETED'|'ERROR'
}

Response Structure

  • (dict) --

    • ImageId (string) --

      The identifier of the WorkSpace image.

    • State (string) --

      The state of the WorkSpace image.