RegisterWorkspaceDirectory - Amazon WorkSpaces Service

RegisterWorkspaceDirectory

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.

Request Syntax

{ "ActiveDirectoryConfig": { "DomainName": "string", "ServiceAccountSecretArn": "string" }, "DirectoryId": "string", "EnableSelfService": boolean, "EnableWorkDocs": boolean, "IdcInstanceArn": "string", "MicrosoftEntraConfig": { "ApplicationConfigSecretArn": "string", "TenantId": "string" }, "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ], "Tenancy": "string", "UserIdentityType": "string", "WorkspaceDirectoryDescription": "string", "WorkspaceDirectoryName": "string", "WorkspaceType": "string" }

Request Parameters

The request accepts the following data in JSON format.

ActiveDirectoryConfig

The active directory config of the directory.

Type: ActiveDirectoryConfig object

Required: No

DirectoryId

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: String

Length Constraints: Minimum length of 10. Maximum length of 65.

Pattern: ^(d-[0-9a-f]{8,63}$)|(wsd-[0-9a-z]{8,63}$)

Required: No

EnableSelfService

Indicates whether self-service capabilities are enabled or disabled.

Type: Boolean

Required: No

EnableWorkDocs

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: Boolean

Required: No

IdcInstanceArn

The Amazon Resource Name (ARN) of the identity center instance.

Type: String

Pattern: ^arn:aws[a-z-]{0,7}:[A-Za-z0-9][A-za-z0-9_/.-]{0,62}:[A-za-z0-9_/.-]{0,63}:[A-za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.\\-]{0,1023}$

Required: No

MicrosoftEntraConfig

The details about Microsoft Entra config.

Type: MicrosoftEntraConfig object

Required: No

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.

Type: Array of strings

Array Members: Maximum number of 2 items.

Length Constraints: Minimum length of 15. Maximum length of 24.

Pattern: ^(subnet-([0-9a-f]{8}|[0-9a-f]{17}))$

Required: No

Tags

The tags associated with the directory.

Type: Array of Tag objects

Required: No

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: String

Valid Values: DEDICATED | SHARED

Required: No

UserIdentityType

The type of identity management the user is using.

Type: String

Valid Values: CUSTOMER_MANAGED | AWS_DIRECTORY_SERVICE | AWS_IAM_IDENTITY_CENTER

Required: No

WorkspaceDirectoryDescription

Description of the directory to register.

Type: String

Pattern: ^([a-zA-Z0-9_])[\\a-zA-Z0-9_@#%*+=:?./!\s-]{1,255}$

Required: No

WorkspaceDirectoryName

The name of the directory to register.

Type: String

Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_.\s-]{1,64}$

Required: No

WorkspaceType

Indicates whether the directory's WorkSpace type is personal or pools.

Type: String

Valid Values: PERSONAL | POOLS

Required: No

Response Syntax

{ "DirectoryId": "string", "State": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

DirectoryId

The identifier of the directory.

Type: String

Length Constraints: Minimum length of 10. Maximum length of 65.

Pattern: ^(d-[0-9a-f]{8,63}$)|(wsd-[0-9a-z]{8,63}$)

State

The registration status of the WorkSpace directory.

Type: String

Valid Values: REGISTERING | REGISTERED | DEREGISTERING | DEREGISTERED | ERROR

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

The user is not authorized to access a resource.

HTTP Status Code: 400

InvalidParameterValuesException

One or more parameter values are not valid.

HTTP Status Code: 400

InvalidResourceStateException

The state of the resource is not valid for this operation.

HTTP Status Code: 400

OperationNotSupportedException

This operation is not supported.

HTTP Status Code: 400

ResourceAlreadyExistsException

The specified resource already exists.

HTTP Status Code: 400

ResourceLimitExceededException

Your resource limits have been exceeded.

HTTP Status Code: 400

ResourceNotFoundException

The resource could not be found.

HTTP Status Code: 400

UnsupportedNetworkConfigurationException

The configuration of this network is not supported for this operation, or your network configuration conflicts with the Amazon WorkSpaces management network IP range. For more information, see Configure a VPC for Amazon WorkSpaces.

HTTP Status Code: 400

WorkspacesDefaultRoleNotFoundException

The workspaces_DefaultRole role could not be found. 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.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: