Removes a member of the cloud account type. After you remove a member of the cloud account type, the member is no longer managed by the management account of the resource directory to which the member belonged.

Usage notes

In a resource directory, members of the resource account type are resource containers that are created by using the management account of the resource directory. You cannot remove such members from the resource directory. For security purposes, you can use these members only within the resource directory.

In this example, the member 177242285274**** is removed.

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 RemoveCloudAccount

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

AccountId String Yes 177242285274****

The ID of the Alibaba Cloud account that corresponds to the member.

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

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=RemoveCloudAccount
&AccountId=177242285274****
&<Common request parameters>

Sample success responses

XML format

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

<?xml version="1.0" encoding="UTF-8" ?>
<RemoveCloudAccountResponse>
  <RequestId>9B34724D-54B0-4A51-B34D-4512372FE1BE</RequestId>
</RemoveCloudAccountResponse>

JSON format

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

{
  "RequestId" : "9B34724D-54B0-4A51-B34D-4512372FE1BE"
}

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 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 the operation on the member.
409 Deny.TrustedService You attempted to remove an account that is used in %s. To complete this operation, you must first remove this account from the Trusted Service. The error message returned because the current account is used in a trusted service. Remove the account from the trusted service first.

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