订单续订询价
接口功能介绍
支持云主机、云硬盘、弹性公网IP、NAT网关、共享带宽、物理机、性能保障型负载均衡、云主机备份存储库和云硬盘备份存储库产品的包年/包月订单的续订询价功能
接口约束
无
URI
POST /v4/renew-order/query-price
路径参数
无
Query参数
无
请求参数
请求头header参数
无
请求体body参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
regionID | 是 | String | 资源池ID | 41f64827f25f468595ffa3a5deb5d15d | |
resourceType | 是 | String | 资源类型 | VM | |
resourceID | 是 | String | 资源ID | 6ff3103f8daf41839d13dafa55e981c1 | |
cycleType | 是 | String | 订购周期类型,可选值:MONTH 月YEAR 年 | MONTH | |
cycleCount | 是 | Integer | 订购周期大小,订购周期类型为MONTH时范围[1,36],订购周期类型为YEAR时范围[1,3] | 1 |
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
statusCode | 是 | Integer | 返回状态码(800为成功,900为失败) | 800 | |
errorCode | 是 | String | 具体错误码标志 | ||
message | 是 | String | 失败时的错误信息 | ||
description | 是 | String | 失败时的错误描述 | ||
returnObj | 是 | Object | 成功时返回的数据,参见returnObj对象结构 | returnObj |
returnObj对象:
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
totalPrice | 是 | Float | 总价格 | 56.0 | |
finalPrice | 是 | Float | 最终价格 | 56.0 | |
subOrderPrices | 是 | Array of Objects | 子订单价格信息 | subOrderPrices |
subOrderPrices内容:
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
serviceTag | 是 | String | 服务类型 | OVMS | |
totalPrice | 是 | Float | 总价格 | 56.0 | |
finalPrice | 是 | Float | 最终价格 | 56.0 | |
orderItemPrices | 是 | Array of Objects | 资源价格信息 | orderItemPrices |
orderItemPrices内容:
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
resourceType | 是 | String | 资源类型 | VM | |
totalPrice | 是 | Float | 总价格 | 41.0 | |
finalPrice | 是 | Float | 最终价格 | 41.0 |
请求示例:
云主机续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "VM",
"resourceID": "6ff3103f8daf41839d13dafa55e981c1",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 56.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 56.0,
"orderItemPrices":
[
{
"itemId": "08f5565e80a311e7b63fa0369f9f6a76",
"resourceType": "VM",
"totalPrice": 41.0,
"finalPrice": 41.0
},
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 15.0,
"finalPrice": 15.0
}
],
"finalPrice": 56.0
}
],
"finalPrice": 56.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
云硬盘续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "EBS",
"resourceID": "45cf78485be14c58b2bd1dddb3bcdfe8",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 3.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 3.0,
"orderItemPrices":
[
{
"itemId": "956a23cd50214c4b8ddd507dbc6be5ae",
"resourceType": "EBS",
"totalPrice": 3.0,
"finalPrice": 3.0
}
],
"finalPrice": 3.0
}
],
"finalPrice": 3.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
弹性公网IP续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "IP",
"resourceID": "afc71813c4b3494b9a8b439ba4d4fc5c",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 3520.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 3520.0,
"orderItemPrices":
[
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "NETWORK",
"totalPrice": 3520.0,
"finalPrice": 3520.0
}
],
"finalPrice": 3520.0
}
],
"finalPrice": 3520.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
共享带宽续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "IP_POOL",
"resourceID": "1a85a1f3443b4cdea33444800064b8b9",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 3520.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 3520.0,
"orderItemPrices":
[
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "NETWORK",
"totalPrice": 3520.0,
"finalPrice": 3520.0
}
],
"finalPrice": 3520.0
}
],
"finalPrice": 3520.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
NAT网关续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "NAT",
"resourceID": "a9010766e9494d12a81371b3daed102f",
"regionID": "41f64827f25f468595ffa3a5deb5d15d"
}
返回
{
"returnObj":
{
"totalPrice": 3520.0,
"isSucceed": true,
"subOrderPrices":
[
{
"serviceTag": "OVMS",
"totalPrice": 3520.0,
"orderItemPrices":
[
{
"itemId": "4092314281f94139b0d1693db96d662a",
"resourceType": "GATEWAY",
"totalPrice": 3520.0,
"finalPrice": 3520.0
}
],
"finalPrice": 3520.0
}
],
"finalPrice": 3520.0
},
"message": "",
"errorCode": "",
"description": "",
"statusCode": 800
}
物理机续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "BMS",
"resourceID": "65a1f4ae334c456881c8aae8ca5c082a",
"regionID": "81f7728662dd11ec810800155d307d5b"
}
返回
{
"returnObj":{
"discountPrice":11155.2,
"totalPrice":15936,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"OVMS",
"totalPrice":15936,
"orderItemPrices":[
{
"itemId":"9122568af42346c4b25d48ae6abb8fdb",
"resourceType":"BMS",
"totalPrice":15936,
"finalPrice":11155.2
}
],
"finalPrice":11155.2
}
],
"finalPrice":11155.2
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
性能保障型负载均衡续订询价
{
"cycleType":"MONTH",
"cycleCount":1,
"resourceType":"PGELB",
"resourceID":"df02397c1cac4cc3aaa93f161cfa7c0e",
"regionID":"81f7728662dd11ec810800155d307d5b"
}
返回
{
"returnObj":{
"totalPrice":1300,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"CT_ELB",
"totalPrice":1300,
"orderItemPrices":[
{
"itemId":"e91b2956a8234794aed146aeb329b282",
"resourceType":"PGELB",
"totalPrice":1300,
"finalPrice":1300
}
],
"finalPrice":1300
}
],
"finalPrice":1300
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
云主机备份存储库续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "CBR_VM",
"resourceID": "f8b8e6930ffd41b0af41bdb6a8098eed",
"regionID": "81f7728662dd11ec810800155d307d5b"
}
返回
{
"returnObj":{
"discountPrice":14,
"totalPrice":20,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"OVMS",
"totalPrice":20,
"orderItemPrices":[
{
"itemId":"61ea22e9dea9423a8450b8cdf35acd08",
"resourceType":"CBR_VM",
"totalPrice":20,
"finalPrice":14
}
],
"finalPrice":14
}
],
"finalPrice":14
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
云硬盘备份存储库续订询价
{
"cycleType": "MONTH",
"cycleCount": 1,
"resourceType": "CBR_VBS",
"resourceID": "f8b8e6930ffd41b0af41bdb6a8098eed",
"regionID": "81f7728662dd11ec810800155d307d5b"
}
返回
{
"returnObj":{
"discountPrice":14,
"totalPrice":20,
"isSucceed":true,
"subOrderPrices":[
{
"serviceTag":"OVMS",
"totalPrice":20,
"orderItemPrices":[
{
"itemId":"61ea22e9dea9423a8450b8cdf35acd08",
"resourceType":"CBR_VM",
"totalPrice":20,
"finalPrice":14
}
],
"finalPrice":14
}
],
"finalPrice":14
},
"errorCode":"",
"message":"",
"description":"",
"statusCode":800
}
失败返回示例:
{
"errorCode": "Unknown.Parameter.InvalidError",
"details": "",
"message": "request param error: resourceID is not empty",
"description": "请求参数错误: 资源id不能为空",
"statusCode": 900
}
资源类型
值 | 说明 |
---|---|
VM | 云主机 |
EBS | 云硬盘 |
IP | 弹性公网IP |
IP_POOL | 共享带宽 |
NAT | NAT网关 |
BMS | 物理机 |
PGELB | 性能保障型负载均衡 |
CBR_VM | 云主机备份存储库 |
CBR_VBS | 云硬盘备份存储库 |
状态码
状态码 | 描述 |
---|---|
200 | 表示请求成功。 |
错误码说明:
errorCode | 含义 |
---|---|
Openapi.Workorder.AccessFailed | 资源id错误,系统内部错误 |
Unknown.Parameter.InvalidError | 请求参数有误 |
OrderPrice.ResourceNotExist | 资源未查询到 |
OrderPrice.NotSupportOndemand | 按需资源不支持续订 |