Queries the trusted services that are enabled within an enterprise management account or delegated administrator account.

Note Only an enterprise management account or delegated administrator account can be used to call this operation.

In this example, the trusted services that are enabled within an enterprise management account are queried. The returned result shows that the trusted services Cloud Config and ActionTrail are enabled within the enterprise management account.

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 ListTrustedServiceStatus

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

PageNumber Integer No 1

The number of the page to return.

Pages start from page 1. Default value: 1.

PageSize Integer No 10

The number of entries to return on each page.

Valid values: 1 to 100. Default value: 10.

AdminAccountId String No 177242285274****

The ID of the enterprise management account or delegated administrator account.

  • If you set this parameter to the ID of an enterprise management account, the trusted services that are enabled within the enterprise management account are queried. The default value of this parameter is the ID of an enterprise management account.
  • If you set this parameter to the ID of a delegated administrator account, the trusted services that are enabled within the delegated administrator account are queried.

For more information about trusted services and delegated administrator accounts, see Overview of trusted services and Delegated administrator accounts.

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

Response parameters

Parameter Type Example Description
TotalCount Integer 2

The total number of entries returned.

RequestId String CD76D376-2517-4924-92C5-DBC52262F93A

The ID of the request.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

EnabledServicePrincipals Array of EnabledServicePrincipal

The trusted services that are enabled.

EnabledServicePrincipal
ServicePrincipal String config.aliyuncs.com

The identification of the trusted service.

EnableTime String 2019-02-18T15:32:10.473Z

The time when the trusted service was enabled.

Examples

Sample requests

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

Sample success responses

XML format

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

<?xml version="1.0" encoding="UTF-8" ?>
<ListTrustedServiceStatusResponse>
    <EnabledServicePrincipal>
        <ServicePrincipal>config.aliyuncs.com</ServicePrincipal>
        <EnableTime>2019-02-18T15:32:10.473Z</EnableTime>
    </EnabledServicePrincipal>
    <EnabledServicePrincipal>
        <ServicePrincipal>actiontrail.aliyuncs.com</ServicePrincipal>
        <EnableTime>2019-02-16T15:32:10.473Z</EnableTime>
    </EnabledServicePrincipal>
    <RequestId>CD76D376-2517-4924-92C5-DBC52262F93A</RequestId>
</ListTrustedServiceStatusResponse>

JSON format

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

{
  "RequestId" : "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  "PageNumber" : 1,
  "PageSize" : 10,
  "TotalCount" : 2,
  "EnabledServicePrincipals" : {
    "EnabledServicePrincipal" : [ {
      "ServicePrincipal" : "config.aliyuncs.com",
      "EnableTime" : "2019-02-18T15:32:10.473Z"
    }, {
      "ServicePrincipal" : "actiontrail.aliyuncs.com",
      "EnableTime" : "2019-02-16T15:32:10.473Z"
    } ]
  }
}

Error codes

HTTP status code Error code Error message Description
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 resource directory for the account is not enabled. Enable the resource directory for the account.
409 InvalidParameter.AdminAccountId The specified account is not management account or delegated administrator account. The error message returned because the current account is not an enterprise management account or delegated administrator account.

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