调用ListTrustedServiceStatus查询企业管理账号或委派管理员账号已启用的可信服务列表。

说明 该接口仅限企业管理账号或委派管理员账号使用。

本文将提供一个示例,查询企业管理账号已启用的可信服务列表。返回结果显示该企业管理账号已启用的可信服务为配置审计和操作审计。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListTrustedServiceStatus

要执行的操作。取值:ListTrustedServiceStatus

PageNumber Integer 1

页码。

起始值:1。默认值:1。

PageSize Integer 10

分页时每页显示的数据行数。

取值范围:1~100。默认值:10。

AdminAccountId String 177242285274****

企业管理账号或委派管理员账号。取值:

  • 企业管理账号(默认值):查询企业管理账号已启用的可信服务列表。
  • 委派管理员账号:查询委派管理员账号已启用的可信服务列表。

关于可信服务和委派管理员的更多信息,请参见可信服务概述管理委派管理员账号

关于公共请求参数的详情,请参见公共参数

返回数据

名称 类型 示例值 描述
TotalCount Integer 2

数据总条数。

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

请求ID。

PageSize Integer 10

分页时每页显示的数据行数。

PageNumber Integer 1

页码。

EnabledServicePrincipals Array of EnabledServicePrincipal

已启用的可信服务列表。

EnabledServicePrincipal
ServicePrincipal String config.aliyuncs.com

可信服务标识。

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

启用可信服务的时间。

示例

请求示例

https://resourcemanager.aliyuncs.com/?Action=ListTrustedServiceStatus
&<公共请求参数>

正常返回示例

XML格式

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格式

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"
    } ]
  }
}

错误码

HttpCode 错误码 错误信息 描述
404 EntityNotExists.ResourceDirectory The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. 当前账号未启用资源目录,请先启用资源目录。
409 InvalidParameter.AdminAccountId The specified account is not management account or delegated administrator account. 当前账号不是企业管理账号或委派管理员账号。

访问错误中心查看更多错误码。