All Products
Search
Document Center

Resource Management:DeleteAccount

Last Updated:Feb 28, 2025

Deletes a member of the resource account type.

Operation description

Before you delete a member, we recommend that you call the CheckAccountDelete and GetAccountDeletionCheckResult operations to check whether the member meets deletion requirements. You can call the DeleteAccount operation to delete only members that meet the deletion requirements.

After you submit a deletion request for a member, you can call the GetAccountDeletionStatus operation to query the deletion status of the member. After a member is deleted, the resources and data within the member are deleted, and you can no longer use the member to log on to the Alibaba Cloud Management Console. In addition, the member cannot be recovered. Proceed with caution. For more information about how to delete a member, see Delete a member of the resource account type.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
resourcemanager:DeleteAccountdelete
*Account
acs:resourcemanager::{#accountId}:account/{#ResourceDirectoryPath}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AccountIdstringYes

The Alibaba Cloud account ID of the member that you want to delete.

169946124551****
AbandonableCheckIdarrayNo

The IDs of the check items that you can choose to ignore for the member deletion.

You can obtain the IDs from the response of the GetAccountDeletionCheckResult operation.

stringNo

The ID of a check item that you can choose to ignore for the member deletion.

You can obtain the ID from the response of the GetAccountDeletionCheckResult operation.

NON_SP_cs

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

009429F8-C1C0-5872-B674-A6C2333B9647
DeletionTypestring

The type of the deletion. Valid values:

  • 0: direct deletion. If the member does not have pay-as-you-go resources that are purchased within the previous 30 days, the system directly deletes the member.
  • 1: deletion with a silence period. If the member has pay-as-you-go resources that are purchased within the previous 30 days, the member enters a silence period. The system starts to delete the member until the silence period ends. For more information about the silence period, see What is the silence period for member deletion?
0

Examples

Sample success responses

JSONformat

{
  "RequestId": "009429F8-C1C0-5872-B674-A6C2333B9647",
  "DeletionType": "0"
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter.AccountIdYou must specify AccountId.The AccountId parameter is not configured.
400InvalidParameter.AccountIdThe AccountId is invalid.The value of the AccountId parameter is invalid. Specify a 16-digit ID.
404EntityNotExists.AccountThis resource directory account does not exist.The member does not exist. Create such a member first.
404EntityNotExists.ResourceDirectoryThe resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.The account is not used to enable a resource directory. Use the account to enable a resource directory first.
409AccountTypeOrStatusMismatchYou cannot perform the action on the member account.You cannot perform the operation on the member.
409NoLicense.ResourceDirectoryThe resource directory has not enabled the delete operation.The member deletion feature is disabled for the resource directory.
409UnknownError.AccountDelete failed. An unknown error occurred. Please try again later.-
409AccountNotExist.DeleteAccountThe deletion failed. The account does not exist. Please confirm whether it has been deleted.Delete failed. The account does not exist. Check whether the account is already deleted.
409ExistProcessingDeleteFlow.DeleteAccountThe request is invalid. The account is already in the process of deletion. Please do not repeat the operation.The request is invalid. The account is being deleted. Do not repeat the operation.
409CreditControlBlock.DeleteAccountThe deletion failed. There are unsettled bills in the current account. Please settle them first and try again.-
409SpBlock.DeleteAccountThe deletion failed. There is a specific product under the current account. Please clear it and try again.-
409PeripheralError.DeleteAccountThe deletion failed. The deletion process is abnormal. Please try again later.Delete failed. An exception occurred during the deletion. Try again later.
409MemberTypeError.DeleteAccountCloud account type members do not support deletion.Members of the cloud account type cannot be deleted.
409CallerIdentityError.DeleteAccountPlease use the RAM user or role of the management account to delete.Only a RAM user or RAM role within the management account can be used to perform this operation.
409ExistPrepaidInstance.DeleteAccountThe deletion failed. There are prepaid products under the current account. Please release them and try again.Delete failed. The current account has subscription resources. Release the resources and try again.
409ForbidDelete.AccountDelete is prohibited. The current account is abnormal. Please contact customer service.The current account is abnormal, and the deletion is prohibited. Contact customer service representatives.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-06The Error code has changedView Change Details