订单询价
接口功能介绍
购买云产品时询价接口,支持云主机、云硬盘、弹性公网IP、NAT网关、共享带宽、物理机、性能保障型负载均衡、云主机备份存储库和云硬盘备份存储库产品的包年/包月或按量订单的询价功能
接口约束
无
请求参数
URI
POST /v4/new-order/query-price
路径参数
无
Query参数
无
请求头header参数
无
请求体body参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 |
---|---|---|---|---|
regionID | 是 | String | 资源池ID | 41f64827f25f468595ffa3a5deb5d15d |
resourceType | 是 | String | 资源类型 | VM |
count | 是 | Integer | 订购数量 | 1 |
onDemand | 是 | Boolean | 是否按需资源,true 按需 / false 包周期 | false |
cycleType | 否 | String | 订购周期类型,当onDemand为false时为必填,可选值:MONTH 月YEAR 年 | MONTH |
cycleCount | 否 | Integer | 订购周期大小,订购周期类型为MONTH时范围[1,60],订购周期类型为YEAR时范围[1,5],当onDemand为false时为必填 | 6 |
flavorName | 否 | String | 云主机规格,当resourceType为VM时必填 | s2.small.1 |
imageUUID | 否 | String | 云主机镜像UUID,当resourceType为VM时必填 | 7d2922f3-019e-4dbb-ad84-cc8c3497546c |
sysDiskType | 否 | String | 云主机系统盘类型,当resourceType为VM时必填 | SATA |
sysDiskSize | 否 | Integer | 云主机系统盘大小,范围[40,2048],当resourceType为VM时必填 | 50 |
disks | 否 | Array of Objects | 数据盘信息,当resourceType为VM选填,订购云主机时如果成套订购数据盘时需要该字段 | |
bandwidth | 否 | Integer | 带宽大小,范围[1,2000],当resourceType为IP时必填;当resourceType为VM时,如果成套订购弹性公网IP时需要该字段 | 1 |
diskType | 否 | String | 磁盘类型,当resourceType为EBS时必填 | SATA |
diskSize | 否 | Integer | 磁盘大小,范围[5,2000],当resourceType为EBS时必填 | 30 |
diskMode | 否 | String | 磁盘模式(VBD/ISCSI/FCSAN),当resourceType为EBS时必填 | VBD |
natType | 否 | String | NAT规格 | small |
ipPoolBandwidth | 否 | Integer | 共享带宽大小,范围[5,2000],当resourceType为IP_POOL时必填 | 10 |
deviceType | 否 | String | 物理机规格,当resourceType为BMS时必填 | physical.t4.large |
azName | 否 | String | 物理机规格可用区,当resourceType为BMS时必填 | az1 |
orderDisks | 否 | Array of Objects | 物理机云硬盘信息,当resourceType为BMS选填 | |
elbType | 否 | String | 性能保障型负载均衡类型,支持standardI/standardII/enhancedI/enhancedII/higherI,当resourceType为PGELB时必填 | standardI |
cbrValue | 否 | Integer | 存储库大小,100-1024000GB,当resourceType为CBR_VM或CBR_VBS时必填 | 100 |
表disks
参数 | 是否必填 | 参数类型 | 说明 | 示例 |
---|---|---|---|---|
diskType | 是 | String | 磁盘类型 | SATA |
diskSize | 是 | Integer | 磁盘大小 | 10 |
表orderDisks
参数 | 是否必填 | 参数类型 | 说明 | 示例 |
---|---|---|---|---|
diskType | 是 | String | 磁盘类型 | SATA |
diskSize | 是 | Integer | 磁盘大小 | 10 |
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 |
---|---|---|---|---|
statusCode | 是 | Integer | 返回状态码(800为成功,900为失败) | 800 |
errorCode | 是 | String | 具体错误码标志 | |
message | 是 | String | 失败时的错误信息 | |
description | 是 | String | 失败时的错误描述 | |
returnObj | 是 | Object | 成功时返回的数据,参见returnObj对象结构 |
表returnObj
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
totalPrice | 是 | Float | 总价格 | 336.0 | |
discountPrice | 否 | Float | 折后价格,云主机相关产品有 | 225.3 | |
finalPrice | 是 | Float | 最终价格 | 225.3 | |
subOrderPrices | 是 | Array of Objects | 子订单价格信息 | subOrderPrices |
表subOrderPrices
参数名 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
serviceTag | 是 | String | 服务类型 | OVMS | |
totalPrice | 是 | Float | 子订单总价格 | 336.0 | |
orderItemPrices | 是 | Array of Objects | item价格信息 | orderItemPrices |
表orderItemPrices
参数名 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
resourceType | 是 | String | 资源类型 | VM | |
totalPrice | 是 | String | 总价格 | 246.0 | |
finalPrice | 是 | String | 最终价格 | 135.3 |
请求示例:
包周期云主机单独下单询价
{
"count": 1,
"sysDiskSize": 50,
"sysDiskType": "SATA",
"cycleCount": 6,
"onDemand": false,
"resourceType": "VM",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"flavorName": "s2.small.1",
"cycleType": "MONTH",
"imageUUID": "7d2922f3-019e-4dbb-ad84-cc8c3497546c"
}
返回
{
"returnObj":
{
"discountPrice": 225.3,
"totalPrice": 336.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 336.0,
"orderItemPrices":
[
{
"itemId": "08f5565e80a311e7b63fa0369f9f6a76",
"resourceType": "VM",
"totalPrice": 246.0,
"finalPrice": 135.3
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 90.0,
"finalPrice": 90.0
}
],
"finalPrice": 225.3
}
],
"finalPrice": 225.3
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
按需云主机单独下单询价
{
"count": 1,
"sysDiskSize": 50,
"sysDiskType": "SATA",
"onDemand": true,
"imageUUID": "7d2922f3-019e-4dbb-ad84-cc8c3497546c",
"resourceType": "VM",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"flavorName": "s2.small.1"
}
返回
{
"returnObj":
{
"discountPrice": 0.08,
"totalPrice": 0.12,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 0.12,
"orderItemPrices":
[
{
"itemId": "08f5565e80a311e7b63fa0369f9f6a76",
"resourceType": "VM",
"totalPrice": 0.09,
"finalPrice": 0.05
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 0.03,
"finalPrice": 0.03
}
],
"finalPrice": 0.08
}
],
"finalPrice": 0.08
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
云主机成套下单询价
{
"sysDiskSize": 50,
"sysDiskType": "SATA",
"cycleCount": 6,
"flavorName": "s2.small.1",
"bandwidth": 1,
"cycleType": "MONTH",
"count": 1,
"disks":
[
{
"diskSize": 10,
"diskType": "SATA"
}
],
"onDemand": false,
"resourceType": "VM",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"imageUUID": "7d2922f3-019e-4dbb-ad84-cc8c3497546c"
}
返回
{
"returnObj":
{
"discountPrice": 363.3,
"totalPrice": 474.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 474.0,
"orderItemPrices":
[
{
"itemId": "08f5565e80a311e7b63fa0369f9f6a76",
"resourceType": "VM",
"totalPrice": 246.0,
"finalPrice": 135.3
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 90.0,
"finalPrice": 90.0
},
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "NETWORK",
"totalPrice": 120.0,
"finalPrice": 120.0
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 18.0,
"finalPrice": 18.0
}
],
"finalPrice": 363.3
}
],
"finalPrice": 363.3
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
按需云主机成套下单
{
"count": 1,
"sysDiskSize": 50,
"sysDiskType": "SATA",
"onDemand": true,
"resourceType": "VM",
"disks":
[
{
"diskSize": 10,
"diskType": "SATA"
}
],
"flavorName": "s2.small.1",
"bandwidth": 1,
"imageUUID": "7d2922f3-019e-4dbb-ad84-cc8c3497546c",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"discountPrice": 0.15,
"totalPrice": 0.19,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 0.19,
"orderItemPrices":
[
{
"itemId": "08f5565e80a311e7b63fa0369f9f6a76",
"resourceType": "VM",
"totalPrice": 0.09,
"finalPrice": 0.05
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 0.03,
"finalPrice": 0.03
},
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "NETWORK",
"totalPrice": 0.06,
"finalPrice": 0.06
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 0.01,
"finalPrice": 0.01
}
],
"finalPrice": 0.15
}
],
"finalPrice": 0.15
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
包周期云硬盘下单询价
{
"count": 1,
"cycleType": "MONTH",
"diskSize": 30,
"cycleCount": 6,
"onDemand": false,
"resourceType": "EBS",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"diskMode": "VBD",
"diskType": "SATA"
}
返回
{
"returnObj":
{
"totalPrice": 54.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 54.0,
"orderItemPrices":
[
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 54.0,
"finalPrice": 54.0
}
],
"finalPrice": 54.0
}
],
"finalPrice": 54.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
按需云硬盘下单询价
{
"count": 1,
"diskMode": "VBD",
"onDemand": true,
"resourceType": "EBS",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"diskType": "SATA",
"diskSize": 30,
}
返回
{
"returnObj":
{
"totalPrice": 0.02,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 0.02,
"orderItemPrices":
[
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 0.02,
"finalPrice": 0.02
}
],
"finalPrice": 0.02
}
],
"finalPrice": 0.02
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
包周期弹性公网IP下单询价
{
"count": 1,
"cycleCount": 6,
"onDemand": false,
"resourceType": "IP",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"bandwidth": 1,
"cycleType": "MONTH"
}
返回
{
"returnObj":
{
"totalPrice": 120.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 120.0,
"orderItemPrices":
[
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "NETWORK",
"totalPrice": 120.0,
"finalPrice": 120.0
}
],
"finalPrice": 120.0
}
],
"finalPrice": 120.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
按需弹性公网IP下单询价
{
"count": 1,
"bandwidth": 1,
"onDemand": true,
"resourceType": "IP",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 0.06,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 0.06,
"orderItemPrices":
[
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "NETWORK",
"totalPrice": 0.06,
"finalPrice": 0.06
}
],
"finalPrice": 0.06
}
],
"finalPrice": 0.06
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
包周期共享带宽下单询价
{
"count": 1,
"cycleCount": 6,
"onDemand": false,
"resourceType": "IP_POOL",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"ipPoolBandwidth": 10,
"cycleType": "MONTH"
}
返回
{
"returnObj":
{
"totalPrice": 120.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 120.0,
"orderItemPrices":
[
{
"itemId": "70e35a316eea4b419622365d1808025f",
"resourceType": "NETWORK",
"totalPrice": 120.0,
"finalPrice": 120.0
}
],
"finalPrice": 120.0
}
],
"finalPrice": 120.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
按需共享带宽下单询价
{
"count": 1,
"ipPoolBandwidth": 20,
"onDemand": true,
"resourceType": "IP_POOL",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 0.06,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 0.06,
"orderItemPrices":
[
{
"itemId": "70e35a316eea4b419622365d1808025f",
"resourceType": "NETWORK",
"totalPrice": 0.06,
"finalPrice": 0.06
}
],
"finalPrice": 0.06
}
],
"finalPrice": 0.06
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
包周期NAT网关下单询价
{
"count": 1,
"cycleCount": 6,
"onDemand": false,
"resourceType": "NAT",
"regionID": "41f64827f25f468595ffa3a5deb5d15d",
"natType": "small",
"cycleType": "MONTH"
}
返回
{
"returnObj":
{
"totalPrice": 120.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 120.0,
"orderItemPrices":
[
{
"itemId": "a8c08f13cc0d4ad9aa3798f8ee3d089f",
"resourceType": "GATEWAY",
"totalPrice": 120.0,
"finalPrice": 120.0
}
],
"finalPrice": 120.0
}
],
"finalPrice": 120.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
按需NAT网关下单询价
{
"count": 1,
"natType": "large",
"onDemand": true,
"resourceType": "NAT",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 0.06,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 0.06,
"orderItemPrices":
[
{
"itemId": "bb3d33548c714f2798ae01b62a9f9818",
"resourceType": "GATEWAY",
"totalPrice": 0.06,
"finalPrice": 0.06
}
],
"finalPrice": 0.06
}
],
"finalPrice": 0.06
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
包周期物理机下单询价
{
"resourceType":"BMS",
"regionID":"bb9fdb42056f11eda1610242ac110002",
"azName":"cn-huadong1-jsnj1A-public-ctcloud",
"orderDisks":[
{
"diskType":"SATA",
"diskSize":205
}
],
"deviceType":"physical.s5.2xlarge4",
"bandwidth":1,
"cycleCount":6,
"cycleType":"MONTH",
"onDemand": false,
"count":1
}
返回
{
"returnObj":{
"totalPrice":137961,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"OVMS",
"totalPrice":137961,
"orderItemPrices":[
{
"itemId":"cd02efc3828a11ed96fe34800d4715e8",
"resourceType":"BMS",
"totalPrice":137472,
"finalPrice":137472
},
{
"itemId":"43d91ceb6b7a493c8c3ee6777d32b54a",
"resourceType":"NETWORK",
"totalPrice":120,
"finalPrice":120
},
{
"itemId":"80572ad25b1f4bbcaab7cb56388cac25",
"resourceType":"EBS",
"totalPrice":369,
"finalPrice":369
}
],
"finalPrice":137961
}
],
"finalPrice":137961
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
性能保障型负载均衡下单询价
{
"resourceType":"PGELB",
"elbType":"higherI",
"cycleCount":3,
"cycleType":"MONTH",
"onDemand": false,
"count":1,
"regionID":"200000001790"
}
返回
{
"returnObj":{
"totalPrice":5400,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"CT_ELB",
"totalPrice":5400,
"orderItemPrices":[
{
"itemId":"97cd1ce01e5940f9b83998dd1a881326",
"resourceType":"PGELB",
"totalPrice":5400,
"finalPrice":5400
}
],
"finalPrice":5400
}
],
"finalPrice":5400
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
包周期云主机备份存储库下单询价
{
"resourceType":"CBR_VM",
"cbrValue":100,
"cycleCount":2,
"cycleType":"MONTH",
"onDemand": false,
"count":1,
"regionID":"200000001790"
}
返回
{
"returnObj":{
"totalPrice":40,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"OVMS",
"totalPrice":40,
"orderItemPrices":[
{
"itemId":"61ea22e9dea9423a8450b8cdf35acd08",
"resourceType":"CBR_VM",
"totalPrice":40,
"finalPrice":40
}
],
"finalPrice":40
}
],
"finalPrice":40
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
按需云硬盘备份存储库下单询价
{
"resourceType":"CBR_VBS",
"cbrValue":2048,
"count":1,
"regionID":"200000001790",
"onDemand":true
}
返回
{
"returnObj":{
"totalPrice":0.29,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"OVMS",
"totalPrice":0.29,
"orderItemPrices":[
{
"itemId":"2f1b9f9effa9421eb4e07b2bcf6be1db",
"resourceType":"CBR_VBS",
"totalPrice":0.29,
"finalPrice":0.29
}
],
"finalPrice":0.29
}
],
"finalPrice":0.29
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
失败返回示例:
{
"errorCode": "Unknown.Parameter.InvalidError",
"details": "",
"message": "request param error: count type error",
"description": "请求参数错误: 订购数量参数类型不正确",
"statusCode": 900
}
资源类型
值 | 说明 |
---|---|
VM | 云主机 |
EBS | 云硬盘 |
IP | 弹性公网IP |
IP_POOL | 共享带宽 |
NAT | NAT网关 |
BMS | 物理机 |
PGELB | 性能保障型负载均衡 |
CBR_VM | 云主机备份存储库 |
CBR_VBS | 云硬盘备份存储库 |
磁盘类型
值 | 说明 |
---|---|
SAS | 高IO |
SATA | 普通IO |
SSD | 超高IO |
SSD-genric | 通用型SSD |
FAST-SSD | 极速型SSD |
NAT规格
值 | 说明 |
---|---|
small | 小型 |
medium | 中型 |
large | 大型 |
xlarge | 超大型 |
状态码
状态码 | 描述 |
---|---|
200 | 表示请求成功。 |
错误码说明:
errorCode | 含义 |
---|---|
Unknown.Parameter.InvalidError | 参数类型有误 |
Unknown.OrderPrice.CountError | 订购数量错误 |
Vm.OrderPrice.InvalidSysDiskType | 系统盘类型不正确 |
Vm.OrderPrice.SysDiskSizeError | 系统盘大小不正确 |
Vm.OrderPrice.DiskSizeError | 数据盘大小不正确 |
Vm.OrderPrice.InvalidDiskType | 数据盘类型不正确 |
Vm.OrderPrice.InvalidFlavor | 云主机规格不正确 |
Vm.OrderPrice.InvalidImage | 云主机镜像不正确 |
Ip.OrderPrice.InvalidBandwidth | 弹性公网IP带宽大小错误 |
Ebs.OrderPrice.SizeError | 云硬盘大小错误 |