请登录后查看
ListServiceResources
根据云服务类型查询资源列表
功能描述:伙伴在伙伴销售平台根据云服务类型查询关联的资源类型编码和名称,用于查询按需产品的价格或包年/包月产品的价格。
该接口既可以使用合作伙伴AK/SK或者Token调用,也可以使用客户AK/SK或者Token调用。该接口不支持根据云市场服务类型查询资源列表。
名称 | 类型 | IN | 必选 | 描述 |
---|---|---|---|---|
X-Language | string | header | 否 | 语言。中文:zh_CN英文:en_US缺省为zh_CN。 |
X-Auth-Token | string | header | 是 | 合作伙伴或客户Token调用 |
limit | integer | query | 否 | 每次查询的数量,默认值为10。 |
offset | integer | query | 否 | 偏移量,从0开始。默认值为0。 说明: offset用于分页处理,如不涉及分页,请使用默认值0。offset表示相对于满足条件的第一个数据的偏移量。如offset = 1,则返回满足条件的第二个数据至最后一个数据。例如,满足查询条件的结果共10条数据,limit取值为10,offset取值为1,则返回的数据为2~10,第一条数据不返回。 |
service_type_code | string | query | 是 | 云服务类型编码。例如OBS的云服务类型编码为“hws.service.type.obs”。您可以调用查询云服务类型列表接口获取。 |
根据云服务类型查询资源列表响应
名称 | 类型 | 描述 |
---|---|---|
total_count | integer | 总数。 |
infos | Array of ServiceResourceInfo objects | 资源基本信息列表,具体请参见表3。 |
名称 | 类型 | 描述 |
---|---|---|
basic_info | ResourceBasicInfo object | 资源基本信息。具体请参见表4。 |
名称 | 类型 | 描述 |
---|---|---|
resource_type_code | string | 资源类型编码。例如:hws.resource.type.general。 |
product_owner_service | string | 资源类型归属的服务类型编码。例如:hws.service.type.offline。 |
name | string | 资源类型名称。例如:通用规格。 |
description | string | 资源类型描述。 |
|CBC.0100:输入参数校验失败,参数范围超限,非法值或格式错误|
"GET https://bss-intl.myhuaweicloud.com/v2/products/service-resources?service_type_code=hws.service.type.obs&limit=5&offset=0"
根据云服务类型查询资源列表响应
{
"total_count": 5,
"infos": [
{
"basic_info": {
"resource_type_code": "hws.resource.type.general",
"product_owner_service": "hws.service.type.offline",
"name": "通用规格",
"description": "通用规格"
}
},
{
"basic_info": {
"resource_type_code": "hws.resource.type.bandwidth",
"product_owner_service": "hws.service.type.vpc",
"name": "固定带宽",
"description": "固定带宽"
}
},
{
"basic_info": {
"resource_type_code": "hws.resource.type.ip",
"product_owner_service": "hws.service.type.vpc",
"name": "弹性公网IP",
"description": "弹性公网IP"
}
},
{
"basic_info": {
"resource_type_code": "hws.resource.type.vm.image",
"product_owner_service": "hws.service.type.ec2",
"name": "云主机镜像",
"description": "云主机镜像"
}
},
{
"basic_info": {
"resource_type_code": "hws.resource.type.vm",
"product_owner_service": "hws.service.type.ec2",
"name": "云主机",
"description": "云主机"
}
}
]
}