StarRocks新购询价接口
接口说明
请确保在使用该接口前,已充分了解 Serverless StarRocks 产品的收费方式和计费项。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /webapi/price/create HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| body |
object |
否 |
请求结构体。 |
|
| RegionId |
string |
否 |
地域 ID。 |
cn-hangzhou |
| PayType |
string |
否 |
付费类型:
|
prePaid |
| PackageType |
string |
否 |
实例系列:
|
official |
| Duration |
integer |
否 |
购买时长。仅在 payType 为 PrePaid 时有意义。 |
1 |
| PricingCycle |
string |
否 |
购买时长单位:
|
Month |
| ObserverNodeGroups |
array<object> |
否 |
Observer 计算组信息。 |
|
|
object |
否 |
Observer 计算组信息。 |
||
| specType |
string |
否 |
计算组规格类型。仅支持标准版(standard)。 |
standard |
| cu |
string |
否 |
CU 数量。CU (Compute Unit) 是服务的基本计量单元,1 CU=1 核 CPU+4GiB 内存。 |
8 |
| storageSize |
integer |
否 |
存储大小。单位为 GiB。 |
100 |
| storagePerformanceLevel |
string |
否 |
云盘的性能级别。仅支持 pl1,单盘最高随机读写 IOPS 5 万。 |
pl1 |
| diskNumber |
integer |
否 |
磁盘数量。 |
1 |
| residentNodeNumber |
integer |
否 |
节点数量。 |
3 |
| localStorageInstanceType |
string |
否 |
本地 SSD 实例规格,Observer 计算组无需设置该字段。 |
null |
| FrontendNodeGroups |
array<object> |
否 |
FE 节点组信息。 |
|
|
object |
否 |
FE 节点组信息。 |
||
| specType |
string |
否 |
计算组规格类型。仅支持标准版(standard)。 |
standard |
| cu |
string |
否 |
CU 数量。CU (Compute Unit) 是服务的基本计量单元,1 CU=1 核 CPU+4GiB 内存。 |
8 |
| storageSize |
integer |
否 |
存储大小。单位为 GiB。 |
100 |
| storagePerformanceLevel |
string |
否 |
云盘的性能级别。仅支持 pl1,单盘最高随机读写 IOPS 5 万。 |
pl1 |
| diskNumber |
integer |
否 |
磁盘数量。 |
1 |
| residentNodeNumber |
integer |
否 |
节点数量。 |
3 |
| localStorageInstanceType |
string |
否 |
本地 SSD 实例规格,FE 计算组无需设置该字段。 |
null |
| BackendNodeGroups |
array<object> |
否 |
BE 或者 CN 计算组信息。 |
|
|
object |
否 |
BE 或者 CN 计算组信息。 |
||
| specType |
string |
否 |
计算组规格类型。包括以下类型:
|
standard |
| cu |
string |
否 |
CU 数量。CU (Compute Unit) 是服务的基本计量单元,1 CU=1 核 CPU+4GiB 内存,仅在 SpecType 为内存增强型时 1 CU=1 核 CPU+8GiB 内存。 |
8 |
| storageSize |
integer |
否 |
存储大小。单位为 GiB。 |
100 |
| storagePerformanceLevel |
string |
否 |
云盘的性能级别。包含以下取值:
|
pl1 |
| diskNumber |
integer |
否 |
磁盘数量。 |
1 |
| residentNodeNumber |
integer |
否 |
节点数量。 |
3 |
| localStorageInstanceType |
string |
否 |
节点组本地 SSD 实例规格, 仅在基于 Ecs 实例且 SpecType 为本地 SSD/大规格存储时该值才有意义。 |
local_ssd_4_4xlarge |
| RunMode |
string |
否 |
集群的运行模式:
|
shared_data |
| PromotionOptionNo |
string |
否 |
优惠券 ID。 |
youhuiquan_12378dfj6 |
| AgentNodeGroup |
object |
否 |
agent 计算组 |
|
| cu |
integer |
否 |
CU 数量。CU (Compute Unit) 是服务的基本计量单元,1 CU=1 核 CPU+4GiB 内存。 |
2 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| HttpStatusCode |
integer |
HTTP 请求状态码。 |
200 |
| RequestId |
string |
请求 ID。 |
32A44F0D-BFF6-5664-999A-218BBDE7**** |
| Success |
boolean |
请求是否成功。 |
true |
| ErrCode |
string |
错误码。 |
InvalidParams |
| ErrMessage |
string |
错误信息。 |
Invalid params: [instance not exists]. |
| Data |
object |
返回数据。 |
|
| OriginalAmount |
number |
原价(原始金额)=目录价*计费用量 |
8094 |
| DiscountAmount |
number |
优惠金额=原始金额-账单应付金额(包括优惠券抵扣金额) |
0 |
| TradeAmount |
number |
金额。 |
8094 |
| ComponentPrices |
array<object> |
组件价格 |
|
|
object |
组件价格 |
||
| ComponentName |
string |
组件名称。 |
FE |
| OriginalAmount |
number |
原价。 |
3192 |
| DiscountAmount |
number |
订单优惠金额。 |
0 |
| TradeAmount |
number |
最终价,为原价减去折扣金额。 |
3192 |
| Currency |
string |
币种 |
CNY |
| OptionalPromotions |
array<object> |
优惠券信息 |
|
|
object |
优惠券编号 |
||
| PromotionOptionNo |
string |
优惠券 ID。 |
youhuiquan_12378dfj6 |
| PromotionName |
string |
优惠券名称。 |
youhuiquan_promotion_option_id_for_blank |
| PromotionDesc |
string |
优惠券描述。 |
youhuiquan_desc |
| StandPrice |
number |
官网折扣价 |
8094 |
| StandDiscountPrice |
number |
折扣价格。 |
8094 |
| DepreciateInfo |
object |
活动信息。 |
|
| CheapRate |
number |
降价比例。 |
0 |
| CheapStandAmount |
number |
降价后官网价总价 |
8094 |
| OriginalStandAmount |
number |
原始官网总价。 |
8094 |
| IsShow |
boolean |
是否展示降价幅度。 |
true |
| Rules |
array<object> |
返回数据结构。 |
|
|
object |
价格计算规则。 |
||
| Name |
string |
规则名称 |
rule_8usi12321sa |
| RuleDescId |
string |
规则 ID。 |
7u22yshaasds |
| Amount |
number |
数量 |
1 |
| ModuleInstance |
array<object> |
产品原价。 |
|
|
object |
差价优惠(订单总价展示)。 |
||
| ModuleName |
string |
计价模块名称。 |
CU |
| TotalProductFee |
string |
产品原价。 |
1622 |
| ModuleCode |
string |
计价模块 Code。 |
cu_num |
| StandPrice |
string |
折扣价。 |
1622 |
| 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-218BBDE7****",
"Success": true,
"ErrCode": "InvalidParams",
"ErrMessage": "Invalid params: [instance not exists].\n",
"Data": {
"OriginalAmount": 8094,
"DiscountAmount": 0,
"TradeAmount": 8094,
"ComponentPrices": [
{
"ComponentName": "FE",
"OriginalAmount": 3192,
"DiscountAmount": 0,
"TradeAmount": 3192
}
],
"Currency": "CNY",
"OptionalPromotions": [
{
"PromotionOptionNo": "youhuiquan_12378dfj6",
"PromotionName": "youhuiquan_promotion_option_id_for_blank",
"PromotionDesc": "youhuiquan_desc"
}
],
"StandPrice": 8094,
"StandDiscountPrice": 8094,
"DepreciateInfo": {
"CheapRate": 0,
"CheapStandAmount": 8094,
"OriginalStandAmount": 8094,
"IsShow": true
},
"Rules": [
{
"Name": "rule_8usi12321sa",
"RuleDescId": "7u22yshaasds",
"Amount": 1
}
],
"ModuleInstance": [
{
"ModuleName": "CU",
"TotalProductFee": "1622",
"ModuleCode": "cu_num",
"StandPrice": "1622"
}
]
},
"AccessDeniedDetail": "{ \"PolicyType\": \"AccountLevelIdentityBasedPolicy\", \"AuthPrincipalOwnerId\": \"xxx\", \"EncodedDiagnosticMessage\": \"xxx\", \"AuthPrincipalType\": \"xxx\", \"AuthPrincipalDisplayName\": \"xxx\", \"NoPermissionType\": \"ImplicitDeny\", \"AuthAction\": \"sr:xxx\" }"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。