Changes the name of a directory.

Usage notes

After you change the name of a directory, the URL that is used to log on to the Cloud SSO user portal is changed. You must notify the Cloud SSO users of the correct URL.

This topic provides an example on how to change the name of a directory to new-example.


You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateDirectory

The operation that you want to perform. Set the value to UpdateDirectory.

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

NewDirectoryName String No new-example

The new 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 have two consecutive hyphens (-). If you want to start the new name of the directory starts with d-, you must set this parameter to the ID of the directory.

The name must be 2 to 64 characters in length.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String B182C041-8C64-5F2F-A07B-FC67FAF89CF9

The ID of the request.

Directory Object

The information about the directory.

DirectoryId String d-00fc2p61****

The ID of the directory.

CreateTime String 2021-06-30T08:35:26Z

The time when the directory was created.

UpdateTime String 2021-10-25T09:13:24Z

The time when the directory was modified.

Region String cn-shanghai

The region ID of the directory.

DirectoryName String new-example

The name of the directory.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "B182C041-8C64-5F2F-A07B-FC67FAF89CF9",
  "Directory" : {
    "DirectoryId" : "d-00fc2p61****",
    "CreateTime" : "2021-06-30T08:35:26Z",
    "UpdateTime" : "2021-10-25T09:13:24Z",
    "Region" : "cn-shanghai",
    "DirectoryName" : "new-example"

Error codes

For a list of error codes, visit the API Error Center.