Amazon WorkSpaces

2015/10/01 - Amazon WorkSpaces - 2 updated api methods

CreateWorkspaces (updated) Link ¶
Changes (request, response)
Request
{'Workspaces': {'RootVolumeEncryptionEnabled': 'boolean',
                'UserVolumeEncryptionEnabled': 'boolean',
                'VolumeEncryptionKey': 'string'}}
Response
{'FailedRequests': {'WorkspaceRequest': {'RootVolumeEncryptionEnabled': 'boolean',
                                         'UserVolumeEncryptionEnabled': 'boolean',
                                         'VolumeEncryptionKey': 'string'}},
 'PendingRequests': {'ComputerName': 'string',
                     'RootVolumeEncryptionEnabled': 'boolean',
                     'UserVolumeEncryptionEnabled': 'boolean',
                     'VolumeEncryptionKey': '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
        },
    ]
)
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.

rtype

dict

returns

Response Syntax

{
    'FailedRequests': [
        {
            'WorkspaceRequest': {
                'DirectoryId': 'string',
                'UserName': 'string',
                'BundleId': 'string',
                'VolumeEncryptionKey': 'string',
                'UserVolumeEncryptionEnabled': True|False,
                'RootVolumeEncryptionEnabled': True|False
            },
            '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.

        • 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.

DescribeWorkspaces (updated) Link ¶
Changes (response)
{'Workspaces': {'ComputerName': 'string',
                'RootVolumeEncryptionEnabled': 'boolean',
                'UserVolumeEncryptionEnabled': 'boolean',
                'VolumeEncryptionKey': 'string'}}

Obtains information about the specified WorkSpaces.

Only one of the filter parameters, such as BundleId , DirectoryId , or WorkspaceIds , can be specified at a time.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Request Syntax

client.describe_workspaces(
    WorkspaceIds=[
        'string',
    ],
    DirectoryId='string',
    UserName='string',
    BundleId='string',
    Limit=123,
    NextToken='string'
)
type WorkspaceIds

list

param WorkspaceIds

An array of strings that contain the identifiers of the WorkSpaces for which to retrieve information. This parameter cannot be combined with any other filter parameter.

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

  • (string) --

type DirectoryId

string

param DirectoryId

Specifies the directory identifier to which to limit the WorkSpaces. Optionally, you can specify a specific directory user with the UserName parameter. This parameter cannot be combined with any other filter parameter.

type UserName

string

param UserName

Used with the DirectoryId parameter to specify the directory user for which to obtain the WorkSpace.

type BundleId

string

param BundleId

The identifier of a bundle to obtain the WorkSpaces for. All WorkSpaces that are created from this bundle will be retrieved. This parameter cannot be combined with any other filter parameter.

type Limit

integer

param Limit

The maximum number of items to return.

type NextToken

string

param NextToken

The NextToken value from a previous call to this operation. Pass null if this is the first call.

rtype

dict

returns

Response Syntax

{
    'Workspaces': [
        {
            '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
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    Contains the results for the DescribeWorkspaces operation.

    • Workspaces (list) --

      An array of structures that contain the information about the WorkSpaces.

      Because the CreateWorkspaces operation is asynchronous, some of this information may be incomplete for a newly-created WorkSpace.

      • (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.

    • NextToken (string) --

      If not null, more results are available. Pass this value for the NextToken parameter in a subsequent call to this operation to retrieve the next set of items. This token is valid for one day and must be used within that timeframe.