QueryDataCenterPortPrice

1. API Description

This API is used to query the price of data center ports.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

dcId

Yes

String

Data center ID. You can call DescribeDataCenters to get the latest data center list.

portType

Yes

String

Port specifications.

You can call DescribeDataCenterPortPrice to get the latest port specification list.

buildCrossConnectWithAssisted

No

Boolean

Whether need Assisted Build to build your cross connect.

If the value is true, the data center port price contains the cross connect fee and the one-time construction fee.

The default value is false, that is you need to build cross connect by yourself.

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 data center ports.

crossConnectPrice

Price of cross connect.

crossConnectOneTimeConstructionPrice

Price of one-time construction fee.

stock

Integer

Available stock of data center ports.

4. Code Example

Query the price of data center ports, and the cross connect is built on user's own.

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

Request:
{
    "dcId": "SIN1",
    "portType": "10G",
    "buildCrossConnectWithAssisted": false
}

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": 100
  }
}

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.

Last updated