QueryPrivateConnectPrice

1. API Description

This API is used to query the price of a Layer 2 private connect.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

internetType

No

Network billing model. Default value: ByBandwidth.

bandwidthMbps

No

Integer

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

endpointA

Yes

Information of one access point of the private connect.

endpointZ

Yes

Information of the other access point of the private connect.

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

stock

Integer

Stock of backbone bandwidth of the private connect.

Unit: Mbps.

endpointAPrice

Price of one access point of the private connect.

endpointZPrice

Price of the other access point of the private connect.

4. Code Example

Query the price of a Layer 2 private connect. The bandwidth is 10 Mbps. One access point is a data center; the other access point is a public cloud.

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

Request:
{
    "internetType": "ByBandwidth",
    "bandwidthMbps": 50,
    "endpointA": {
        "dcId": "822b9bd9-44f0-4279-a64d-568f5bc4a77b",
        "portType": "10G",
        "buildCrossConnectWithAssisted": true
    },
    "endpointZ": {
        "cloudType": "AWS",
        "dcId": "AMS1",
        "bandwidthMbps": 50,
        "vlanId": 1000,
        "cloudRegionId": null
    }
}

Response:
{
    "requestId": "T746CA1D1-339E-4344-939F-E089ABD246B7",
    "response": {
        "price": {
            "unitPrice": 27.750000,
            "originalPrice": null,
            "discountPrice": null,
            "discount": 100,
            "stepPrices": null,
            "discountUnitPrice": 27.750000,
            "chargeUnit": "DAY",
            "amountUnit": null
        },
        "requestId": "T746CA1D1-339E-4344-939F-E089ABD246B7",
        "endpointAPrice": {
            "crossConnectOneTimeConstructionPrice": {
                "unitPrice": 500.000000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": null,
                "stepPrices": null,
                "discountUnitPrice": 500.000000,
                "chargeUnit": "MONTH",
                "amountUnit": null
            },
            "price": {
                "unitPrice": 0.550000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": 100,
                "stepPrices": null,
                "discountUnitPrice": 0.550000,
                "chargeUnit": "DAY",
                "amountUnit": null
            },
            "stock": 11,
            "crossConnectPrice": {
                "unitPrice": 15.000000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": 100,
                "stepPrices": null,
                "discountUnitPrice": 15.000000,
                "chargeUnit": "MONTH",
                "amountUnit": null
            }
        },
        "endpointZPrice": {
            "crossConnectOneTimeConstructionPrice": null,
            "price": {
                "unitPrice": 5.000000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": 100,
                "stepPrices": null,
                "discountUnitPrice": 5.000000,
                "chargeUnit": "DAY",
                "amountUnit": null
            },
            "stock": null,
            "crossConnectPrice": null
        },
        "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_PRIVATE_CONNECT_NOT_SUPPORT

Private connect is not supported for the current data center.

Last updated