Amazon WorkSpaces

2019/11/15 - Amazon WorkSpaces - 5 new 1 updated api methods

Changes  Added APIs to register your directories with Amazon WorkSpaces and to modify directory details.

DeregisterWorkspaceDirectory (new) Link ¶

Deregisters the specified directory. This operation is asynchronous and returns before the WorkSpace directory is deregistered. If any WorkSpaces are registered to this directory, you must remove them before you can deregister the directory.

See also: AWS API Documentation

Request Syntax

client.deregister_workspace_directory(
    DirectoryId='string'
)
type DirectoryId

string

param DirectoryId

[REQUIRED]

The identifier of the directory. If any WorkSpaces are registered to this directory, you must remove them before you deregister the directory, or you will receive an OperationNotSupportedException error.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

RegisterWorkspaceDirectory (new) Link ¶

Registers the specified directory. This operation is asynchronous and returns before the WorkSpace directory is registered. If this is the first time you are registering a directory, you will need to create the workspaces_DefaultRole role before you can register a directory. For more information, see Creating the workspaces_DefaultRole Role.

See also: AWS API Documentation

Request Syntax

client.register_workspace_directory(
    DirectoryId='string',
    SubnetIds=[
        'string',
    ],
    EnableWorkDocs=True|False,
    EnableSelfService=True|False,
    Tenancy='DEDICATED'|'SHARED',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type DirectoryId

string

param DirectoryId

[REQUIRED]

The identifier of the directory. You cannot register a directory if it does not have a status of Active. If the directory does not have a status of Active, you will receive an InvalidResourceStateException error. If you have already registered the maximum number of directories that you can register with Amazon WorkSpaces, you will receive a ResourceLimitExceededException error. Deregister directories that you are not using for WorkSpaces, and try again.

type SubnetIds

list

param SubnetIds

The identifiers of the subnets for your virtual private cloud (VPC). Make sure that the subnets are in supported Availability Zones. The subnets must also be in separate Availability Zones. If these conditions are not met, you will receive an OperationNotSupportedException error.

  • (string) --

type EnableWorkDocs

boolean

param EnableWorkDocs

[REQUIRED]

Indicates whether Amazon WorkDocs is enabled or disabled. If you have enabled this parameter and WorkDocs is not available in the Region, you will receive an OperationNotSupportedException error. Set EnableWorkDocs to disabled, and try again.

type EnableSelfService

boolean

param EnableSelfService

Indicates whether self-service capabilities are enabled or disabled.

type Tenancy

string

param Tenancy

Indicates whether your WorkSpace directory is dedicated or shared. To use Bring Your Own License (BYOL) images, this value must be set to DEDICATED and your AWS account must be enabled for BYOL. If your account has not been enabled for BYOL, you will receive an InvalidParameterValuesException error. For more information about BYOL images, see Bring Your Own Windows Desktop Images.

type Tags

list

param Tags

The tags associated with the directory.

  • (dict) --

    Describes a tag.

    • Key (string) -- [REQUIRED]

      The key of the tag.

    • Value (string) --

      The value of the tag.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ModifySelfservicePermissions (new) Link ¶

Modifies the self-service WorkSpace management capabilities for your users. For more information, see Enable Self-Service WorkSpace Management Capabilities for Your Users.

See also: AWS API Documentation

Request Syntax

client.modify_selfservice_permissions(
    ResourceId='string',
    SelfservicePermissions={
        'RestartWorkspace': 'ENABLED'|'DISABLED',
        'IncreaseVolumeSize': 'ENABLED'|'DISABLED',
        'ChangeComputeType': 'ENABLED'|'DISABLED',
        'SwitchRunningMode': 'ENABLED'|'DISABLED',
        'RebuildWorkspace': 'ENABLED'|'DISABLED'
    }
)
type ResourceId

string

param ResourceId

[REQUIRED]

The identifier of the directory.

type SelfservicePermissions

dict

param SelfservicePermissions

[REQUIRED]

The permissions to enable or disable self-service capabilities.

  • RestartWorkspace (string) --

    Specifies whether users can restart their WorkSpace.

  • IncreaseVolumeSize (string) --

    Specifies whether users can increase the volume size of the drives on their WorkSpace.

  • ChangeComputeType (string) --

    Specifies whether users can change the compute type (bundle) for their WorkSpace.

  • SwitchRunningMode (string) --

    Specifies whether users can switch the running mode of their WorkSpace.

  • RebuildWorkspace (string) --

    Specifies whether users can rebuild the operating system of a WorkSpace to its original state.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ModifyWorkspaceAccessProperties (new) Link ¶

Specifies which devices and operating systems users can use to access their Workspaces. For more information, see Control Device Access.

See also: AWS API Documentation

Request Syntax

client.modify_workspace_access_properties(
    ResourceId='string',
    WorkspaceAccessProperties={
        'DeviceTypeWindows': 'ALLOW'|'DENY',
        'DeviceTypeOsx': 'ALLOW'|'DENY',
        'DeviceTypeWeb': 'ALLOW'|'DENY',
        'DeviceTypeIos': 'ALLOW'|'DENY',
        'DeviceTypeAndroid': 'ALLOW'|'DENY',
        'DeviceTypeChromeOs': 'ALLOW'|'DENY',
        'DeviceTypeZeroClient': 'ALLOW'|'DENY'
    }
)
type ResourceId

string

param ResourceId

[REQUIRED]

The identifier of the directory.

type WorkspaceAccessProperties

dict

param WorkspaceAccessProperties

[REQUIRED]

The device types and operating systems to enable or disable for access.

  • DeviceTypeWindows (string) --

    Indicates whether users can use Windows clients to access their WorkSpaces. To restrict WorkSpaces access to trusted devices (also known as managed devices) with valid certificates, specify a value of TRUST . For more information, see Restrict WorkSpaces Access to Trusted Devices.

  • DeviceTypeOsx (string) --

    Indicates whether users can use macOS clients to access their WorkSpaces. To restrict WorkSpaces access to trusted devices (also known as managed devices) with valid certificates, specify a value of TRUST . For more information, see Restrict WorkSpaces Access to Trusted Devices.

  • DeviceTypeWeb (string) --

    Indicates whether users can access their WorkSpaces through a web browser.

  • DeviceTypeIos (string) --

    Indicates whether users can use iOS devices to access their WorkSpaces.

  • DeviceTypeAndroid (string) --

    Indicates whether users can use Android devices to access their WorkSpaces.

  • DeviceTypeChromeOs (string) --

    Indicates whether users can use Chromebooks to access their WorkSpaces.

  • DeviceTypeZeroClient (string) --

    Indicates whether users can use zero client devices to access their WorkSpaces.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

ModifyWorkspaceCreationProperties (new) Link ¶

Modify the default properties used to create WorkSpaces.

See also: AWS API Documentation

Request Syntax

client.modify_workspace_creation_properties(
    ResourceId='string',
    WorkspaceCreationProperties={
        'EnableInternetAccess': True|False,
        'DefaultOu': 'string',
        'CustomSecurityGroupId': 'string',
        'UserEnabledAsLocalAdministrator': True|False,
        'EnableMaintenanceMode': True|False
    }
)
type ResourceId

string

param ResourceId

[REQUIRED]

The identifier of the directory.

type WorkspaceCreationProperties

dict

param WorkspaceCreationProperties

[REQUIRED]

The default properties for creating WorkSpaces.

  • EnableInternetAccess (boolean) --

    Indicates whether internet access is enabled for your WorkSpaces.

  • DefaultOu (string) --

    The default organizational unit (OU) for your WorkSpace directories.

  • CustomSecurityGroupId (string) --

    The identifier of your custom security group.

  • UserEnabledAsLocalAdministrator (boolean) --

    Indicates whether users are local administrators of their WorkSpaces.

  • EnableMaintenanceMode (boolean) --

    Indicates whether maintenance mode is enabled for your WorkSpaces. For more information, see WorkSpace Maintenance.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeWorkspaceDirectories (updated) Link ¶
Changes (request, response)
Request
{'Limit': 'integer'}
Response
{'Directories': {'SelfservicePermissions': {'ChangeComputeType': 'ENABLED | '
                                                                 'DISABLED',
                                            'IncreaseVolumeSize': 'ENABLED | '
                                                                  'DISABLED',
                                            'RebuildWorkspace': 'ENABLED | '
                                                                'DISABLED',
                                            'RestartWorkspace': 'ENABLED | '
                                                                'DISABLED',
                                            'SwitchRunningMode': 'ENABLED | '
                                                                 'DISABLED'},
                 'Tenancy': 'DEDICATED | SHARED',
                 'WorkspaceAccessProperties': {'DeviceTypeAndroid': 'ALLOW | '
                                                                    'DENY',
                                               'DeviceTypeChromeOs': 'ALLOW | '
                                                                     'DENY',
                                               'DeviceTypeIos': 'ALLOW | DENY',
                                               'DeviceTypeOsx': 'ALLOW | DENY',
                                               'DeviceTypeWeb': 'ALLOW | DENY',
                                               'DeviceTypeWindows': 'ALLOW | '
                                                                    'DENY',
                                               'DeviceTypeZeroClient': 'ALLOW '
                                                                       '| '
                                                                       'DENY'},
                 'WorkspaceCreationProperties': {'EnableMaintenanceMode': 'boolean'}}}

Describes the available directories that are registered with Amazon WorkSpaces.

See also: AWS API Documentation

Request Syntax

client.describe_workspace_directories(
    DirectoryIds=[
        'string',
    ],
    Limit=123,
    NextToken='string'
)
type DirectoryIds

list

param DirectoryIds

The identifiers of the directories. If the value is null, all directories are retrieved.

  • (string) --

type Limit

integer

param Limit

The maximum number of directories to return.

type NextToken

string

param NextToken

If you received a NextToken from a previous call that was paginated, provide this token to receive the next set of results.

rtype

dict

returns

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,
                'EnableMaintenanceMode': True|False
            },
            'ipGroupIds': [
                'string',
            ],
            'WorkspaceAccessProperties': {
                'DeviceTypeWindows': 'ALLOW'|'DENY',
                'DeviceTypeOsx': 'ALLOW'|'DENY',
                'DeviceTypeWeb': 'ALLOW'|'DENY',
                'DeviceTypeIos': 'ALLOW'|'DENY',
                'DeviceTypeAndroid': 'ALLOW'|'DENY',
                'DeviceTypeChromeOs': 'ALLOW'|'DENY',
                'DeviceTypeZeroClient': 'ALLOW'|'DENY'
            },
            'Tenancy': 'DEDICATED'|'SHARED',
            'SelfservicePermissions': {
                'RestartWorkspace': 'ENABLED'|'DISABLED',
                'IncreaseVolumeSize': 'ENABLED'|'DISABLED',
                'ChangeComputeType': 'ENABLED'|'DISABLED',
                'SwitchRunningMode': 'ENABLED'|'DISABLED',
                'RebuildWorkspace': 'ENABLED'|'DISABLED'
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Directories (list) --

      Information about the directories.

      • (dict) --

        Describes a directory that is used 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.

          • (string) --

        • DnsIpAddresses (list) --

          The IP addresses of the DNS servers for the directory.

          • (string) --

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

            Specifies whether the directory is enabled for Amazon WorkDocs.

          • EnableInternetAccess (boolean) --

            Specifies whether to automatically assign a public IP address to WorkSpaces in this directory by default. If enabled, the public IP address allows outbound internet access from your WorkSpaces when you’re using an internet gateway in the Amazon VPC in which your WorkSpaces are located. If you're using a Network Address Translation (NAT) gateway for outbound internet access from your VPC, or if your WorkSpaces are in public subnets and you manually assign them Elastic IP addresses, you should disable this setting. This setting applies to new WorkSpaces that you launch or to existing WorkSpaces that you rebuild. For more information, see Configure a VPC for Amazon WorkSpaces.

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

            Specifies whether WorkSpace users are local administrators on their WorkSpaces.

          • EnableMaintenanceMode (boolean) --

            Specifies whether maintenance mode is enabled for WorkSpaces. For more information, see WorkSpace Maintenance.

        • ipGroupIds (list) --

          The identifiers of the IP access control groups associated with the directory.

          • (string) --

        • WorkspaceAccessProperties (dict) --

          The devices and operating systems that users can use to access Workspaces.

          • DeviceTypeWindows (string) --

            Indicates whether users can use Windows clients to access their WorkSpaces. To restrict WorkSpaces access to trusted devices (also known as managed devices) with valid certificates, specify a value of TRUST . For more information, see Restrict WorkSpaces Access to Trusted Devices.

          • DeviceTypeOsx (string) --

            Indicates whether users can use macOS clients to access their WorkSpaces. To restrict WorkSpaces access to trusted devices (also known as managed devices) with valid certificates, specify a value of TRUST . For more information, see Restrict WorkSpaces Access to Trusted Devices.

          • DeviceTypeWeb (string) --

            Indicates whether users can access their WorkSpaces through a web browser.

          • DeviceTypeIos (string) --

            Indicates whether users can use iOS devices to access their WorkSpaces.

          • DeviceTypeAndroid (string) --

            Indicates whether users can use Android devices to access their WorkSpaces.

          • DeviceTypeChromeOs (string) --

            Indicates whether users can use Chromebooks to access their WorkSpaces.

          • DeviceTypeZeroClient (string) --

            Indicates whether users can use zero client devices to access their WorkSpaces.

        • Tenancy (string) --

          Specifies whether the directory is dedicated or shared. To use Bring Your Own License (BYOL), this value must be set to DEDICATED . For more information, see Bring Your Own Windows Desktop Images.

        • SelfservicePermissions (dict) --

          The default self-service permissions for WorkSpaces in the directory.

          • RestartWorkspace (string) --

            Specifies whether users can restart their WorkSpace.

          • IncreaseVolumeSize (string) --

            Specifies whether users can increase the volume size of the drives on their WorkSpace.

          • ChangeComputeType (string) --

            Specifies whether users can change the compute type (bundle) for their WorkSpace.

          • SwitchRunningMode (string) --

            Specifies whether users can switch the running mode of their WorkSpace.

          • RebuildWorkspace (string) --

            Specifies whether users can rebuild the operating system of a WorkSpace to its original state.

    • NextToken (string) --

      The token to use to retrieve the next set of results, or null if no more results are available.