You need to enable JavaScript to run this app.
导航
PostApiV1OverviewDescribeAssetInfo - 获取多云资产概况
最近更新时间:2024.11.06 17:01:32首次发布时间:2024.11.06 17:01:32

获取资产概况信息,如:资产覆盖情况、有风险资产数量、无风险资产数量等。

请求说明

  • 请求方式: POST
  • 请求地址: https://open.volcengineapi.com/?Action=PostApiV1OverviewDescribeAssetInfo&Version=2023-05-01

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

PostApiV1OverviewDescribeAssetInfo

要执行的操作,取值:PostApiV1OverviewDescribeAssetInfo。

Version
String

2023-05-01

API的版本,取值:2023-05-01。

resource_cloud_account_list
Array of Object

--

云账号列表

resource_vendor
Array of String

[
"volcengine",
"aliyun",
"tencent"
]

资源云厂商列表

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
total
Long

1732

资产总数

risk
Long

1013

风险资产数

riskless
Long

719

无风险资产数

resource_info
Array of Object

--

资源信息

risk_top
Array of Object

--

潜在风险资源 TOP

protect_stats
Object

--

防护统计

请求示例

POST /?Action=PostApiV1OverviewDescribeAssetInfo&Version=2023-05-01 HTTP/1.1
Host: open.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20241105T034513Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241105/cn-beijing/mcs/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
  "resource_cloud_account_list": [
    {
      "resource_vendor": "volcengine",
      "resource_cloud_account_id": "900000000123"
    }
  ],
  "resource_vendor": [
    "volcengine"
  ]
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202411051145390562121680093C5287",
    "Action": "PostApiV1OverviewDescribeAssetInfo",
    "Version": "2023-05-01",
    "Service": "mcs",
    "Region": "cn-beijing"
  },
  "Result": {
    "total": 1732,
    "risk": 1013,
    "riskless": 719,
    "resource_info": [
      {
        "resource_type": "ComputeVm",
        "total": 99,
        "risk": 93,
        "riskless": 6
      }
    ],
    "risk_top": [
      {
        "resource_id": "volc:an-oss-bucket",
        "resource_name": "测试储存桶1",
        "resource_type": "StorageOssBucket",
        "resource_vendor": "volcengine",
        "resource_cloud_account_id": "900000000123",
        "total_strategy": 10,
        "risk_strategy": 10
      }
    ],
    "protect_stats": {
      "protect": 19,
      "not_protect": 6,
      "protect_exception": 2,
      "unknown": 94
    }
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidParameter
The specified parameter %s is invalid.

无效参数

400
OperationDenied
Operation is denied because the specified resource is in use.

操作被拒绝

400
MissingParameter
The required parameter %s is missing.

缺失参数

500
InternalError
The request has failed due to an unknown error.

内部错误