DescribeCloudRouters

1. API Description

This API is used to query information of one or more Layer 3 cloud routers. You can filter the query results with cloud router ID, name, and etc.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter NameRequiredTypeDescription

cloudRouterIds

No

Array of String

Cloud router ID(s). You can query up to 100 IDs in each request.

cloudRouterName

No

String

Cloud router name. Fuzzy search is supported.

cloudRouterStatus

No

String

Cloud router state. See CloudRouterStatus for valid value.

egdePointId

No

String

Access point ID in cloud router.

resourceGroupId

No

String

Resource group ID.

If the value is null, then return all the cloud routers in the authorized resource groups.

pageNum

No

Integer

Number of pages returned.

Default value: 1.

pageSize

No

Integer

Number of items in the current page result.

Default value: 20;

Maximum value: 1000.

3. Output Parameters

Parameter NameTypeDescription

requestId

String

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

dataSet

Array of CloudRouter

Information on cloud routers.

totalCount

Integer

Number of cloud routers meeting the filtering conditions.

4. Code Example

Query information of Layer 3 cloud routers.

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

Request:
{}

Response:
{   
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
     "requestId": "T98044459-95B2-477E-9A2F-00253A70CC6E"
     "dataSet": [
        {
            "resourceGroupName":"Default Resource Group",
            "cloudRouterStatus":"RUNNING",
            "edgePoints":[
                {
                    "dataCenter":{
                        "dcId":"LAX5",
                        "cityName":"Los Angeles",
                        "areaName":"North America",
                        "dcName":"DRT",
                        "dcAddress":"600 West 7th Street Los Angeles, CA 90017",
                        "countryName":"United States"
                    },
                    "ipAddress":"4.4.4.4/24",
                    "portId":"your-portId",
                    "edgePointId":"the edge point id",
                    "bgpConnection":{
                        "password":"",
                        "peerIpAddress":"4.4.4.3",
                        "localAsn":62610,
                        "peerAsn":6543
                    },
                    "createTime":"2023-10-27T07:14:46Z",
                    "edgePointName":"LAX5-1698390478681",
                    "connectivityStatus":"DOWN",
                    "bandwidthMbps":1
                },
                {
                    "dataCenter":{
                        "dcId":"SOF1",
                        "cityName":"Sofia",
                        "areaName":"Europe",
                        "dcName":"Equinix_SO2",
                        "dcAddress":"N33 Nedelcho Bonchev str, Sofia, Bulgaria",
                        "countryName":"Bulgaria"
                    },
                    "vlanId":1061,
                    "ipAddress":"5.5.5.5/24",
                    "portId":"your port id",
                    "edgePointId":"the edge point id",
                    "bgpConnection":{
                        "password":"",
                        "peerIpAddress":"5.5.5.4",
                        "localAsn":62610,
                        "peerAsn":3456
                    },
                    "createTime":"2023-10-27T07:14:46Z",
                    "edgePointName":"SOF1-1698391290880",
                    "connectivityStatus":"DOWN",
                    "bandwidthMbps":1
                }
            ],
            "createTime":"2023-10-27T07:14:46Z",
            "cloudRouterId":"cloud-router-id",
            "resourceGroupId":"c91db3f4-b15e-4323-9a12-fd3f0330b74b",
            "cloudRouterName":"Test",
            "connectivityStatus":"ABNORMAL",
            "cloudRouterDescription":"",
            "cloudRouterChargeType":"POSTPAID"
        }
     ],
     totalCount: 1
  }
}

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

No error codes related to the API business logic. For other error codes, see Common Error Codes.​

Last updated