Deletes a folder.
Note Before you delete a folder, make sure that the folder does not contain any member
accounts or child folders.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DeleteFolder |
The operation that you want to perform. Set the value to DeleteFolder. |
FolderId | String | Yes | fd-ae1in7**** |
The ID of the folder. |
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=DeleteFolder
&FolderId=fd-ae1in7****
&<Common request parameters>
Sample success responses
XML
format
<DeleteFolderResponse>
<RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
</DeleteFolderResponse>
JSON
format
{
"RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter.FolderId | You must specify FolderId. | The error message returned because the FolderId parameter is not specified. Specify this parameter. |
400 | InvalidParameter.FolderId | The FolderId is invalid. | The error message returned because the value of the FolderId parameter is invalid. The value must start with r- followed by 6 characters or start with fd- followed by 10 characters. Valid characters are letters and digits. |
409 | DeleteConflict.Folder.SubFolder | This folder has sub folders. | The error message returned because the folder contains child folders. Delete the child folders first. |
409 | DeleteConflict.Folder.Account | This folder has accounts. | The error message returned because the folder contains member accounts. Remove the member accounts first. |
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. |
404 | EntityNotExists.Folder | The resource directory folder does not exist. | The error message returned because the folder does not exist. Create the folder first. |
For a list of error codes, visit the API Error Center.