查询当前账号的资源数量。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
 调试
        
            调试
        
    
授权信息
| 操作 | 访问级别 | 资源类型 | 条件关键字 | 关联操作 | 
| config:GetDiscoveredResourceCounts | get | *全部资源 
 | 无 | 无 | 
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 | 
| GroupByKey | string | 否 | 资源数量统计的分组维度。取值: 
 | ResourceType | 
| MultiAccount | boolean | 否 | 该参数计划于 2021 年 06 月 30 日 00 时 00 分 00 秒前下线,其替代功能账号组的 API 将于 2021 年 05 月 30 日 00 时 00 分 00 秒前上线。如果您正在使用该参数,建议您在 2021 年 05 月 30 日 00 时 00 分 00 秒之后切换为账号组的 API。关于账号组,请参见账号组。 | true | 
| MemberId | integer | 否 | 该参数计划于 2021 年 06 月 30 日 00 时 00 分 00 秒前下线,其替代功能账号组的 API 将于 2021 年 05 月 30 日 00 时 00 分 00 秒前上线。如果您正在使用该参数,建议您在 2021 年 05 月 30 日 00 时 00 分 00 秒之后切换为账号组的 API。关于账号组,请参见账号组。 | 120886317861**** | 
返回参数
| 名称 | 类型 | 描述 | 示例值 | 
| object | 无。 | ||
| GroupedResourceCounts | object | 资源数量查询结果。 | |
| GroupByKey | string | 资源统计的分组维度。 | ResourceType | 
| GroupedResourceCountList | array<object> | 资源数量列表。 | |
| object | 无。 | ||
| GroupName | string | 资源统计的分组名称。 | ACS::ECS::SecurityGroup | 
| ResourceCount | integer | 分组下统计的资源数量。 | 10 | 
| RequestId | string | 请求 ID。 | 54BFA4FB-6E08-4D58-9E83-1A8A3EC80247 | 
示例
正常返回示例
JSON格式
{
  "GroupedResourceCounts": {
    "GroupByKey": "ResourceType",
    "GroupedResourceCountList": [
      {
        "GroupName": "ACS::ECS::SecurityGroup",
        "ResourceCount": 10
      }
    ]
  },
  "RequestId": "54BFA4FB-6E08-4D58-9E83-1A8A3EC80247"
}错误码
| 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. | 服务不可用。 | 
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。