更新时间:2025-11-05 GMT+08:00
分享

查询DCC容量

功能

查询DCC专属计算集群,即DCC专属计算集群中的CPU\MEM等计算资源总量、已分配使用量,剩余可用量等资源容量数据。

SLA项

定义

请求成功率

≥99%

可用性

Tier 2

数据一致性

强一致

吞吐量

60 次/分钟

TP50请求时延

200 ms

TP99.9请求时延

300 ms

注意事项

调用方法

GET

URI

/rest/dataapi/homs/open-api/v1/CloudService/capacity

路径参数

查询参数

请求

  • 请求header参数

    参数

    是否必选

    类型

    值域

    说明

    X-APIG-Appcode

    string

    由SRE分配的AppCode。

    x-auth-token

    string

    调用方APIG的IAM认证token。

    x-hcso-domainid

    是(HCSO场景)

    否(其他场景)

    string

    接入的租户ID。

    x-hcso-appcode

    string

    由SRE分配的AppCode

  • 查询参数

    参数

    是否必选

    类型

    值域

    说明

    begin_time

    int

    查询开始时间(毫秒时间戳)。

    end_time

    int

    查询结束时间(毫秒时间戳)。

    service_type

    string

    DCC_GENERATE

    服务类型。

    zone_type

    string

    DCC_POD

    DCC专属区。

    page_size

    int

    0~1000

    页大小。

    offset_value

    int

    查询起始值。

  • 请求body参数

  • 请求示例
    GET /rest/dataapi/homs/open-api/v1/CloudService/capacity?service_type=DCC HTTP/1.1 
    Host: example.com
    Content-Type: application/json 
    Accept: application/json
    X-APIG-Appcode: xxx 
    x-auth-token: xxx 
    x-hcso-domainid:xxx 
    x-hcso-appcode:xxx

响应

  • 响应参数

    参数

    类型

    值域

    说明

    resource_type

    string

    资源类型。

    available

    String

    剩余量,xx核(CPU单位),xxTB(内存单位)。

    az_name

    string

    可用区域。

    used

    Float64

    已使用量。

    used_ratio

    Float64

    使用率。

    az_id

    string

    可用区域ID。

    service_type

    String

    云服务名,标识资源所属的云服务DCC。

    total

    Integer

    数据条数。

    az_name_en

    string

    可用区域英文名称。

    metric_type

    String

    容量指标(DCC专属计算集群,统计池级容量)CPU、内存。

    zone_type

    String

    资源所属的区域类型:DCC_POD租户区用。

    free

    Float64

    剩余量。

    region

    String

    资源所属region中文名。

    resource_count

    Float64

    资源总量。

    allocated

    String

    已分配使用量,xx核(CPU单位),xxTB(内存单位)。

    timestamp

    Long

    时间戳。

  • 响应示例
    HTTP/1.1 200  OK 
    Date:Tue,18 Jul 2023 09:58:01 GMT
    Server: example.com
    Content-Type: application/json;charset=UTF8 
    { 
        "total":33, 
        "list":[ 
                { 
                "resource_type": "",
                "available": "13.06640625",
                "az_name": "可用区1",
                "used": "74.2802734375",
                "used_ratio": "0.40409390589222816",
                "az_id": "cn-north-213a",
                "service_type": "dcc",
                "total": "238.96484375",
                "az_name_en": "AZ1",
                "metric_type": "主机/内存/vCPU",
                "zone_type": "MANAGE",
                "free": "109.5390625",
                "region": "cn-north-213",
                "resource_count": "1690",
                "allocated": "225.8984375",
                "timestamp": "1756742400000"
               }
              ]
    }

状态码

状态码

说明

200

操作成功。

400

参数错误。

401

token鉴权失败。

403

鉴权失败。

404

rest接口未找到。

500

默认ServiceException异常码,应用内部错误。

相关文档