InquiryPriceCreateInstance

1. API Description

This API is used to query the price of creating instance.

2. Input Parameters

The following request parameter list only provides API request parameters.

3. Output Parameters

4. Code Example

Query the price of a subscription instance with the billing method of flat rate

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
      }
    ]
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

Last updated