1. 查询创建预付费实例的询价,带宽计费为固定带宽。
POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: InquiryPriceCreateInstance
<Common Request Params>
Request:
{
"zoneId": "SEL-A",
"instanceTypeId": "M6C",
"instanceChargeType": "PREPAID",
"instanceChargePrepaid": {
"period": 1
},
"trafficPackageSize": 100,
"internetMaxBandwidthOut": 200,
"internetChargeType": "ByBandwidth"
}
Response:
{
"requestId": "T01F25348-DA67-4726-97C1-538BAE714F8B",
"response": {
"requestId": "T01F25348-DA67-4726-97C1-538BAE714F8B",
"instancePrice": {
"discount": 95.0,
"discountPrice": 426.55,
"originalPrice": 449.0,
"unitPrice": null,
"discountUnitPrice": null,
"chargeUnit": null,
"stepPrices": null
},
"bandwidthPrice": [
{
"discount": 95.0,
"discountPrice": 1444.0,
"originalPrice": 1520.0,
"unitPrice": null,
"discountUnitPrice": null,
"chargeUnit": null,
"stepPrices": null
}
]
}
}
2. 查询创建后付费实例的询价,带宽计费为固定带宽。
POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: InquiryPriceCreateInstance
<Common Request Params>
Request:
{
"zoneId": "SEL-A",
"instanceTypeId": "M6C",
"instanceChargeType": "POSTPAID",
"trafficPackageSize": 100,
"internetMaxBandwidthOut": 200,
"internetChargeType": "ByBandwidth"
}
Response:
{
"requestId": "T3105EE4C-30C5-4FF2-9A34-688C8455376D",
"response": {
"requestId": "T3105EE4C-30C5-4FF2-9A34-688C8455376D",
"instancePrice": {
"discount": 100.0,
"discountPrice": null,
"originalPrice": null,
"unitPrice": 0.63,
"discountUnitPrice": 0.63,
"chargeUnit": "HOUR",
"stepPrices": null
},
"bandwidthPrice": [
{
"discount": 100.0,
"discountPrice": null,
"originalPrice": null,
"unitPrice": 1.32,
"discountUnitPrice": 1.32,
"chargeUnit": "HOUR",
"stepPrices": null
}
]
}
}
3. 查询创建预付费实例的询价,带宽计费为流量包。
POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: InquiryPriceCreateInstance
<Common Request Params>
Request:
{
"zoneId": "SEL-A",
"instanceTypeId": "M6C",
"instanceChargeType": "PREPAID",
"instanceChargePrepaid": {
"period": 1
},
"trafficPackageSize": 100,
"internetMaxBandwidthOut": 200,
"internetChargeType": "ByTrafficPackage"
}
Response:
{
"requestId": "T8CF9A34A-ECA2-4192-8515-CAC51C40592B",
"response": {
"requestId": "T8CF9A34A-ECA2-4192-8515-CAC51C40592B",
"instancePrice": {
"discount": 95.0,
"discountPrice": 426.55,
"originalPrice": 449.0,
"unitPrice": null,
"discountUnitPrice": null,
"chargeUnit": null,
"stepPrices": null
},
"bandwidthPrice": [
{
"discount": 95.0,
"discountPrice": 7524.0,
"originalPrice": 7920.0,
"unitPrice": null,
"discountUnitPrice": null,
"chargeUnit": null,
"stepPrices": null
},
{
"discount": 100.0,
"discountPrice": null,
"originalPrice": null,
"unitPrice": null,
"discountUnitPrice": null,
"chargeUnit": null,
"stepPrices": [
{
"stepStart": 0.0,
"stepEnd": null,
"unitPrice": 0.08,
"discountUnitPrice": 0.08
}
]
}
]
}
}