QueryCloudOnrampPrice

1. API Description

This API is used to query the price of cloud connect.

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

cloudType

Yes

String

Cloud connect type. Available values:

  • AWS

  • TENCENT

  • GOOGLE

  • ALI_CLOUD

  • AZURE

  • HUAWEI_CLOUD

vlanId

No

Integer

VLAN ID.

cloudRegionId

No

String

Region ID of public cloud. Google Cloud requires no parameter passing.

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 the cloud connect.

stock

Integer

Available stock of cloud connect. Unit: Mbps. Both vlanId and cloudRegionId are required to query available cloud connect stock; otherwise, the value will be empty.

4. Code Example

Query the price of AWS cloud connect, including the stock.

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

Request:
{
    "dcId": "SIN1",
    "cloudType": "AWS",
    "vlanId": 100,
    "cloudRegionId": "eu-west-1",
    "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": 5000
  }
}

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_CLOUD_NOT_SELLABLE

Cloud connect is not supported for the current data center.

Last updated