Specifies a member account in a resource directory as a delegated administrator account of a trusted service.

The delegated administrator account can be used to access the information of the resource directory and view the structure and member accounts of the resource directory. The delegated administrator account can also be used to perform service-related management operations in the trusted service on behalf of the enterprise management account.

Limits:

  • Only some trusted services support delegated administrator accounts. For more information, see Supported trusted services.
  • Only the enterprise management account of a resource directory or an authorized RAM user or RAM role of the enterprise management account can be used to call this operation.
  • The number of delegated administrator accounts that are allowed for a trusted service is defined by the trusted service.

In this example, the member account 181761095690**** is specified as a delegated administrator account of Cloud Firewall.

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 RegisterDelegatedAdministrator

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

AccountId String Yes 181761095690****

The ID of the member account in the resource directory.

ServicePrincipal String Yes cloudfw.aliyuncs.com

The identification of the trusted service.

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

Response parameters

Parameter Type Example Description
RequestId String 0A45FC8F-54D2-4A65-8338-25E5DEBDA304

The ID of the request.

Examples

Sample requests

https://resourcemanager.aliyuncs.com/?Action=RegisterDelegatedAdministrator
&AccountId=181761095690****
&ServicePrincipal=cloudfw.aliyuncs.com
&<Common request parameters>

Sample success responses

XML format

<RegisterDelegatedAdministratorResponse>
      <RequestId>0A45FC8F-54D2-4A65-8338-25E5DEBDA304</RequestId>
</RegisterDelegatedAdministratorResponse>

JSON format

{
  "RequestId": "0A45FC8F-54D2-4A65-8338-25E5DEBDA304"
}

Error codes

HTTP status code Error code Error message Description
409 InvalidParameter.ServicePrincipal The specified ServicePrincipal is invalid. The error message returned because the value of the ServicePrincipal parameter is invalid.
409 AccountAlreadyRegistered The specified account is already a delegated administrator for this service. The error message returned because the specified member account is already the delegated administrator account of the current trusted service.
409 DelegatedAccountNumberExceeded The maximum number of delegated administrators for the service principal is exceeded. The error message returned because the number of specified member accounts has exceeded the maximum number of delegated administrator accounts allowed for the trusted service.
409 CannotRegisterMasterAsDelegatedAdministrator You attempted to register the enterprise management account as a delegated administrator for the service. You can designate only a member account as a delegated administrator. The error message returned because you are not allowed to specify the enterprise management account as a delegated administrator account of a trusted service. You can specify only member accounts as delegated administrator accounts.

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