Performs a member deletion check.

Usage notes

Before you delete a member, you must call this API operation to check whether the member can be deleted.

This topic provides an example on how to call the API operation to perform a deletion check on the member whose ID is 179855839641****.

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 CheckAccountDelete

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

AccountId String Yes 179855839641****

The ID of the member that you want to delete.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 7CDDDCEF-CDFD-0825-B7D7-217BE0897B22

The ID of the request.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=CheckAccountDelete
&AccountId=179855839641****
&<Common request parameters>

Sample success responses

XML format

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

<CheckAccountDeleteResponse>
    <RequestId>7CDDDCEF-CDFD-0825-B7D7-217BE0897B22</RequestId>
</CheckAccountDeleteResponse>

JSON format

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

{
  "RequestId" : "7CDDDCEF-CDFD-0825-B7D7-217BE0897B22"
}

Error codes

HTTP status code Error code Error message Description
400 MissingParameter.AccountId You must specify AccountId. The error message returned because the AccountId parameter is not configured.
400 InvalidParameter.AccountId The AccountId is invalid. The error message returned because the value of the AccountId parameter is invalid. Specify a 16-digit ID.
404 EntityNotExists.Account This resource directory account does not exist. The error message returned because the member does not exist. Create such a member 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 current account has not been used to enable a resource directory. Use the account to enable a resource directory first.
409 AccountTypeOrStatusMismatch You cannot perform the action on the member account. The error message returned because you cannot perform this operation on the member.
409 InvalidControlPolicyEnablementStatus The control policy enablement status is not valid to perform this operation. The error message returned because the enabled access control policy does not allow you to perform this operation.
409 NoLicense.ResourceDirectory The resource directory has not enabled the delete operation. The error message returned because the member deletion feature is disabled.
409 UnknownError.Account The deletion failed. An unknown error occurred. Please try again later. The error message returned because an unknown error has occurred and the member fails to be deleted. Try again later.
409 CallerIdentityError.DeleteAccount Please use the RAM user or role of the management account to delete. The error message returned because only a RAM user or RAM role that has administrator permissions within the management account can be used to perform this operation.
409 RemoveConfilctAccountAsDelegatedAdministator You attempted to remove a member that is registered as a delegated administrator. To complete this operation, you must first deregister this account as a delegated administrator. The error message returned because the member is a delegated administrator account of a trusted service. Remove the delegated administrator account for the trusted service first.
409 LegalEntityDifferent The account legal entity is different from the one of the Management Account. The error message returned because the legal entity of the current account is inconsistent with the legal entity of the management account of the resource directory.
409 MemberTypeError.DeleteAccount You can only delete accounts of the resource account type created by Resource Directory. The error message returned because the member is of the cloud account type. You can delete only members of the resource account type.

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

What to do next

You can call the GetAccountDeletionCheckResult operation to query the deletion check result.