2018/10/19 - Amazon WorkSpaces - 4 updated api methods
Changes Update workspaces client to latest version
{'Workspaces': {'WorkspaceProperties': {'ComputeTypeName': {'GRAPHICSPRO', 'POWERPRO'}}}}Response
{'FailedRequests': {'WorkspaceRequest': {'WorkspaceProperties': {'ComputeTypeName': {'GRAPHICSPRO', 'POWERPRO'}}}}, 'PendingRequests': {'WorkspaceProperties': {'ComputeTypeName': {'GRAPHICSPRO', 'POWERPRO'}}}}
Creates one or more WorkSpaces.
This operation is asynchronous and returns before the WorkSpaces are created.
See also: AWS API Documentation
Request Syntax
client.create_workspaces( Workspaces=[ { 'DirectoryId': 'string', 'UserName': 'string', 'BundleId': 'string', 'VolumeEncryptionKey': 'string', 'UserVolumeEncryptionEnabled': True|False, 'RootVolumeEncryptionEnabled': True|False, 'WorkspaceProperties': { 'RunningMode': 'AUTO_STOP'|'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 123, 'RootVolumeSizeGib': 123, 'UserVolumeSizeGib': 123, 'ComputeTypeName': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'|'POWERPRO'|'GRAPHICSPRO' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] )
list
[REQUIRED]
The WorkSpaces to create. You can specify up to 25 WorkSpaces.
(dict) --
Information used to create a WorkSpace.
DirectoryId (string) -- [REQUIRED]
The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.
UserName (string) -- [REQUIRED]
The username of the user for the WorkSpace. This username must exist in the AWS Directory Service directory for the WorkSpace.
BundleId (string) -- [REQUIRED]
The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.
VolumeEncryptionKey (string) --
The KMS key used to encrypt data stored on your WorkSpace.
UserVolumeEncryptionEnabled (boolean) --
Indicates whether the data stored on the user volume is encrypted.
RootVolumeEncryptionEnabled (boolean) --
Indicates whether the data stored on the root volume is encrypted.
WorkspaceProperties (dict) --
The WorkSpace properties.
RunningMode (string) --
The running mode. For more information, see Manage the WorkSpace Running Mode.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
RootVolumeSizeGib (integer) --
The size of the root volume.
UserVolumeSizeGib (integer) --
The size of the user storage.
ComputeTypeName (string) --
The compute type. For more information, see Amazon WorkSpaces Bundles.
Tags (list) --
The tags for the WorkSpace.
(dict) --
Information about a tag.
Key (string) -- [REQUIRED]
The key of the tag.
Value (string) --
The value of the tag.
dict
Response Syntax
{ 'FailedRequests': [ { 'WorkspaceRequest': { 'DirectoryId': 'string', 'UserName': 'string', 'BundleId': 'string', 'VolumeEncryptionKey': 'string', 'UserVolumeEncryptionEnabled': True|False, 'RootVolumeEncryptionEnabled': True|False, 'WorkspaceProperties': { 'RunningMode': 'AUTO_STOP'|'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 123, 'RootVolumeSizeGib': 123, 'UserVolumeSizeGib': 123, 'ComputeTypeName': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'|'POWERPRO'|'GRAPHICSPRO' }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, 'ErrorCode': 'string', 'ErrorMessage': 'string' }, ], 'PendingRequests': [ { 'WorkspaceId': 'string', 'DirectoryId': 'string', 'UserName': 'string', 'IpAddress': 'string', 'State': 'PENDING'|'AVAILABLE'|'IMPAIRED'|'UNHEALTHY'|'REBOOTING'|'STARTING'|'REBUILDING'|'MAINTENANCE'|'ADMIN_MAINTENANCE'|'TERMINATING'|'TERMINATED'|'SUSPENDED'|'UPDATING'|'STOPPING'|'STOPPED'|'ERROR', 'BundleId': 'string', 'SubnetId': 'string', 'ErrorMessage': 'string', 'ErrorCode': 'string', 'ComputerName': 'string', 'VolumeEncryptionKey': 'string', 'UserVolumeEncryptionEnabled': True|False, 'RootVolumeEncryptionEnabled': True|False, 'WorkspaceProperties': { 'RunningMode': 'AUTO_STOP'|'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 123, 'RootVolumeSizeGib': 123, 'UserVolumeSizeGib': 123, 'ComputeTypeName': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'|'POWERPRO'|'GRAPHICSPRO' }, 'ModificationStates': [ { 'Resource': 'ROOT_VOLUME'|'USER_VOLUME'|'COMPUTE_TYPE', 'State': 'UPDATE_INITIATED'|'UPDATE_IN_PROGRESS' }, ] }, ] }
Response Structure
(dict) --
FailedRequests (list) --
Information about the WorkSpaces that could not be created.
(dict) --
Information about a WorkSpace that could not be created.
WorkspaceRequest (dict) --
Information about the WorkSpace.
DirectoryId (string) --
The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.
UserName (string) --
The username of the user for the WorkSpace. This username must exist in the AWS Directory Service directory for the WorkSpace.
BundleId (string) --
The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.
VolumeEncryptionKey (string) --
The KMS key used to encrypt data stored on your WorkSpace.
UserVolumeEncryptionEnabled (boolean) --
Indicates whether the data stored on the user volume is encrypted.
RootVolumeEncryptionEnabled (boolean) --
Indicates whether the data stored on the root volume is encrypted.
WorkspaceProperties (dict) --
The WorkSpace properties.
RunningMode (string) --
The running mode. For more information, see Manage the WorkSpace Running Mode.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
RootVolumeSizeGib (integer) --
The size of the root volume.
UserVolumeSizeGib (integer) --
The size of the user storage.
ComputeTypeName (string) --
The compute type. For more information, see Amazon WorkSpaces Bundles.
Tags (list) --
The tags for the WorkSpace.
(dict) --
Information about a tag.
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) --
Information about the WorkSpaces that were created.
Because this operation is asynchronous, the identifier returned is not immediately available for use with other operations. For example, if you call DescribeWorkspaces before the WorkSpace is created, the information returned can be incomplete.
(dict) --
Information about a WorkSpace.
WorkspaceId (string) --
The identifier of the WorkSpace.
DirectoryId (string) --
The identifier of the AWS Directory Service directory for the WorkSpace.
UserName (string) --
The user for the WorkSpace.
IpAddress (string) --
The IP address of the WorkSpace.
State (string) --
The operational state of the WorkSpace.
BundleId (string) --
The identifier of the bundle used to create the WorkSpace.
SubnetId (string) --
The identifier of the subnet for the WorkSpace.
ErrorMessage (string) --
If the WorkSpace could not be created, contains a textual error message that describes the failure.
ErrorCode (string) --
If the WorkSpace could not be created, 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) --
Indicates whether the data stored on the user volume is encrypted.
RootVolumeEncryptionEnabled (boolean) --
Indicates whether the data stored on the root volume is encrypted.
WorkspaceProperties (dict) --
The properties of the WorkSpace.
RunningMode (string) --
The running mode. For more information, see Manage the WorkSpace Running Mode.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
RootVolumeSizeGib (integer) --
The size of the root volume.
UserVolumeSizeGib (integer) --
The size of the user storage.
ComputeTypeName (string) --
The compute type. For more information, see Amazon WorkSpaces Bundles.
ModificationStates (list) --
The modification states of the WorkSpace.
(dict) --
Information about a WorkSpace modification.
Resource (string) --
The resource.
State (string) --
The modification state.
{'Bundles': {'ComputeType': {'Name': {'GRAPHICSPRO', 'POWERPRO'}}}}
Describes the available WorkSpace bundles.
You can filter the results using either bundle ID or owner, but not both.
See also: AWS API Documentation
Request Syntax
client.describe_workspace_bundles( BundleIds=[ 'string', ], Owner='string', NextToken='string' )
list
The IDs of the bundles. This parameter cannot be combined with any other filter.
(string) --
string
The owner of the bundles. This parameter cannot be combined with any other filter.
Specify AMAZON to describe the bundles provided by AWS or null to describe the bundles that belong to your account.
string
The token for the next set of results. (You received this token from a previous call.)
dict
Response Syntax
{ 'Bundles': [ { 'BundleId': 'string', 'Name': 'string', 'Owner': 'string', 'Description': 'string', 'RootStorage': { 'Capacity': 'string' }, 'UserStorage': { 'Capacity': 'string' }, 'ComputeType': { 'Name': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'|'POWERPRO'|'GRAPHICSPRO' } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Bundles (list) --
Information about the bundles.
(dict) --
Information about a WorkSpace bundle.
BundleId (string) --
The bundle identifier.
Name (string) --
The name of the bundle.
Owner (string) --
The owner of the bundle. This is the account identifier of the owner, or AMAZON if the bundle is provided by AWS.
Description (string) --
A description.
RootStorage (dict) --
The size of the root volume.
Capacity (string) --
The size of the root volume.
UserStorage (dict) --
The size of the user storage.
Capacity (string) --
The size of the user storage.
ComputeType (dict) --
The compute type. For more information, see Amazon WorkSpaces Bundles.
Name (string) --
The compute type.
NextToken (string) --
The token to use to retrieve the next set of results, or null if there are no more results available. This token is valid for one day and must be used within that time frame.
{'Workspaces': {'WorkspaceProperties': {'ComputeTypeName': {'GRAPHICSPRO', 'POWERPRO'}}}}
Describes the specified WorkSpaces.
You can filter the results using bundle ID, directory ID, or owner, but you can specify only one filter at a time.
See also: AWS API Documentation
Request Syntax
client.describe_workspaces( WorkspaceIds=[ 'string', ], DirectoryId='string', UserName='string', BundleId='string', Limit=123, NextToken='string' )
list
The IDs of the WorkSpaces. This parameter cannot be combined with any other filter.
Because the CreateWorkspaces operation is asynchronous, the identifier it returns is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
(string) --
string
The ID of the directory. In addition, you can optionally specify a specific directory user (see UserName). This parameter cannot be combined with any other filter.
string
The name of the directory user. You must specify this parameter with DirectoryId.
string
The ID of the bundle. All WorkSpaces that are created from this bundle are retrieved. This parameter cannot be combined with any other filter.
integer
The maximum number of items to return.
string
The token for the next set of results. (You received this token from a previous call.)
dict
Response Syntax
{ 'Workspaces': [ { 'WorkspaceId': 'string', 'DirectoryId': 'string', 'UserName': 'string', 'IpAddress': 'string', 'State': 'PENDING'|'AVAILABLE'|'IMPAIRED'|'UNHEALTHY'|'REBOOTING'|'STARTING'|'REBUILDING'|'MAINTENANCE'|'ADMIN_MAINTENANCE'|'TERMINATING'|'TERMINATED'|'SUSPENDED'|'UPDATING'|'STOPPING'|'STOPPED'|'ERROR', 'BundleId': 'string', 'SubnetId': 'string', 'ErrorMessage': 'string', 'ErrorCode': 'string', 'ComputerName': 'string', 'VolumeEncryptionKey': 'string', 'UserVolumeEncryptionEnabled': True|False, 'RootVolumeEncryptionEnabled': True|False, 'WorkspaceProperties': { 'RunningMode': 'AUTO_STOP'|'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 123, 'RootVolumeSizeGib': 123, 'UserVolumeSizeGib': 123, 'ComputeTypeName': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'|'POWERPRO'|'GRAPHICSPRO' }, 'ModificationStates': [ { 'Resource': 'ROOT_VOLUME'|'USER_VOLUME'|'COMPUTE_TYPE', 'State': 'UPDATE_INITIATED'|'UPDATE_IN_PROGRESS' }, ] }, ], 'NextToken': 'string' }
Response Structure
(dict) --
Workspaces (list) --
Information about the WorkSpaces.
Because CreateWorkspaces is an asynchronous operation, some of the returned information could be incomplete.
(dict) --
Information about a WorkSpace.
WorkspaceId (string) --
The identifier of the WorkSpace.
DirectoryId (string) --
The identifier of the AWS Directory Service directory for the WorkSpace.
UserName (string) --
The user for the WorkSpace.
IpAddress (string) --
The IP address of the WorkSpace.
State (string) --
The operational state of the WorkSpace.
BundleId (string) --
The identifier of the bundle used to create the WorkSpace.
SubnetId (string) --
The identifier of the subnet for the WorkSpace.
ErrorMessage (string) --
If the WorkSpace could not be created, contains a textual error message that describes the failure.
ErrorCode (string) --
If the WorkSpace could not be created, 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) --
Indicates whether the data stored on the user volume is encrypted.
RootVolumeEncryptionEnabled (boolean) --
Indicates whether the data stored on the root volume is encrypted.
WorkspaceProperties (dict) --
The properties of the WorkSpace.
RunningMode (string) --
The running mode. For more information, see Manage the WorkSpace Running Mode.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
RootVolumeSizeGib (integer) --
The size of the root volume.
UserVolumeSizeGib (integer) --
The size of the user storage.
ComputeTypeName (string) --
The compute type. For more information, see Amazon WorkSpaces Bundles.
ModificationStates (list) --
The modification states of the WorkSpace.
(dict) --
Information about a WorkSpace modification.
Resource (string) --
The resource.
State (string) --
The modification state.
NextToken (string) --
The token to use to retrieve the next set of results, or null if there are no more results available. This token is valid for one day and must be used within that time frame.
{'WorkspaceProperties': {'ComputeTypeName': {'GRAPHICSPRO', 'POWERPRO'}}}
Modifies the specified WorkSpace properties.
See also: AWS API Documentation
Request Syntax
client.modify_workspace_properties( WorkspaceId='string', WorkspaceProperties={ 'RunningMode': 'AUTO_STOP'|'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 123, 'RootVolumeSizeGib': 123, 'UserVolumeSizeGib': 123, 'ComputeTypeName': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'|'POWERPRO'|'GRAPHICSPRO' } )
string
[REQUIRED]
The ID of the WorkSpace.
dict
[REQUIRED]
The properties of the WorkSpace.
RunningMode (string) --
The running mode. For more information, see Manage the WorkSpace Running Mode.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
RootVolumeSizeGib (integer) --
The size of the root volume.
UserVolumeSizeGib (integer) --
The size of the user storage.
ComputeTypeName (string) --
The compute type. For more information, see Amazon WorkSpaces Bundles.
dict
Response Syntax
{}
Response Structure
(dict) --