Table of Contents
A low-level client representing Amazon WorkSpaces:
import boto3
client = boto3.client('workspaces')
These are the available methods:
Associates the specified IP access control group with the specified directory.
See also: AWS API Documentation
Request Syntax
response = client.associate_ip_groups(
DirectoryId='string',
GroupIds=[
'string',
]
)
[REQUIRED]
The ID of the directory.
[REQUIRED]
The IDs of one or more IP access control groups.
dict
Response Syntax
{}
Response Structure
Adds one or more rules to the specified IP access control group.
This action gives users permission to access their WorkSpaces from the CIDR address ranges specified in the rules.
See also: AWS API Documentation
Request Syntax
response = client.authorize_ip_rules(
GroupId='string',
UserRules=[
{
'ipRule': 'string',
'ruleDesc': 'string'
},
]
)
[REQUIRED]
The ID of the group.
[REQUIRED]
The rules to add to the group.
Information about a rule for an IP access control group.
The IP address range, in CIDR notation.
The description.
dict
Response Syntax
{}
Response Structure
Check if an operation can be paginated.
Creates an IP access control group.
An IP access control group provides you with the ability to control the IP addresses from which users are allowed to access their WorkSpaces. To specify the CIDR address ranges, add rules to your IP access control group and then associate the group with your directory. You can add rules when you create the group or at any time using AuthorizeIpRules .
There is a default IP access control group associated with your directory. If you don't associate an IP access control group with your directory, the default group is used. The default group includes a default rule that allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for your directory.
See also: AWS API Documentation
Request Syntax
response = client.create_ip_group(
GroupName='string',
GroupDesc='string',
UserRules=[
{
'ipRule': 'string',
'ruleDesc': 'string'
},
]
)
[REQUIRED]
The name of the group.
The rules to add to the group.
Information about a rule for an IP access control group.
The IP address range, in CIDR notation.
The description.
dict
Response Syntax
{
'GroupId': 'string'
}
Response Structure
(dict) --
GroupId (string) --
The ID of the group.
Creates the specified tags for the specified WorkSpace.
See also: AWS API Documentation
Request Syntax
response = client.create_tags(
ResourceId='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
[REQUIRED]
The ID of the WorkSpace. To find this ID, use DescribeWorkspaces .
[REQUIRED]
The tags. Each WorkSpace can have a maximum of 50 tags.
Information about a tag.
The key of the tag.
The value of the tag.
dict
Response Syntax
{}
Response Structure
Creates one or more WorkSpaces.
This operation is asynchronous and returns before the WorkSpaces are created.
See also: AWS API Documentation
Request Syntax
response = 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'
},
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
)
[REQUIRED]
The WorkSpaces to create. You can specify up to 25 WorkSpaces.
Information used to create a WorkSpace.
The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.
The username of the user for the WorkSpace. This username must exist in the AWS Directory Service directory for the WorkSpace.
The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.
The KMS key used to encrypt data stored on your WorkSpace.
Indicates whether the data stored on the user volume is encrypted.
Indicates whether the data stored on the root volume is encrypted.
The WorkSpace properties.
The running mode. For more information, see Manage the WorkSpace Running Mode .
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
The size of the root volume.
The size of the user storage.
The compute type. For more information, see Amazon WorkSpaces Bundles .
The tags for the WorkSpace.
Information about a tag.
The key of the tag.
The value of the tag.
{
'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'
},
'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'
},
'ModificationStates': [
{
'Resource': 'ROOT_VOLUME'|'USER_VOLUME'|'COMPUTE_TYPE',
'State': 'UPDATE_INITIATED'|'UPDATE_IN_PROGRESS'
},
]
},
]
}
Response Structure
Information about the WorkSpaces that could not be created.
Information about a WorkSpace that could not be created.
Information about the WorkSpace.
The identifier of the AWS Directory Service directory for the WorkSpace. You can use DescribeWorkspaceDirectories to list the available directories.
The username of the user for the WorkSpace. This username must exist in the AWS Directory Service directory for the WorkSpace.
The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles to list the available bundles.
The KMS key used to encrypt data stored on your WorkSpace.
Indicates whether the data stored on the user volume is encrypted.
Indicates whether the data stored on the root volume is encrypted.
The WorkSpace properties.
The running mode. For more information, see Manage the WorkSpace Running Mode .
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
The size of the root volume.
The size of the user storage.
The compute type. For more information, see Amazon WorkSpaces Bundles .
The tags for the WorkSpace.
Information about a tag.
The key of the tag.
The value of the tag.
The error code.
The textual error message.
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.
Information about a WorkSpace.
The identifier of the WorkSpace.
The identifier of the AWS Directory Service directory for the WorkSpace.
The user for the WorkSpace.
The IP address of the WorkSpace.
The operational state of the WorkSpace.
The identifier of the bundle used to create the WorkSpace.
The identifier of the subnet for the WorkSpace.
If the WorkSpace could not be created, contains a textual error message that describes the failure.
If the WorkSpace could not be created, contains the error code.
The name of the WorkSpace, as seen by the operating system.
The KMS key used to encrypt data stored on your WorkSpace.
Indicates whether the data stored on the user volume is encrypted.
Indicates whether the data stored on the root volume is encrypted.
The properties of the WorkSpace.
The running mode. For more information, see Manage the WorkSpace Running Mode .
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
The size of the root volume.
The size of the user storage.
The compute type. For more information, see Amazon WorkSpaces Bundles .
The modification states of the WorkSpace.
Information about a WorkSpace modification.
The resource.
The modification state.
Deletes the specified IP access control group.
You cannot delete an IP access control group that is associated with a directory.
See also: AWS API Documentation
Request Syntax
response = client.delete_ip_group(
GroupId='string'
)
[REQUIRED]
The ID of the IP access control group.
{}
Response Structure
Deletes the specified tags from the specified WorkSpace.
See also: AWS API Documentation
Request Syntax
response = client.delete_tags(
ResourceId='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The ID of the WorkSpace. To find this ID, use DescribeWorkspaces .
[REQUIRED]
The tag keys.
dict
Response Syntax
{}
Response Structure
Describes one or more of your IP access control groups.
See also: AWS API Documentation
Request Syntax
response = client.describe_ip_groups(
GroupIds=[
'string',
],
NextToken='string',
MaxResults=123
)
The IDs of one or more IP access control groups.
dict
Response Syntax
{
'Result': [
{
'groupId': 'string',
'groupName': 'string',
'groupDesc': 'string',
'userRules': [
{
'ipRule': 'string',
'ruleDesc': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Result (list) --
Information about the IP access control groups.
(dict) --
Information about an IP access control group.
groupId (string) --
The ID of the group.
groupName (string) --
The name of the group.
groupDesc (string) --
The description of the group.
userRules (list) --
The rules.
(dict) --
Information about a rule for an IP access control group.
ipRule (string) --
The IP address range, in CIDR notation.
ruleDesc (string) --
The description.
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.
Describes the specified tags for the specified WorkSpace.
See also: AWS API Documentation
Request Syntax
response = client.describe_tags(
ResourceId='string'
)
[REQUIRED]
The ID of the WorkSpace. To find this ID, use DescribeWorkspaces .
{
'TagList': [
{
'Key': 'string',
'Value': 'string'
},
]
}
Response Structure
The tags.
Information about a tag.
The key of the tag.
The value of the tag.
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
response = client.describe_workspace_bundles(
BundleIds=[
'string',
],
Owner='string',
NextToken='string'
)
The IDs of the bundles. This parameter cannot be combined with any other filter.
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.
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'
}
},
],
'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.
Describes the available AWS Directory Service directories that are registered with Amazon WorkSpaces.
See also: AWS API Documentation
Request Syntax
response = client.describe_workspace_directories(
DirectoryIds=[
'string',
],
NextToken='string'
)
The identifiers of the directories. If the value is null, all directories are retrieved.
dict
Response Syntax
{
'Directories': [
{
'DirectoryId': 'string',
'Alias': 'string',
'DirectoryName': 'string',
'RegistrationCode': 'string',
'SubnetIds': [
'string',
],
'DnsIpAddresses': [
'string',
],
'CustomerUserName': 'string',
'IamRoleId': 'string',
'DirectoryType': 'SIMPLE_AD'|'AD_CONNECTOR',
'WorkspaceSecurityGroupId': 'string',
'State': 'REGISTERING'|'REGISTERED'|'DEREGISTERING'|'DEREGISTERED'|'ERROR',
'WorkspaceCreationProperties': {
'EnableWorkDocs': True|False,
'EnableInternetAccess': True|False,
'DefaultOu': 'string',
'CustomSecurityGroupId': 'string',
'UserEnabledAsLocalAdministrator': True|False
},
'ipGroupIds': [
'string',
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Directories (list) --
Information about the directories.
(dict) --
Information about an AWS Directory Service directory for use with Amazon WorkSpaces.
DirectoryId (string) --
The directory identifier.
Alias (string) --
The directory alias.
DirectoryName (string) --
The name of the directory.
RegistrationCode (string) --
The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory.
SubnetIds (list) --
The identifiers of the subnets used with the directory.
DnsIpAddresses (list) --
The IP addresses of the DNS servers for the directory.
CustomerUserName (string) --
The user name for the service account.
IamRoleId (string) --
The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf.
DirectoryType (string) --
The directory type.
WorkspaceSecurityGroupId (string) --
The identifier of the security group that is assigned to new WorkSpaces.
State (string) --
The state of the directory's registration with Amazon WorkSpaces
WorkspaceCreationProperties (dict) --
The default creation properties for all WorkSpaces in the directory.
EnableWorkDocs (boolean) --
Indicates whether the directory is enabled for Amazon WorkDocs.
EnableInternetAccess (boolean) --
The public IP address to attach to all WorkSpaces that are created or rebuilt.
DefaultOu (string) --
The organizational unit (OU) in the directory for the WorkSpace machine accounts.
CustomSecurityGroupId (string) --
The identifier of any security groups to apply to WorkSpaces when they are created.
UserEnabledAsLocalAdministrator (boolean) --
Indicates whether the WorkSpace user is an administrator on the WorkSpace.
ipGroupIds (list) --
The identifiers of the IP access control groups associated with the directory.
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.
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
response = client.describe_workspaces(
WorkspaceIds=[
'string',
],
DirectoryId='string',
UserName='string',
BundleId='string',
Limit=123,
NextToken='string'
)
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.
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'
},
'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.
Describes the connection status of the specified WorkSpaces.
See also: AWS API Documentation
Request Syntax
response = client.describe_workspaces_connection_status(
WorkspaceIds=[
'string',
],
NextToken='string'
)
The identifiers of the WorkSpaces. You can specify up to 25 WorkSpaces.
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) --
Information about 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. The connection state is unknown if the WorkSpace is stopped.
ConnectionStateCheckTimestamp (datetime) --
The timestamp of the connection state check.
LastKnownUserConnectionTimestamp (datetime) --
The timestamp of the last known user connection.
NextToken (string) --
The token to use to retrieve the next set of results, or null if there are no more results available.
Disassociates the specified IP access control group from the specified directory.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_ip_groups(
DirectoryId='string',
GroupIds=[
'string',
]
)
[REQUIRED]
The ID of the directory.
[REQUIRED]
The IDs of one or more IP access control groups.
dict
Response Syntax
{}
Response Structure
Generate a presigned url given a client, its method, and arguments
The presigned url
Create a paginator for an operation.
Returns an object that can wait for some condition.
Modifies the specified WorkSpace properties.
See also: AWS API Documentation
Request Syntax
response = client.modify_workspace_properties(
WorkspaceId='string',
WorkspaceProperties={
'RunningMode': 'AUTO_STOP'|'ALWAYS_ON',
'RunningModeAutoStopTimeoutInMinutes': 123,
'RootVolumeSizeGib': 123,
'UserVolumeSizeGib': 123,
'ComputeTypeName': 'VALUE'|'STANDARD'|'PERFORMANCE'|'POWER'|'GRAPHICS'
}
)
[REQUIRED]
The ID of the WorkSpace.
[REQUIRED]
The properties of the WorkSpace.
The running mode. For more information, see Manage the WorkSpace Running Mode .
The time after a user logs off when WorkSpaces are automatically stopped. Configured in 60 minute intervals.
The size of the root volume.
The size of the user storage.
The compute type. For more information, see Amazon WorkSpaces Bundles .
dict
Response Syntax
{}
Response Structure
Sets the state of the specified WorkSpace.
To maintain a WorkSpace without being interrupted, set the WorkSpace state to ADMIN_MAINTENANCE . WorkSpaces in this state do not respond to requests to reboot, stop, start, or rebuild. An AutoStop WorkSpace in this state is not stopped. Users can log into a WorkSpace in the ADMIN_MAINTENANCE state.
See also: AWS API Documentation
Request Syntax
response = client.modify_workspace_state(
WorkspaceId='string',
WorkspaceState='AVAILABLE'|'ADMIN_MAINTENANCE'
)
[REQUIRED]
The ID of the WorkSpace.
[REQUIRED]
The WorkSpace state.
dict
Response Syntax
{}
Response Structure
Reboots the specified WorkSpaces.
You cannot reboot a WorkSpace unless its state is AVAILABLE or UNHEALTHY .
This operation is asynchronous and returns before the WorkSpaces have rebooted.
See also: AWS API Documentation
Request Syntax
response = client.reboot_workspaces(
RebootWorkspaceRequests=[
{
'WorkspaceId': 'string'
},
]
)
[REQUIRED]
The WorkSpaces to reboot. You can specify up to 25 WorkSpaces.
Information used to reboot a WorkSpace.
The ID of the WorkSpace.
{
'FailedRequests': [
{
'WorkspaceId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
Response Structure
Information about the WorkSpaces that could not be rebooted.
Information about a WorkSpace that could not be rebooted ( RebootWorkspaces ), rebuilt ( RebuildWorkspaces ), terminated ( TerminateWorkspaces ), started ( StartWorkspaces ), or stopped ( StopWorkspaces ).
The identifier of the WorkSpace.
The error code.
The textual error message.
Rebuilds the specified WorkSpace.
You cannot rebuild a WorkSpace unless its state is AVAILABLE , ERROR , or UNHEALTHY .
Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. For more information, see Rebuild a WorkSpace .
This operation is asynchronous and returns before the WorkSpaces have been completely rebuilt.
See also: AWS API Documentation
Request Syntax
response = client.rebuild_workspaces(
RebuildWorkspaceRequests=[
{
'WorkspaceId': 'string'
},
]
)
[REQUIRED]
The WorkSpace to rebuild. You can specify a single WorkSpace.
Information used to rebuild a WorkSpace.
The ID of the WorkSpace.
{
'FailedRequests': [
{
'WorkspaceId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
Response Structure
Information about the WorkSpace if it could not be rebuilt.
Information about a WorkSpace that could not be rebooted ( RebootWorkspaces ), rebuilt ( RebuildWorkspaces ), terminated ( TerminateWorkspaces ), started ( StartWorkspaces ), or stopped ( StopWorkspaces ).
The identifier of the WorkSpace.
The error code.
The textual error message.
Removes one or more rules from the specified IP access control group.
See also: AWS API Documentation
Request Syntax
response = client.revoke_ip_rules(
GroupId='string',
UserRules=[
'string',
]
)
[REQUIRED]
The ID of the group.
[REQUIRED]
The rules to remove from the group.
dict
Response Syntax
{}
Response Structure
Starts the specified WorkSpaces.
You cannot start a WorkSpace unless it has a running mode of AutoStop and a state of STOPPED .
See also: AWS API Documentation
Request Syntax
response = client.start_workspaces(
StartWorkspaceRequests=[
{
'WorkspaceId': 'string'
},
]
)
[REQUIRED]
The WorkSpaces to start. You can specify up to 25 WorkSpaces.
Information used to start a WorkSpace.
The ID of the WorkSpace.
{
'FailedRequests': [
{
'WorkspaceId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
Response Structure
Information about the WorkSpaces that could not be started.
Information about a WorkSpace that could not be rebooted ( RebootWorkspaces ), rebuilt ( RebuildWorkspaces ), terminated ( TerminateWorkspaces ), started ( StartWorkspaces ), or stopped ( StopWorkspaces ).
The identifier of the WorkSpace.
The error code.
The textual error message.
Stops the specified WorkSpaces.
You cannot stop a WorkSpace unless it has a running mode of AutoStop and a state of AVAILABLE , IMPAIRED , UNHEALTHY , or ERROR .
See also: AWS API Documentation
Request Syntax
response = client.stop_workspaces(
StopWorkspaceRequests=[
{
'WorkspaceId': 'string'
},
]
)
[REQUIRED]
The WorkSpaces to stop. You can specify up to 25 WorkSpaces.
Information used to stop a WorkSpace.
The ID of the WorkSpace.
{
'FailedRequests': [
{
'WorkspaceId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
Response Structure
Information about the WorkSpaces that could not be stopped.
Information about a WorkSpace that could not be rebooted ( RebootWorkspaces ), rebuilt ( RebuildWorkspaces ), terminated ( TerminateWorkspaces ), started ( StartWorkspaces ), or stopped ( StopWorkspaces ).
The identifier of the WorkSpace.
The error code.
The textual error message.
Terminates the specified WorkSpaces.
Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is destroyed. If you need to archive any user data, contact Amazon Web Services before terminating the WorkSpace.
You can terminate a WorkSpace that is in any state except SUSPENDED .
This operation is asynchronous and returns before the WorkSpaces have been completely terminated.
See also: AWS API Documentation
Request Syntax
response = client.terminate_workspaces(
TerminateWorkspaceRequests=[
{
'WorkspaceId': 'string'
},
]
)
[REQUIRED]
The WorkSpaces to terminate. You can specify up to 25 WorkSpaces.
Information used to terminate a WorkSpace.
The ID of the WorkSpace.
{
'FailedRequests': [
{
'WorkspaceId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
Response Structure
Information about the WorkSpaces that could not be terminated.
Information about a WorkSpace that could not be rebooted ( RebootWorkspaces ), rebuilt ( RebuildWorkspaces ), terminated ( TerminateWorkspaces ), started ( StartWorkspaces ), or stopped ( StopWorkspaces ).
The identifier of the WorkSpace.
The error code.
The textual error message.
Replaces the current rules of the specified IP access control group with the specified rules.
See also: AWS API Documentation
Request Syntax
response = client.update_rules_of_ip_group(
GroupId='string',
UserRules=[
{
'ipRule': 'string',
'ruleDesc': 'string'
},
]
)
[REQUIRED]
The ID of the group.
[REQUIRED]
One or more rules.
Information about a rule for an IP access control group.
The IP address range, in CIDR notation.
The description.
dict
Response Syntax
{}
Response Structure
The available paginators are:
paginator = client.get_paginator('describe_workspace_bundles')
Creates an iterator that will paginate through responses from WorkSpaces.Client.describe_workspace_bundles().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
BundleIds=[
'string',
],
Owner='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The IDs of the bundles. This parameter cannot be combined with any other filter.
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.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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'
}
},
],
}
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.
paginator = client.get_paginator('describe_workspace_directories')
Creates an iterator that will paginate through responses from WorkSpaces.Client.describe_workspace_directories().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
DirectoryIds=[
'string',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The identifiers of the directories. If the value is null, all directories are retrieved.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'Directories': [
{
'DirectoryId': 'string',
'Alias': 'string',
'DirectoryName': 'string',
'RegistrationCode': 'string',
'SubnetIds': [
'string',
],
'DnsIpAddresses': [
'string',
],
'CustomerUserName': 'string',
'IamRoleId': 'string',
'DirectoryType': 'SIMPLE_AD'|'AD_CONNECTOR',
'WorkspaceSecurityGroupId': 'string',
'State': 'REGISTERING'|'REGISTERED'|'DEREGISTERING'|'DEREGISTERED'|'ERROR',
'WorkspaceCreationProperties': {
'EnableWorkDocs': True|False,
'EnableInternetAccess': True|False,
'DefaultOu': 'string',
'CustomSecurityGroupId': 'string',
'UserEnabledAsLocalAdministrator': True|False
},
'ipGroupIds': [
'string',
]
},
],
}
Response Structure
(dict) --
Directories (list) --
Information about the directories.
(dict) --
Information about an AWS Directory Service directory for use with Amazon WorkSpaces.
DirectoryId (string) --
The directory identifier.
Alias (string) --
The directory alias.
DirectoryName (string) --
The name of the directory.
RegistrationCode (string) --
The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory.
SubnetIds (list) --
The identifiers of the subnets used with the directory.
DnsIpAddresses (list) --
The IP addresses of the DNS servers for the directory.
CustomerUserName (string) --
The user name for the service account.
IamRoleId (string) --
The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf.
DirectoryType (string) --
The directory type.
WorkspaceSecurityGroupId (string) --
The identifier of the security group that is assigned to new WorkSpaces.
State (string) --
The state of the directory's registration with Amazon WorkSpaces
WorkspaceCreationProperties (dict) --
The default creation properties for all WorkSpaces in the directory.
EnableWorkDocs (boolean) --
Indicates whether the directory is enabled for Amazon WorkDocs.
EnableInternetAccess (boolean) --
The public IP address to attach to all WorkSpaces that are created or rebuilt.
DefaultOu (string) --
The organizational unit (OU) in the directory for the WorkSpace machine accounts.
CustomSecurityGroupId (string) --
The identifier of any security groups to apply to WorkSpaces when they are created.
UserEnabledAsLocalAdministrator (boolean) --
Indicates whether the WorkSpace user is an administrator on the WorkSpace.
ipGroupIds (list) --
The identifiers of the IP access control groups associated with the directory.
paginator = client.get_paginator('describe_workspaces')
Creates an iterator that will paginate through responses from WorkSpaces.Client.describe_workspaces().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
WorkspaceIds=[
'string',
],
DirectoryId='string',
UserName='string',
BundleId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
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.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
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'
},
'ModificationStates': [
{
'Resource': 'ROOT_VOLUME'|'USER_VOLUME'|'COMPUTE_TYPE',
'State': 'UPDATE_INITIATED'|'UPDATE_IN_PROGRESS'
},
]
},
],
}
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.