1. VPC路由条目列表
1.1. 描述
获取VPC路由条目列表
1.2. 请求地址
请求地址的格式如下:
https://<区域服务地址>/v1/vpc/route/list
1.3. 请求参数
参数名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
projectId | String | 是 | 项目ID |
id | String | 是 | VpcID |
1.4. 请求示例
以获取华东一区某VPC的路由表列表为例:
1.4.1. 请求地址
POST https://cn-east-1.api.yovole.com/v1/vpc/route/list HTTP/1.1
x-ycs-timestamp: 2019-06-19T14:26:26Z
x-ycs-requestid: 2a49cfa2-925b-11e9-bb3a-6c96cfdcd6b9
x-ycs-security-authorization: Authorization: YCS1-HMAC-SHA1 Credential=08e206fb-7b41-45b7-8076-8d43e8aeea89,SignedHeaders=content-type;x-ycs-requestid;x-ycs-timestamp,Signature=2RFjU7C9gICCrQfpAIfAJHqRRlQ=
1.4.2. 接口请求参数
{
"projectId": "8a83a0966ade941a016ae906f4d10129",
"id": "84757eee-0e28-456e-84b4-7efe4939830f"
}
1.5. 返回结果
1.5.1. 返回正确结果示例
{
"requestId": "b65a4a92-1751-4671-b83c-5f5a7ff3b21a",
"success": true,
"code": 200,
"message": null,
"model": null,
"pager": {
"curPage": 1,
"perPage": 5,
"totalRecords": 5,
"totalPages": 1,
"pageData": [
{
"id": "48985f77-d55a-4c9c-a0b4-f0a99ecd4eba",
"destination": "10.3.20.138/32",
"nexthop": "10.3.20.138",
"nextType": "CUSTOM_IP",
"vpcId": "84757eee-0e28-456e-84b4-7efe4939830f",
"nextId": null
},
{
"id": "512bc49d-70eb-41c7-831f-ec35785beb11",
"destination": "10.1.1.0/24",
"nexthop": "10.254.0.2",
"nextType": "PPC",
"vpcId": "84757eee-0e28-456e-84b4-7efe4939830f",
"nextId": "87579726-40b8-49cb-8b49-987a1f1dee8d"
},
{
"id": "874a310e-3d04-467b-a49b-fe50ddcbc350",
"destination": "10.1.1.1/32",
"nexthop": "10.254.0.2",
"nextType": "PPC",
"vpcId": "84757eee-0e28-456e-84b4-7efe4939830f",
"nextId": "87579726-40b8-49cb-8b49-987a1f1dee8d"
},
{
"id": "e466d8f3-8649-4b7f-b36e-505780feed76",
"destination": "10.3.20.137/32",
"nexthop": "10.3.20.137",
"nextType": "CUSTOM_IP",
"vpcId": "84757eee-0e28-456e-84b4-7efe4939830f",
"nextId": null
},
{
"id": "eccc7895-d5cb-40ee-a723-43edee6ca782",
"destination": "10.1.1.3/32",
"nexthop": "10.254.0.2",
"nextType": "PPC",
"vpcId": "84757eee-0e28-456e-84b4-7efe4939830f",
"nextId": "87579726-40b8-49cb-8b49-987a1f1dee8d"
}
]
}
}
1.5.2. 返回错误结果示例
{
"requestId": "19c0e7ff-5554-4e90-b3a5-3aab644a8e30",
"success": false,
"code": 401,
"message": "client enabled is false",
"errorCode": "InvalidUserAccount"
}
1.6. 错误码
可以通过错误返回结果中的code、errorCode和message字段了解错误分类和具体的错误原因。
该接口没有特殊错误码,错误码信息和简单的错误分析方法可以参考公共错误码。