文档首页/ CloudPond云服务/ API参考/ API/ 销售商品/ 查询服务器商品列表
更新时间:2025-08-21 GMT+08:00
分享

查询服务器商品列表

功能介绍

查询服务器销售商品列表。

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v2/{domain_id}/server-offerings

表1 路径参数

参数

是否必选

参数类型

描述

domain_id

String

path中租户的账号ID

表2 Query参数

参数

是否必选

参数类型

描述

zone_code

String

地区编码

pay_mode

Array of strings

付费模式

period_num

Array of integers

购买时长

limit

Integer

每页的数量

marker

String

分页标识

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

offerings

Array of ServerOffering objects

商品列表

page_info

PageInfo object

分页信息

表5 ServerOffering

参数

参数类型

描述

id

String

服务器销售商品id

zone_code

String

地区编码,表示允许在这个地区购买部署

scene_code

String

销售场景编码

status

String

机柜状态说明:

  • TESTING - 测试

  • ONSALE - 在售

  • SUSPENDED - 已停售

  • RETIREMENT - 产品退出

spec

ServerSpec object

服务器规格

product_info

ProductInfo object

商品归属产品属性信息

sale_cycles

Array of SaleCycle objects

销售周期对象

表6 ServerSpec

参数

参数类型

描述

id

String

服务器规格ID

name

String

服务器规格名称。

server_type

String

服务器类型。

COMPUTE: 计算服务器

NETWORK: 网络服务器

BLOCK_STORAGE: 硬盘存储服务器

flavor_type

String

服务器发放的资源规格类型

performance_type

String

服务器规格分类。如通用计算型/云桌面型/网关型等。

power

Integer

服务器功率(单位:w)

unit

Integer

设备高度。U位数

vcpus

Integer

可用虚拟CPU核数

memory

Integer

可用内存大小。单位:GB

storage_capacity

Integer

可用存储容量。单位:TiB

cpu_name

String

名称

cpu_architecture

String

CPU架构

表7 ProductInfo

参数

参数类型

描述

cloud_service_type

String

云服务类型

resource_type

String

资源类型

resource_spec_code

String

资源编码

表8 SaleCycle

参数

参数类型

描述

pay_mode

String

包周期付款类型

  • FULL: 全预付

  • HALF:半预付

  • PAID_BY_YEAR:按年付费

  • ZERO_PAID_BY_YEAR:零预付-按年

period_type

String

包周期类型

  • year:包年

period_num

Integer

周期数量

表9 PageInfo

参数

参数类型

描述

next_marker

String

下一页标识。

current_count

Integer

当前页数量。

请求示例

查询服务器商品列表

GET https://{ies_endpoint}/v2/{domain_id}/server-offerings

响应示例

状态码:200

successful operation

{
  "offerings" : [ {
    "id" : "00000000-0000-000-0000-000000000000",
    "zone_code" : "CN",
    "scene_code" : "normal",
    "status" : "ONSALE",
    "spec" : {
      "id" : "00000000-0000-000-0000-000000000000",
      "name" : "S7",
      "server_type" : "COMPUTE",
      "flavor_type" : null,
      "performance_type" : "normal",
      "power" : 10,
      "unit" : 3,
      "vcpus" : 100,
      "memory" : 800,
      "storage_capacity" : 3000,
      "cpu_name" : "",
      "cpu_architecture" : "X86"
    },
    "product_info" : {
      "cloud_service_type" : "hws.service.type.ies",
      "resource_type" : "hws.resource.type.iesserver",
      "resource_spec_code" : "ies.cbu.testcompute"
    },
    "sale_cycles" : [ {
      "pay_mode" : "HALF",
      "period_type" : "year",
      "period_num" : 3
    }, {
      "pay_mode" : "FULL",
      "period_type" : "year",
      "period_num" : 3
    } ]
  } ],
  "page_info" : {
    "current_count" : 1
  }
}

状态码

状态码

描述

200

successful operation

错误码

请参见错误码

相关文档