Queries directories.
Usage notes
This topic provides an example on how to query the directories within your Alibaba
Cloud account. The returned result shows that only one directory with the ID d-00fc2p61****
is created within your Alibaba Cloud account.
Limits
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.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListDirectories |
The operation that you want to perform. Set the value to ListDirectories. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Directories | Array of Directory |
The directories. |
|
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. |
RequestId | String | 9A504392-F06D-5029-AB64-6654CB9F1DC1 |
The ID of the request. |
TotalCounts | Integer | 1 |
The number of directories. |
Examples
Sample requests
https://[Endpoint]/?Action=ListDirectories
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<ListDirectoriesResponse>
<Directories>
<DirectoryId>d-00fc2p61****</DirectoryId>
<CreateTime>2021-06-30T08:35:26Z</CreateTime>
<UpdateTime>2021-10-25T09:13:24Z</UpdateTime>
<Region>cn-shanghai</Region>
<DirectoryName>new-example</DirectoryName>
</Directories>
<RequestId>9A504392-F06D-5029-AB64-6654CB9F1DC1</RequestId>
<TotalCounts>1</TotalCounts>
</ListDirectoriesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Directories" : [ {
"DirectoryId" : "d-00fc2p61****",
"CreateTime" : "2021-06-30T08:35:26Z",
"UpdateTime" : "2021-10-25T09:13:24Z",
"Region" : "cn-shanghai",
"DirectoryName" : "new-example"
} ],
"RequestId" : "9A504392-F06D-5029-AB64-6654CB9F1DC1",
"TotalCounts" : 1
}
Error codes
For a list of error codes, visit the API Error Center.