Disables a resource directory. This operation cannot be undone. Therefore, exercise caution when you perform it.
Before you disable a resource directory, make sure that the following requirements are met:
- All member accounts must be removed from the resource directory. For more information about how to remove a member account, see RemoveCloudAccount.
- All folders except the root folder must be deleted from the resource directory. For more information about how to delete a folder, see DeleteFolder.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DestroyResourceDirectory |
The operation that you want to perform. Set the value to DestroyResourceDirectory. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 9B34724D-54B0-4A51-B34D-4512372FE1BE |
The ID of the request. |
Examples
Sample requests
https://resourcemanager.aliyuncs.com/?Action=DestroyResourceDirectory
&<Common request parameters>
Sample success responses
XML
format
<DestroyResourceDirectoryResponse>
<RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
</DestroyResourceDirectoryResponse>
JSON
format
{
"RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | The error message returned because the resource directory for the account is not enabled. Enable the resource directory for the account. |
409 | DeleteConflict.ResourceDirectory.Account | Failed to delete the resource directory because one or more member accounts exist. We recommend that you first remove these member accounts. | The error message returned because the resource directory contains member accounts. Remove the member accounts first. |
For a list of error codes, visit the API Error Center.