QueryCloudRouterBandwidthPrice

1. API Description

This API is used to query the price of backbone bandwidth of the cloud router.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

dcId

Yes

String

Data center ID of the cloud router.

bandwidthMbps

No

Integer

Bandwidth cap. Default value: 10. Unit: Mbps.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

price

Price of backbone bandwidth of the cloud router.

stock

Integer

Available stock of backbone bandwidth of the cloud router. Unit: Mbps.

4. Code Example

Query the price of backbone bandwidth of the cloud router. The backbone bandwidth is 10 Mbps.

POST /api/v2/sdn HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: QueryCloudRouterBandwidthPrice
<Common Request Params>

Request:
{
    "dcId": "SIN1",
    "bandwidthMbps": 10
}

Response:
{   
  "requestId": "TDB181167-C39F-4C3E-8E88-B8FDE755FDC0",
  "response": {
    "requestId":"TDB181167-C39F-4C3E-8E88-B8FDE755FDC0",
    "price":        {
            "unitPrice":1.65,
            "originalPrice":null,
            "discountPrice":null,
            "discount":100,
            "stepPrices":null,
            "discountUnitPrice":1.65,
            "chargeUnit":"DAY"
        },
    "stock": 10000
  }
}

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.​

HTTP Status Code
Error Code
Description

404

INVALID_DATACENTER_NOT_FOUND

Data center does not exist.

400

INVALID_ROUTER_POINT_NOT_SELLABLE

Cloud router is not supported for the current data center.

Last updated