Creates a CloudSSO directory. Each management account can have only one directory.
Operation description
Operation description
A directory is a CloudSSO instance. You must create a directory before you can use CloudSSO. All CloudSSO resources are managed within the directory.
When you create a directory, you must select a region. Alibaba Cloud stores all directory data exclusively in the selected region. However, you can deploy Alibaba Cloud resources such as Elastic Compute Service (ECS) instances and ApsaraDB RDS instances in other regions, and use your cloud account to sign in and access resources across regions. Choose a region based on your security compliance requirements and the geographic location of your users. If you do not have strict compliance requirements, select the region closest to your users to reduce access latency. Supported regions: China (Shanghai), China (Hong Kong), US (Silicon Valley), and Germany (Frankfurt).
This topic provides an example of how to create a directory named example in the China (Shanghai) region.
Limits
-
You can create only one directory for a management account.
-
To change the region of a directory, you must delete the existing directory and then create a new one in a different region.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cloudsso:CreateDirectory |
create |
*Directory
|
None |
|
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DirectoryName |
string |
No |
The name of the directory. The name must be globally unique. The name can contain lowercase letters, digits, and hyphens (-). The name cannot start or end with a hyphen (-) and cannot contain two consecutive hyphens (-). The name cannot start with The name must be 2 to 64 characters in length. Note
If you do not specify this parameter, the system automatically generates a directory name. |
example |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| RequestId |
string |
The request ID. |
ADADC31D-90EE-5459-99B0-D83DF07769A3 |
| Directory |
object |
The information about the directory. |
|
| DirectoryId |
string |
The ID of the directory. |
d-00fc2p61**** |
| CreateTime |
string |
The time when the directory was created, in the ISO 8601 format of |
2021-10-10T04:04:04Z |
| UpdateTime |
string |
The time when the directory was last modified, in the ISO 8601 format of |
2021-10-10T04:04:04Z |
| Region |
string |
The region ID of the directory. |
cn-shanghai |
| DirectoryName |
string |
The name of the directory. |
example |
Examples
Success response
JSON format
{
"RequestId": "ADADC31D-90EE-5459-99B0-D83DF07769A3",
"Directory": {
"DirectoryId": "d-00fc2p61****",
"CreateTime": "2021-10-10T04:04:04Z",
"UpdateTime": "2021-10-10T04:04:04Z",
"Region": "cn-shanghai",
"DirectoryName": "example"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.