2019/09/20 - Amazon WorkSpaces - 2 new2 updated api methods
Changes Update workspaces client to latest version
Restores the specified WorkSpace to its last known healthy state.
You cannot restore a WorkSpace unless its state is AVAILABLE, ERROR, or UNHEALTHY.
Restoring a WorkSpace is a potentially destructive action that can result in the loss of data. For more information, see Restore a WorkSpace.
This operation is asynchronous and returns before the WorkSpace is completely restored.
See also: AWS API Documentation
Request Syntax
client.restore_workspace( WorkspaceId='string' )
string
[REQUIRED]
The identifier of the WorkSpace.
dict
Response Syntax
{}
Response Structure
(dict) --
Describes the snapshots for the specified WorkSpace.
See also: AWS API Documentation
Request Syntax
client.describe_workspace_snapshots( WorkspaceId='string' )
string
[REQUIRED]
The identifier of the WorkSpace.
dict
Response Syntax
{ 'RebuildSnapshots': [ { 'SnapshotTime': datetime(2015, 1, 1) }, ], 'RestoreSnapshots': [ { 'SnapshotTime': datetime(2015, 1, 1) }, ] }
Response Structure
(dict) --
RebuildSnapshots (list) --
Information about the snapshots that can be used to rebuild a WorkSpace. These snapshots include the root volume.
(dict) --
Describes a snapshot.
SnapshotTime (datetime) --
The time when the snapshot was created.
RestoreSnapshots (list) --
Information about the snapshots that can be used to restore a WorkSpace. These snapshots include both the root volume and the user volume.
(dict) --
Describes a snapshot.
SnapshotTime (datetime) --
The time when the snapshot was created.
{'PendingRequests': {'State': {'RESTORING'}}}
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) --
Describes the 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) --
Describes 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'|'RESTORING'|'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) --
Describes a WorkSpace that cannot 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) --
Describes a tag.
Key (string) --
The key of the tag.
Value (string) --
The value of the tag.
ErrorCode (string) --
The error code that is returned if the WorkSpace cannot be created.
ErrorMessage (string) --
The text of the error message that is returned if the WorkSpace cannot be created.
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) --
Describes 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) --
The text of the error message that is returned if the WorkSpace cannot be created.
ErrorCode (string) --
The error code that is returned if the WorkSpace cannot be created.
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) --
Describes a WorkSpace modification.
Resource (string) --
The resource.
State (string) --
The modification state.
{'Workspaces': {'State': {'RESTORING'}}}
Describes the specified WorkSpaces.
You can filter the results by using the bundle identifier, directory identifier, 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 identifiers of the WorkSpaces. You cannot combine this parameter 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 identifier of the directory. In addition, you can optionally specify a specific directory user (see UserName). You cannot combine this parameter with any other filter.
string
The name of the directory user. You must specify this parameter with DirectoryId.
string
The identifier of the bundle. All WorkSpaces that are created from this bundle are retrieved. You cannot combine this parameter with any other filter.
integer
The maximum number of items to return.
string
If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.
dict
Response Syntax
{ 'Workspaces': [ { 'WorkspaceId': 'string', 'DirectoryId': 'string', 'UserName': 'string', 'IpAddress': 'string', 'State': 'PENDING'|'AVAILABLE'|'IMPAIRED'|'UNHEALTHY'|'REBOOTING'|'STARTING'|'REBUILDING'|'RESTORING'|'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) --
Describes 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) --
The text of the error message that is returned if the WorkSpace cannot be created.
ErrorCode (string) --
The error code that is returned if the WorkSpace cannot be created.
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) --
Describes 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 no more results are available.