StarRocks修改付费类型询价
接口说明
请确保在使用该接口前,已充分了解 Serverless StarRocks 产品的收费方式和计费项。
调用该接口时,您需要注意:
-
只有标准版实例支持修改计算组 CU 数量,入门版实例不支持。
-
只有计算组规格类型为标准版 (standard) 的实例支持增加磁盘数量。
-
实例必须处于运行中(Running)状态。
修改 CU 数量后,计费变化情况如下:
-
按量付费:按照新的 CU 数量计费。
-
包年包月:在计费周期内,会根据新旧配置的价格差和剩余天数(从次日 0 点到有效期结束)来计算应补缴的费用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /webapi/buy/query_modify_charge_type_price HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
否 |
集群 id |
c-b25e21e24388**** |
| AutoRenew |
boolean |
否 |
是否开启自动续费,仅在 payType 为 PrePaid 时有意义。默认不开启。 |
True |
| Duration |
string |
否 |
购买时长。仅在 payType 为 PrePaid 时有意义。 |
2 |
| PricingCycle |
string |
否 |
购买时长单位:
|
Month |
| BillingInstanceIds |
string |
否 |
需要修改的计费实例 ID 列表,多个计费实例 ID 用逗号隔开 |
c-3d6dc31ba67b1839 |
| PromotionOptionNo |
string |
否 |
优惠券 ID。 |
youhuiquan_promotion_option_id_for_blank |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 请求状态码。 |
200 |
| RequestId |
string |
请求 ID。 |
32A44F0D-BFF6-5664-999A-218BBDE74XXX |
| Success |
boolean |
请求是否成功。 |
false |
| ErrCode |
string |
错误码。 |
InvalidParams |
| ErrMessage |
string |
错误信息。 |
Invalid params: [instance not exists]. |
| Data |
object |
订单金额 |
|
| OriginalAmount |
number |
原价(原始金额)=目录价*计费用量 |
7986 |
| DiscountAmount |
number |
优惠金额=原始金额-账单应付金额(包括优惠券抵扣金额) |
0 |
| TradeAmount |
number |
金额。 |
7986 |
| ComponentPrices |
array<object> |
组件价格 |
|
|
object |
|||
| ComponentName |
string |
组件名称。 |
cu_num |
| OriginalAmount |
number |
原价 |
7986 |
| DiscountAmount |
number |
订单优惠金额。 |
0 |
| TradeAmount |
number |
最终价,为原价减去折扣金额。 |
7986 |
| Currency |
string |
币种。 |
CNY |
| OptionalPromotions |
array<object> |
优惠券信息。 |
|
|
object |
优惠券信息。 |
||
| PromotionOptionNo |
string |
优惠券 ID。 |
youhuiquan_1238293 |
| PromotionName |
string |
优惠券名称。 |
youhuiquan_promotion_option_id_for_blank |
| PromotionDesc |
string |
优惠券描述。 |
youhuiquan_desc |
| StandPrice |
number |
官网折扣价 |
7986 |
| StandDiscountPrice |
number |
折扣价格。 |
7986 |
| DepreciateInfo |
object |
优惠后费用。 |
|
| CheapRate |
number |
降价比例。 |
0 |
| CheapStandAmount |
number |
降价后官网价总价 |
7986 |
| OriginalStandAmount |
number |
原始官网价总价 |
7986 |
| IsShow |
boolean |
是否展示降价幅度。 |
true |
| Rules |
array<object> |
价格计算规则。 |
|
|
object |
返回数据结构。 |
||
| Name |
string |
规则名称。 |
rule1 |
| RuleDescId |
string |
规则 ID。 |
rule-12iudfj |
| Amount |
number |
金额 |
0 |
| ModuleInstance |
array<object> |
模块 Id。 |
|
|
object |
属性类型。 |
||
| ModuleName |
string |
计价模块名称。 |
cu_num |
| TotalProductFee |
string |
产品原价。 |
7986 |
| ModuleCode |
string |
计价模块 Code。 |
instance_type |
| StandPrice |
string |
折扣价。 |
7986 |
| AccessDeniedDetail |
string |
AccessDeniedDetail |
{ "PolicyType": "AccountLevelIdentityBasedPolicy", "AuthPrincipalOwnerId": "xxx", "EncodedDiagnosticMessage": "xxx", "AuthPrincipalType": "xxx", "AuthPrincipalDisplayName": "xxx", "NoPermissionType": "ImplicitDeny", "AuthAction": "sr:xxx" } |
示例
正常返回示例
JSON格式
{
"HttpStatusCode": 200,
"RequestId": "32A44F0D-BFF6-5664-999A-218BBDE74XXX\n",
"Success": false,
"ErrCode": "InvalidParams",
"ErrMessage": "Invalid params: [instance not exists].",
"Data": {
"OriginalAmount": 7986,
"DiscountAmount": 0,
"TradeAmount": 7986,
"ComponentPrices": [
{
"ComponentName": "cu_num",
"OriginalAmount": 7986,
"DiscountAmount": 0,
"TradeAmount": 7986
}
],
"Currency": "CNY",
"OptionalPromotions": [
{
"PromotionOptionNo": "youhuiquan_1238293",
"PromotionName": "youhuiquan_promotion_option_id_for_blank",
"PromotionDesc": "youhuiquan_desc"
}
],
"StandPrice": 7986,
"StandDiscountPrice": 7986,
"DepreciateInfo": {
"CheapRate": 0,
"CheapStandAmount": 7986,
"OriginalStandAmount": 7986,
"IsShow": true
},
"Rules": [
{
"Name": "rule1",
"RuleDescId": "rule-12iudfj",
"Amount": 0
}
],
"ModuleInstance": [
{
"ModuleName": "cu_num",
"TotalProductFee": "7986",
"ModuleCode": "instance_type",
"StandPrice": "7986"
}
]
},
"AccessDeniedDetail": "{ \"PolicyType\": \"AccountLevelIdentityBasedPolicy\", \"AuthPrincipalOwnerId\": \"xxx\", \"EncodedDiagnosticMessage\": \"xxx\", \"AuthPrincipalType\": \"xxx\", \"AuthPrincipalDisplayName\": \"xxx\", \"NoPermissionType\": \"ImplicitDeny\", \"AuthAction\": \"sr:xxx\" }"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。