Deletes a directory.

Prerequisites

No resources are contained in the directory that you want to delete.

Usage notes

This topic provides an example on how to delete a directory whose ID is d-00fc2p61****.

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

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 DeleteDirectory

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

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

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.

Examples

Sample requests

https://[Endpoint]/?Action=DeleteDirectory
&DirectoryId=d-00fc2p61****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DeleteDirectoryResponse>
    <RequestId>B182C041-8C64-5F2F-A07B-FC67FAF89CF9</RequestId>
</DeleteDirectoryResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "B182C041-8C64-5F2F-A07B-FC67FAF89CF9"
}

Error codes

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