WorkSpaces / Client / register_workspace_directory



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

response = client.register_workspace_directory(
            'Key': 'string',
            'Value': 'string'
  • DirectoryId (string) –


    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.

  • SubnetIds (list) –

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

  • EnableWorkDocs (boolean) –


    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.

  • EnableSelfService (boolean) – Indicates whether self-service capabilities are enabled or disabled.

  • Tenancy (string) – 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 Amazon Web Services 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.

  • Tags (list) –

    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.

Return type:



Response Syntax


Response Structure

  • (dict) –


  • WorkSpaces.Client.exceptions.InvalidParameterValuesException

  • WorkSpaces.Client.exceptions.ResourceNotFoundException

  • WorkSpaces.Client.exceptions.ResourceLimitExceededException

  • WorkSpaces.Client.exceptions.AccessDeniedException

  • WorkSpaces.Client.exceptions.WorkspacesDefaultRoleNotFoundException

  • WorkSpaces.Client.exceptions.InvalidResourceStateException

  • WorkSpaces.Client.exceptions.UnsupportedNetworkConfigurationException

  • WorkSpaces.Client.exceptions.OperationNotSupportedException