Skip to Content
GPU API 接口

查询云存储Pro扩容价格

接口说明

查询已有云存储Pro(CFS)扩容到目标容量的变配费用,只询价,不执行扩容。确认金额后,使用相同 CfsId 和 Size 调用 ResizeCFS。

POSThttps://api.compshare.cnActionGetCompShareCFSUpgradePrice

使用限制

  • 仅支持 Pod 可用区。CFS 必须属于当前账号和项目,且未删除。
  • 目标 Size 必须严格大于当前容量,范围为 50~2048 GiB。
  • 不支持通过本接口改变计费方式或购买周期,询价基于已有资源的账单。
  • 非 Pod 可用区当前可能返回默认的零值响应,不能将其视为有效的免费扩容报价。

请求参数

名称类型必填描述示例值
ActionString是接口名称GetCompShareCFSUpgradePrice
RegionString是云存储所在地域cn-bj2
ZoneString是云存储所在 Pod 可用区cn-bj2-03
ProjectIdString否云存储所属项目 ID,不传使用默认项目org-xxx
CfsIdString是云存储 IDcfs-xxxx
SizeInteger是扩容后的总容量,单位 GiB,非增量200

响应参数

名称类型描述
ActionString响应名称为 GetCompShareCFSUpgradePrice,没有 Response 后缀
RetCodeInteger返回码,0 为请求成功
MessageString错误信息,无错误时可能省略
request_uuidString请求唯一标识
PriceNumber本次扩容的折后费用,单位元
OriginalPriceNumber本次扩容的客户原价,单位元
ListPriceNumber可选目录价,单位元;当前 CFS 实现未赋值,通常不返回,不应当作 0
ActivityRuleBeforeObject变更前匹配的活动规则信息
ActivityRuleBefore.ActivityIdInteger活动 ID
ActivityRuleBefore.RuleIdInteger规则 ID
ActivityRuleBefore.TypeInteger活动类型: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