更新时间:2025-09-05 GMT+08:00

对外租户资源查询

功能

对外租户资源查询。

SLA项

定义

请求成功率

>=99.9%

可用性

Tair1

数据一致性

最终一致,不一致时长<1分钟

吞吐量

4000tps

TP50请求时延

2ms

TP99.9请求时延

5ms

注意事项

调用方法

GET

URI

/rest/dataapi/homs/open-api/v2/cloudresource/instancedata/{resource_type}

路径参数

参数

是否必选

类型

值域

描述

resource_type

string

  • ECS
  • EVS
  • EIP
  • OBS
  • BMS
  • ELB
  • VPN
  • DCS
  • DMS
  • RDS
  • GAUSS
  • MODEL_ARTS_INF
  • MODEL_ARTS_TRAIN
  • MODEL_ARTS_MAOS

资源类型。

查询参数

参数

是否必选

类型

值域

描述

begin_time

integer

开始时间。

end_time

integer

结束时间。

offset_value

integer

偏移大小:大于等于0。

page_size

integer

0~1000

页大小:大于等于0。

请求

  • 请求header参数

    参数

    是否必选

    类型

    值域

    说明

    X-APIG-Appcode

    string

    由SRE分配的AppCode。

    x-auth-token

    string

    调用方APIG的IAM认证token。

    x-hcso-domainid

    string

    接入的租户ID,HCSO场景必填,其他场景不要求。

    x-hcso-appcode

    string

    由SRE分配的AppCode。

  • 请求body参数

  • 请求示例
    GET /rest/dataapi/homs/open-api/v2/cloudresource/instancedata/{resource_type} 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

响应

  • 响应参数
    • 响应状态码200:返回Data对象。Data对象包含如下属性:

      参数

      是否必选

      类型

      值域

      说明

      total

      int32

      数据总数量。

      list

      List<Item>

      流程对象。

      Item对象包含如下属性:

      参数

      是否必选

      类型

      值域

      说明

      accumulate_factor_name

      String

      累加因子名称。

      accumulate_factor_value

      String

      累加因子值。

      az_code

      String

      可用区域代码。

      begin_time

      String

      开始时间。

      bp_info

      String

      业务信息。

      cloud_service_type_code

      String

      云服务类型代码。

      csb_params

      String

      csb参数。

      enterprise_project_id

      String

      企业项目ID。

      error_msg

      String

      错误消息。

      extend_params

      String

      扩展参数。

      extend_params2

      String

      扩展参数2。

      record_type

      String

      记录类型。

      region_code

      String

      区域代码。

      relate_parent_resource

      String

      关联父资源。

      relate_root_resource

      String

      关联根资源。

      resource_id

      String

      资源ID。

      resource_spec_code

      String

      资源规格代码。

      resource_type_code

      String

      资源类型代码。

      site_code

      String

      站点代码。

      tag

      String

      标签。

      time_stamp

      String

      时间戳。

  • 响应示例
    HTTP/1.1 200 OK
    Date:Tue,18 Jul 2023 09:58:01 GMT
    Server: example.com
    Content-Type: application/json;charset=UTF8
    {
        "list": [
                 {
                 "accumulate_factor_name": "累加因子名称",
                 "accumulate_factor_value": "累加因子值",
                 "az_code": "可用区域代码",
                 "begin_time": "开始时间",
                 "bp_info": "业务信息",
                 "cloud_service_type_code": "云服务类型代码",
                 "csb_params": "csb参数",
                 "enterprise_project_id": "企业项目ID",
                 "error_msg": "错误消息",
                 "extend_params": "扩展参数",
                 "extend_params2": "扩展参数2",
                 "record_type": "记录类型",
                 "region_code": "区域代码",
                 "relate_parent_resource": "关联父资源",
                 "relate_root_resource": "关联根资源",
                 "resource_id": "资源ID",
                 "resource_spec_code": "资源规格代码",
                 "resource_type_code": "资源类型代码",
                 "site_code": "站点代码",
                 "tag": "标签",
                 "time_stamp": "时间戳"
                  }
                ],
                "total": "总数"
    }

状态码

状态码

说明

200

操作成功。

400

参数错误。

401

token鉴权失败。

403

鉴权失败。

404

接口没找到。

操作危险级别

Minor