CreateAlias
Creates an alias for a directory and assigns the alias to the directory. The alias is used
to construct the access URL for the directory, such as
http://<alias>.awsapps.com.
Important
After an alias has been created, it cannot be deleted or reused, so this operation should only be used when absolutely necessary.
Request Syntax
{
"Alias": "string",
"DirectoryId": "string"
}
Request Parameters
The request accepts the following data in JSON format.
- Alias
-
The requested alias.
The alias must be unique amongst all aliases in AWS. This operation throws an
EntityAlreadyExistsExceptionerror if the alias already exists.Type: String
Length Constraints: Minimum length of 1. Maximum length of 62.
Pattern:
^(?!D-|d-)([\da-zA-Z]+)([-]*[\da-zA-Z])*Required: Yes
- DirectoryId
-
The identifier of the directory for which to create the alias.
Type: String
Pattern:
^d-[0-9a-f]{10}$Required: Yes
Response Syntax
{
"Alias": "string",
"DirectoryId": "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.
- Alias
-
The alias for the directory.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 62.
Pattern:
^(?!D-|d-)([\da-zA-Z]+)([-]*[\da-zA-Z])* - DirectoryId
-
The identifier of the directory.
Type: String
Pattern:
^d-[0-9a-f]{10}$
Errors
For information about the errors that are common to all actions, see Common Error Types.
- ClientException
-
A client exception has occurred.
- Message
-
The descriptive message for the exception.
- RequestId
-
The AWS request identifier.
HTTP Status Code: 400
- EntityAlreadyExistsException
-
The specified entity already exists.
- Message
-
The descriptive message for the exception.
- RequestId