查询云存储Pro扩容价格
接口说明
查询已有云存储Pro(CFS)扩容到目标容量的变配费用,只询价,不执行扩容。确认金额后,使用相同 CfsId 和 Size 调用 ResizeCFS。
POST
https://api.compshare.cnActionGetCompShareCFSUpgradePrice使用限制
- 仅支持 Pod 可用区。CFS 必须属于当前账号和项目,且未删除。
- 目标
Size必须严格大于当前容量,范围为 50~2048 GiB。 - 不支持通过本接口改变计费方式或购买周期,询价基于已有资源的账单。
- 非 Pod 可用区当前可能返回默认的零值响应,不能将其视为有效的免费扩容报价。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| Action | String | 是 | 接口名称 | GetCompShareCFSUpgradePrice |
| Region | String | 是 | 云存储所在地域 | cn-bj2 |
| Zone | String | 是 | 云存储所在 Pod 可用区 | cn-bj2-03 |
| ProjectId | String | 否 | 云存储所属项目 ID,不传使用默认项目 | org-xxx |
| CfsId | String | 是 | 云存储 ID | cfs-xxxx |
| Size | Integer | 是 | 扩容后的总容量,单位 GiB,非增量 | 200 |
响应参数
| 名称 | 类型 | 描述 |
|---|---|---|
| Action | String | 响应名称为 GetCompShareCFSUpgradePrice,没有 Response 后缀 |
| RetCode | Integer | 返回码,0 为请求成功 |
| Message | String | 错误信息,无错误时可能省略 |
| request_uuid | String | 请求唯一标识 |
| Price | Number | 本次扩容的折后费用,单位元 |
| OriginalPrice | Number | 本次扩容的客户原价,单位元 |
| ListPrice | Number | 可选目录价,单位元;当前 CFS 实现未赋值,通常不返回,不应当作 0 |
| ActivityRuleBefore | Object | 变更前匹配的活动规则信息 |
| ActivityRuleBefore.ActivityId | Integer | 活动 ID |
| ActivityRuleBefore.RuleId | Integer | 规则 ID |
| ActivityRuleBefore.Type | Integer | 活动类型:1 长期活动、2 短期活动、3 特殊短期活动;无匹配信息时可能为 0 |
请求示例
查询一份当前为 100 GiB 的存储扩容至 200 GiB 的费用:
{
"Action": "GetCompShareCFSUpgradePrice",
"Region": "cn-bj2",
"Zone": "cn-bj2-03",
"CfsId": "cfs-xxxx",
"Size": 200
}响应示例
金额仅用于展示返回结构,实际以接口结果和变配订单为准。
{
"Action": "GetCompShareCFSUpgradePrice",
"RetCode": 0,
"request_uuid": "request-xxxx",
"Price": 5.0,
"OriginalPrice": 6.0,
"ActivityRuleBefore": {
"ActivityId": 0,
"RuleId": 0,
"Type": 0
}
}Last updated on