Enables or disables the member deletion feature.

Usage notes

Members of the resource account type can be deleted only after the member deletion feature is enabled.

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 SetMemberDeletionPermission

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

Status String Yes Enabled

Specifies whether to enable the member deletion feature. Valid values:

  • Enabled: enables the member deletion feature
  • Disabled: disables the member deletion feature

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

Response parameters

Parameter Type Example Description
RequestId String C55A4CAA-9039-1DDF-91CE-FCC134513D29

The ID of the request.

MemberDeletionStatus String Enabled

The status of the member deletion feature. Valid values:

  • Enabled: The feature is enabled.
  • Disabled: The feature is disabled.
ManagementAccountId String 151266687691****

The ID of the management account of the resource directory.

ResourceDirectoryId String rd-3G****

The ID of the resource directory.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=SwitchMemberDeletionPermission
&Status=Enabled
&<Common request parameters>

Sample success responses

XML format

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

<SetMemberDeletionPermissionResponse>
    <ResourceDirectoryId>rd-3G****</ResourceDirectoryId>
    <RequestId>C55A4CAA-9039-1DDF-91CE-FCC134513D29</RequestId>
    <MemberDeletionStatus>Enabled</MemberDeletionStatus>
    <ManagementAccountId>151266687691****</ManagementAccountId>
</SetMemberDeletionPermissionResponse>

JSON format

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

{
  "ResourceDirectoryId" : "rd-3G****",
  "RequestId" : "C55A4CAA-9039-1DDF-91CE-FCC134513D29",
  "MemberDeletionStatus" : "Enabled",
  "ManagementAccountId" : "151266687691****"
}

Error codes

HTTP status code Error code Error message Description
400 InvalidParameter.Status The specified Status is invalid. The error message returned because the value of the Status parameter is invalid.
403 MemberAccountAccessDenied The member account is not allowed to perform the operation. The error message returned because a member cannot be used to perform the operation.
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.

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