2016/08/18 - Amazon WorkSpaces - 4 new2 updated api methods
Changes Update workspaces client to latest version
Starts the specified WorkSpaces. The API only works with WorkSpaces that have RunningMode configured as AutoStop and the State set to “STOPPED.”
Request Syntax
client.start_workspaces( StartWorkspaceRequests=[ { 'WorkspaceId': 'string' }, ] )
list
[REQUIRED]
The requests.
(dict) --
Describes the start request.
WorkspaceId (string) --
The ID of the WorkSpace.
dict
Response Syntax
{ 'FailedRequests': [ { 'WorkspaceId': 'string', 'ErrorCode': 'string', 'ErrorMessage': 'string' }, ] }
Response Structure
(dict) --
FailedRequests (list) --
The failed requests.
(dict) --
Contains information about a WorkSpace that could not be rebooted ( RebootWorkspaces), rebuilt ( RebuildWorkspaces), terminated ( TerminateWorkspaces), started ( StartWorkspaces), or stopped ( StopWorkspaces).
WorkspaceId (string) --
The identifier of the WorkSpace.
ErrorCode (string) --
The error code.
ErrorMessage (string) --
The textual error message.
Describes the connection status of a specified WorkSpace.
Request Syntax
client.describe_workspaces_connection_status( WorkspaceIds=[ 'string', ], NextToken='string' )
list
An array of strings that contain the identifiers of the WorkSpaces.
(string) --
string
The next token of the request.
dict
Response Syntax
{ 'WorkspacesConnectionStatus': [ { 'WorkspaceId': 'string', 'ConnectionState': 'CONNECTED'|'DISCONNECTED'|'UNKNOWN', 'ConnectionStateCheckTimestamp': datetime(2015, 1, 1), 'LastKnownUserConnectionTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
WorkspacesConnectionStatus (list) --
The connection status of the WorkSpace.
(dict) --
Describes the connection status of a WorkSpace.
WorkspaceId (string) --
The ID of the WorkSpace.
ConnectionState (string) --
The connection state of the WorkSpace. Returns UNKOWN if the WorkSpace is in a Stopped state.
ConnectionStateCheckTimestamp (datetime) --
The timestamp of the connection state check.
LastKnownUserConnectionTimestamp (datetime) --
The timestamp of the last known user connection.
NextToken (string) --
The next token of the result.
Modifies the WorkSpace properties, including the RunningMode and AutoStop time.
Request Syntax
client.modify_workspace_properties( WorkspaceId='string', WorkspaceProperties={ 'RunningMode': 'AUTO_STOP'|'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 123 } )
string
[REQUIRED]
The ID of the WorkSpace.
dict
[REQUIRED]
The WorkSpace properties of the request.
RunningMode (string) --
The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
dict
Response Syntax
{}
Response Structure
(dict) --
Stops the specified WorkSpaces. The API only works with WorkSpaces that have RunningMode configured as AutoStop and the State set to AVAILABLE, IMPAIRED, UNHEALTHY, or ERROR.
Request Syntax
client.stop_workspaces( StopWorkspaceRequests=[ { 'WorkspaceId': 'string' }, ] )
list
[REQUIRED]
The requests.
(dict) --
Describes the stop request.
WorkspaceId (string) --
The ID of the WorkSpace.
dict
Response Syntax
{ 'FailedRequests': [ { 'WorkspaceId': 'string', 'ErrorCode': 'string', 'ErrorMessage': 'string' }, ] }
Response Structure
(dict) --
FailedRequests (list) --
The failed requests.
(dict) --
Contains information about a WorkSpace that could not be rebooted ( RebootWorkspaces), rebuilt ( RebuildWorkspaces), terminated ( TerminateWorkspaces), started ( StartWorkspaces), or stopped ( StopWorkspaces).
WorkspaceId (string) --
The identifier of the WorkSpace.
ErrorCode (string) --
The error code.
ErrorMessage (string) --
The textual error message.
{'Workspaces': {'WorkspaceProperties': {'RunningMode': 'AUTO_STOP | ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 'integer'}}}Response
{'FailedRequests': {'WorkspaceRequest': {'WorkspaceProperties': {'RunningMode': 'AUTO_STOP ' '| ' 'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 'integer'}}}, 'PendingRequests': {'State': {'MAINTENANCE', 'STARTING', 'STOPPED', 'STOPPING'}, 'WorkspaceProperties': {'RunningMode': 'AUTO_STOP | ' 'ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 'integer'}}}
Creates one or more WorkSpaces.
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 }, 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }, ] )
list
[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.
WorkspaceProperties (dict) --
Describes the properties of a WorkSpace.
RunningMode (string) --
The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
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.
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 }, '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'|'TERMINATING'|'TERMINATED'|'SUSPENDED'|'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 } }, ] }
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 FailedCreateWorkspaceRequest$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.
WorkspaceProperties (dict) --
Describes the properties of a WorkSpace.
RunningMode (string) --
The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
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.
WorkspaceProperties (dict) --
Describes the properties of a WorkSpace.
RunningMode (string) --
The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
{'Workspaces': {'State': {'MAINTENANCE', 'STARTING', 'STOPPED', 'STOPPING'}, 'WorkspaceProperties': {'RunningMode': 'AUTO_STOP | ALWAYS_ON', 'RunningModeAutoStopTimeoutInMinutes': 'integer'}}}
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' )
list
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 it returns is not immediately available. If you immediately call DescribeWorkspaces with this identifier, no information is returned.
(string) --
string
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.
string
Used with the DirectoryId parameter to specify the directory user for whom to obtain the WorkSpace.
string
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.
integer
The maximum number of items to return.
string
The NextToken value from a previous call to this operation. Pass null if this is the first call.
dict
Response Syntax
{ 'Workspaces': [ { 'WorkspaceId': 'string', 'DirectoryId': 'string', 'UserName': 'string', 'IpAddress': 'string', 'State': 'PENDING'|'AVAILABLE'|'IMPAIRED'|'UNHEALTHY'|'REBOOTING'|'STARTING'|'REBUILDING'|'MAINTENANCE'|'TERMINATING'|'TERMINATED'|'SUSPENDED'|'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 } }, ], '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.
WorkspaceProperties (dict) --
Describes the properties of a WorkSpace.
RunningMode (string) --
The running mode of the WorkSpace. AlwaysOn WorkSpaces are billed monthly. AutoStop WorkSpaces are billed by the hour and stopped when no longer being used in order to save on costs.
RunningModeAutoStopTimeoutInMinutes (integer) --
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
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 time frame.