Specifies a member 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 members 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 management account of the resource directory.

When you call this operation, you must take note of the following limits:

  • Only some trusted services support delegated administrator accounts. For more information, see Supported trusted services.
  • Only the management account of a resource directory or an authorized RAM user or RAM role of the 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.

This topic provides an example on how to call the API operation to specify the member 181761095690**** 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 in the resource directory.

ServicePrincipal String Yes cloudfw.aliyuncs.com

The identifier of the trusted service.

For more information, see the Trusted service identifier column in Supported trusted services.

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

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

<?xml version="1.0" encoding="UTF-8" ?>
<RegisterDelegatedAdministratorResponse>
	<RequestId>0A45FC8F-54D2-4A65-8338-25E5DEBDA304</RequestId>
</RegisterDelegatedAdministratorResponse>

JSON format

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

{
  "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 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 members has exceeded the maximum number of delegated administrator accounts allowed for the trusted service.
409 CannotRegisterMasterAsDelegatedAdministrator You attempted to register the management account as a delegated administrator for the service. You can designate only a member as a delegated administrator. The error message returned because you are not allowed to specify the management account of a resource directory as a delegated administrator account of a trusted service. You can specify only the members of a resource directory as delegated administrator accounts.

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