查询云存储Pro购买价格
接口说明
按容量、计费方式和购买周期查询云存储Pro(CFS)的购买价格。只询价,不创建资源、不扣费。确认后可用相同购买参数调用 CreateCFS。
POST
https://api.compshare.cnActionGetCompShareCFSPrice仅支持 Pod 可用区的 CFS 询价。非 Pod 可用区当前可能返回空价格数组,空结果不代表免费或支持购买。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| Action | String | 是 | 接口名称 | GetCompShareCFSPrice |
| Region | String | 是 | 目标地域 | cn-bj2 |
| Zone | String | 是 | 目标 Pod 可用区 | cn-bj2-03 |
| ProjectId | String | 否 | 项目 ID,不传使用默认项目 | org-xxx |
| Size | Integer | 是 | 云存储容量,单位 GiB,范围 50~2048 | 100 |
| ChargeType | String | 否 | 计费方式。枚举值:Month、Year、Day、Dynamic。默认 Month;不支持 Postpay | Month |
| Quantity | Integer | 否 | 购买周期数,不传时为 1;建议填写正整数,并与创建时保持一致 | 1 |
本接口不接受 CouponId,如创建时使用代金券,最终金额以实际订单为准。不传 ChargeType 只查询默认按月价格,不会同时返回全部计费方式。
响应参数
| 名称 | 类型 | 描述 |
|---|---|---|
| Action | String | 响应名称:GetCompShareCFSPriceResponse |
| RetCode | Integer | 返回码,0 为请求成功 |
| Message | String | 错误信息,无错误时可能省略 |
| request_uuid | String | 请求唯一标识 |
| PriceDetails | Array of Object | 折后价格明细 |
| OriginalPriceDetails | Array of Object | 客户原价明细,结构同 PriceDetails |
| ListPriceDetails | Array of Object | 目录价明细,结构同 PriceDetails |
价格明细结构
| 名称 | 类型 | 描述 |
|---|---|---|
| ChargeType | String | 本次询价的计费方式 |
| Disks | Number | 本次容量、周期对应的存储价格,单位元,不是每 GiB 单价 |
CFS 只有存储容量计费维度,价格在 Disks 中,不在 Instance 或 SystemDisks 中。
请求示例
{
"Action": "GetCompShareCFSPrice",
"Region": "cn-bj2",
"Zone": "cn-bj2-03",
"Size": 100,
"ChargeType": "Month",
"Quantity": 1
}响应示例
金额仅用于展示返回结构,不代表实际售价。
{
"Action": "GetCompShareCFSPriceResponse",
"RetCode": 0,
"request_uuid": "request-xxxx",
"PriceDetails": [{"ChargeType": "Month", "Disks": 10.0}],
"OriginalPriceDetails": [{"ChargeType": "Month", "Disks": 12.0}],
"ListPriceDetails": [{"ChargeType": "Month", "Disks": 15.0}]
}Last updated on