查询指定账号组内的资源列表。
接口说明
使用限制
因为配置审计仅支持部分阿里云服务和资源类型,所以资源清单中只展示部分资源。关于配置审计支持的云服务及资源类型,请参见配置审计支持的资源类型和资源关系。
使用说明
本文将提供一个示例,查询账号组ca-c560626622af0005****内某个成员100931896542****的资源列表。返回结果显示,资源列表中共有 8 个资源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
| config:ListAggregateDiscoveredResources | list | *全部资源 
 | 无 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| ResourceId | string | 否 | 资源 ID。 | eni-hp31cqoba96jagtz**** | 
| ResourceName | string | 否 | 资源名称 | launch-advisor-20200330 | 
| ResourceDeleted | integer | 否 | 资源状态。取值: 
 | 1 | 
| MaxResults | integer | 是 | 单次请求返回结果的最大条数。取值范围:1~100。 | 10 | 
| NextToken | string | 否 | 当请求的返回结果被截断时,您可以使用 | IWBjqMYSy0is7zSMGu16**** | 
| ResourceTypes | string | 否 | 资源类型。多个资源类型之间用半角逗号(,)分隔。 | ACS::ECS::NetworkInterface | 
| Regions | string | 否 | 资源归属的地域 ID。多个地域 ID 之间用半角逗号(,)分隔。 | cn-huhehaote | 
| AggregatorId | string | 是 | 账号组 ID。 关于如何获取账号组 ID,请参见 ListAggregators 。 | ca-c560626622af0005**** | 
| ResourceAccountId | integer | 否 | 账号组内待查询资源所属的阿里云账号 ID。 | 100931896542**** | 
| StartUpdateTimestamp | integer | 否 | 资源时间范围查询的开始时间,采用标准 UTC 时间戳。取值限制: 
 | 1722441600000 | 
| EndUpdateTimestamp | integer | 否 | 资源时间范围查询的截止时间,采用标准 UTC 时间戳。取值限制: 
 | 1724947200000 | 
| ExcludeResourceTypes | string | 否 | 排除的资源类型,多资源类型用逗号分隔,与 ResourceTypes 字段冲突时,该字段具有更高优先级。 | ACS::ECS::Instance,ACS::ECS::NetworkInterface | 
关于公共请求参数的详情,请参见公共参数。
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| object | 无。 | ||
| DiscoveredResourceProfiles | object | 资源列表。 | |
| DiscoveredResourceProfileList | array<object> | 资源列表详情。 | |
| object | 无。 | ||
| AccountId | integer | 资源拥有者的阿里云账号 ID。推荐使用 ResourceOwnerId 字段。 | 161259599160**** | 
| AvailabilityZone | string | 资源可用区。 | cn-huhehaote-a | 
| Region | string | 地域 ID。 | cn-huhehaote | 
| ResourceCreationTime | integer | 资源创建时间戳。单位:毫秒。 | 1618675206000 | 
| ResourceDeleted | integer | 资源状态。取值: 
 | 1 | 
| ResourceId | string | 资源 ID。 | eni-hp31cqoba96jagtz**** | 
| ResourceName | string | 资源名称。 | Cloud Firewall | 
| ResourceOwnerId | integer | 资源拥有者的阿里云账号 ID。 | 161259599160**** | 
| ResourceStatus | string | 资源状态。资源的状态取决于各云服务对其的定义,该参数可能为空。例如: 
 | InUse | 
| ResourceType | string | 资源类型。 | ACS::ECS::NetworkInterface | 
| Tags | string | 资源标签。 | {\"key1\":[\"value2\"]} | 
| UpdateTime | integer | 资源的最近一次更新时间,毫秒级时间戳。 | 1722441600000 | 
| Version | integer | 资源构建版本。 | 1 | 
| VpcId | string | 所属的 vpc ID,格式:vpc-t4nhheyvay74fp7n0hxxx,无所属 VPC 时返回空字符串: "" | vpc-t4nhheyvay74fp7n0hxxx | 
| VSwitchId | string | 所属的 vSwitch ID,格式:vsw-t4n7pokxxxxxxxxxxxxxx,多值时逗号分隔,如 vsw-t4n7pokxxxxxxxxxxxxxx,vsw-t4n7pokxxxxxxxxxxxxxx,无所属 VSWITCH 时返回为空字符串:"" | vsw-t4n7pokxxxxxxxxxxxxxx | 
| MaxResults | integer | 每页的最大记录数。 | 10 | 
| NextToken | string | 查询下一页使用的 Token。 | IWBjqMYSy0is7zSMGu16**** | 
| TotalCount | integer | 资源总数。 | 8 | 
| RequestId | string | 请求 ID。 | C7817373-78CB-4F9A-8AFA-E7A88E9D64A2 | 
示例
正常返回示例
JSON格式
{
  "DiscoveredResourceProfiles": {
    "DiscoveredResourceProfileList": [
      {
        "AccountId": 0,
        "AvailabilityZone": "cn-huhehaote-a",
        "Region": "cn-huhehaote",
        "ResourceCreationTime": 1618675206000,
        "ResourceDeleted": 1,
        "ResourceId": "eni-hp31cqoba96jagtz****",
        "ResourceName": "Cloud Firewall",
        "ResourceOwnerId": 0,
        "ResourceStatus": "InUse",
        "ResourceType": "ACS::ECS::NetworkInterface",
        "Tags": "{\\\"key1\\\":[\\\"value2\\\"]}",
        "UpdateTime": 1722441600000,
        "Version": 1,
        "VpcId": "vpc-t4nhheyvay74fp7n0hxxx",
        "VSwitchId": "vsw-t4n7pokxxxxxxxxxxxxxx"
      }
    ],
    "MaxResults": 10,
    "NextToken": "IWBjqMYSy0is7zSMGu16****",
    "TotalCount": 8
  },
  "RequestId": "C7817373-78CB-4F9A-8AFA-E7A88E9D64A2"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | NoPermission | You are not authorized to perform this operation. | 您无权执行此操作。 | 
| 400 | MemberNotBelongToMaster | The specified member does not belong to your organization. | |
| 404 | AccountNotExisted | Your account does not exist. | |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服务不可用。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。