Amazon WorkSpaces

2016/05/17 - Amazon WorkSpaces - 3 new 1 updated api methods

CreateTags (new) Link ¶

Creates tags for a WorkSpace.

Request Syntax

client.create_tags(
    ResourceId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ResourceId

string

param ResourceId

[REQUIRED]

The resource ID of the request.

type Tags

list

param Tags

[REQUIRED]

The tags of the request.

  • (dict) --

    Describes the tag of the WorkSpace.

    • Key (string) -- [REQUIRED]

      The key of the tag.

    • Value (string) --

      The value of the tag.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The result of the create tags action.

DescribeTags (new) Link ¶

Describes tags for a WorkSpace.

Request Syntax

client.describe_tags(
    ResourceId='string'
)
type ResourceId

string

param ResourceId

[REQUIRED]

The resource ID of the request.

rtype

dict

returns

Response Syntax

{
    'TagList': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    The result of the describe tags action.

    • TagList (list) --

      The list of tags.

      • (dict) --

        Describes the tag of the WorkSpace.

        • Key (string) --

          The key of the tag.

        • Value (string) --

          The value of the tag.

DeleteTags (new) Link ¶

Deletes tags from a WorkSpace.

Request Syntax

client.delete_tags(
    ResourceId='string',
    TagKeys=[
        'string',
    ]
)
type ResourceId

string

param ResourceId

[REQUIRED]

The resource ID of the request.

type TagKeys

list

param TagKeys

[REQUIRED]

The tag keys of the request.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

    The result of the delete tags action.

CreateWorkspaces (updated) Link ¶
Changes (request, response)
Request
{'Workspaces': {'Tags': [{'Key': 'string', 'Value': 'string'}]}}
Response
{'FailedRequests': {'WorkspaceRequest': {'Tags': [{'Key': 'string',
                                                   'Value': 'string'}]}}}

Creates one or more WorkSpaces.

Note

This operation is asynchronous and returns before the WorkSpaces are created.

Request Syntax

client.create_workspaces(
    Workspaces=[
        {
            'DirectoryId': 'string',
            'UserName': 'string',
            'BundleId': 'string',
            'VolumeEncryptionKey': 'string',
            'UserVolumeEncryptionEnabled': True|False,
            'RootVolumeEncryptionEnabled': True|False,
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ]
)
type Workspaces

list

param Workspaces

[REQUIRED]

An array of structures that specify the WorkSpaces to create.

  • (dict) --

    Contains information about a WorkSpace creation request.

    • DirectoryId (string) -- [REQUIRED]

      The identifier of the AWS Directory Service directory to create the WorkSpace in. You can use the DescribeWorkspaceDirectories operation to obtain a list of the directories that are available.

    • UserName (string) -- [REQUIRED]

      The username that the WorkSpace is assigned to. This username must exist in the AWS Directory Service directory specified by the DirectoryId member.

    • BundleId (string) -- [REQUIRED]

      The identifier of the bundle to create the WorkSpace from. You can use the DescribeWorkspaceBundles operation to obtain a list of the bundles that are available.

    • VolumeEncryptionKey (string) --

      The KMS key used to encrypt data stored on your WorkSpace.

    • UserVolumeEncryptionEnabled (boolean) --

      Specifies whether the data stored on the user volume, or D: drive, is encrypted.

    • RootVolumeEncryptionEnabled (boolean) --

      Specifies whether the data stored on the root volume, or C: drive, is encrypted.

    • Tags (list) --

      The tags of the WorkSpace request.

      • (dict) --

        Describes the tag of the WorkSpace.

        • Key (string) -- [REQUIRED]

          The key of the tag.

        • Value (string) --

          The value of the tag.

rtype

dict

returns

Response Syntax

{
    'FailedRequests': [
        {
            'WorkspaceRequest': {
                'DirectoryId': 'string',
                'UserName': 'string',
                'BundleId': 'string',
                'VolumeEncryptionKey': 'string',
                'UserVolumeEncryptionEnabled': True|False,
                'RootVolumeEncryptionEnabled': True|False,
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ],
    'PendingRequests': [
        {
            'WorkspaceId': 'string',
            'DirectoryId': 'string',
            'UserName': 'string',
            'IpAddress': 'string',
            'State': 'PENDING'|'AVAILABLE'|'IMPAIRED'|'UNHEALTHY'|'REBOOTING'|'REBUILDING'|'TERMINATING'|'TERMINATED'|'SUSPENDED'|'ERROR',
            'BundleId': 'string',
            'SubnetId': 'string',
            'ErrorMessage': 'string',
            'ErrorCode': 'string',
            'ComputerName': 'string',
            'VolumeEncryptionKey': 'string',
            'UserVolumeEncryptionEnabled': True|False,
            'RootVolumeEncryptionEnabled': True|False
        },
    ]
}

Response Structure

  • (dict) --

    Contains the result of the CreateWorkspaces operation.

    • FailedRequests (list) --

      An array of structures that represent the WorkSpaces that could not be created.

      • (dict) --

        Contains information about a WorkSpace that could not be created.

        • WorkspaceRequest (dict) --

          A WorkspaceRequest object that contains the information about the WorkSpace that could not be created.

          • DirectoryId (string) --

            The identifier of the AWS Directory Service directory to create the WorkSpace in. You can use the DescribeWorkspaceDirectories operation to obtain a list of the directories that are available.

          • UserName (string) --

            The username that the WorkSpace is assigned to. This username must exist in the AWS Directory Service directory specified by the DirectoryId member.

          • BundleId (string) --

            The identifier of the bundle to create the WorkSpace from. You can use the DescribeWorkspaceBundles operation to obtain a list of the bundles that are available.

          • VolumeEncryptionKey (string) --

            The KMS key used to encrypt data stored on your WorkSpace.

          • UserVolumeEncryptionEnabled (boolean) --

            Specifies whether the data stored on the user volume, or D: drive, is encrypted.

          • RootVolumeEncryptionEnabled (boolean) --

            Specifies whether the data stored on the root volume, or C: drive, is encrypted.

          • Tags (list) --

            The tags of the WorkSpace request.

            • (dict) --

              Describes the tag of the WorkSpace.

              • Key (string) --

                The key of the tag.

              • Value (string) --

                The value of the tag.

        • ErrorCode (string) --

          The error code.

        • ErrorMessage (string) --

          The textual error message.

    • PendingRequests (list) --

      An array of structures that represent the WorkSpaces that were created.

      Because this operation is asynchronous, the identifier in WorkspaceId is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information will be returned.

      • (dict) --

        Contains information about a WorkSpace.

        • WorkspaceId (string) --

          The identifier of the WorkSpace.

        • DirectoryId (string) --

          The identifier of the AWS Directory Service directory that the WorkSpace belongs to.

        • UserName (string) --

          The user that the WorkSpace is assigned to.

        • IpAddress (string) --

          The IP address of the WorkSpace.

        • State (string) --

          The operational state of the WorkSpace.

        • BundleId (string) --

          The identifier of the bundle that the WorkSpace was created from.

        • SubnetId (string) --

          The identifier of the subnet that the WorkSpace is in.

        • ErrorMessage (string) --

          If the WorkSpace could not be created, this contains a textual error message that describes the failure.

        • ErrorCode (string) --

          If the WorkSpace could not be created, this contains the error code.

        • ComputerName (string) --

          The name of the WorkSpace as seen by the operating system.

        • VolumeEncryptionKey (string) --

          The KMS key used to encrypt data stored on your WorkSpace.

        • UserVolumeEncryptionEnabled (boolean) --

          Specifies whether the data stored on the user volume, or D: drive, is encrypted.

        • RootVolumeEncryptionEnabled (boolean) --

          Specifies whether the data stored on the root volume, or C: drive, is encrypted.