创建vpc路由条目

创建VPC路由条目

1. 描述

创建VPC路由条目

2. 请求地址

请求地址的格式如下:

https://<区域服务地址>/v1/vpc/route/create

3. 请求参数

参数名称 类型 是否必须 描述
projectId String 所属项目ID
vpcId String VpcId
nextType String 下一跳类型,可选项有 CUSTOM_IP、PPC
next String 下一跳IP地址,若nextType是PPC,则为vpc互联ID
destination String 目标IP或网段

4. 请求示例

以创建华东一区某VPC下一个自定义IP路由表条目为例:

4.1. 请求地址

POST https://cn-east-1.api.yovole.com/v1/vpc/route/create 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=

4.2. 接口请求参数

{
  "projectId": "8a83a0966ade941a016ae906f4d10129",
  "vpcId": "84757eee-0e28-456e-84b4-7efe4939830f",
  "nextType": "CUSTOM_IP",
  "next": "10.3.20.137",
  "destination": "10.3.20.138"
}

5. 返回结果

5.1. 返回正确结果示例

{
  "requestId": "5baa5046-7758-49fd-b617-2c4ace1be375",
  "success": true,
  "code": 200,
  "message": null,
  "model": null
}

5.2. 返回错误结果示例

{
  "requestId": "19c0e7ff-5554-4e90-b3a5-3aab644a8e30",
  "success": false,
  "code": 401,
  "message": "client enabled is false",
  "errorCode": "InvalidUserAccount"
}

6. 错误码

可以通过错误返回结果中的code、errorCode和message字段了解错误分类和具体的错误原因。

该接口没有特殊错误码,错误码信息和简单的错误分析方法可以参考公共错误码

个结果匹配 ""

    无结果匹配 ""