{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"CreateRouteTableReq":{"description":"","properties":{"description":{"description":"功能说明:路由表描述信息\n\n取值范围:0-255个字符,不能包含“<”和“>”","maxLength":255,"minLength":0,"type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"name":{"description":"功能说明:路由表名称\n\n取值范围:0-64个字符,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)","maxLength":64,"minLength":0,"type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"routes":{"description":"功能说明:路由对象,参见route字段说明\n\n约束:每个路由表最大关联200条路由","items":{"$ref":"#/definitions/RouteTableRoute","description":""},"type":"array","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc,obc"},"vpc_id":{"description":"路由表所在的虚拟私有云ID","example":"575c5798-bb62-4500-a8dc-174ef7d8685f","pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["vpc_id"]},"CreateRoutetableReqBody":{"description":"","properties":{"routetable":{"$ref":"#/definitions/CreateRouteTableReq","description":"路由表对象","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["routetable"]},"ErrorResp":{"description":"http响应码为错误码时的返回体数据模型","properties":{"code":{"description":"请求返回的错误码","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"message":{"description":"请求返回的错误信息","maxLength":999,"minLength":1,"type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["code","message"]},"RouteTableResp":{"description":"","properties":{"created_at":{"description":"功能说明:资源创建UTC时间\n格式:yyyy-MM-ddTHH:mm:ss","format":"date-time","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"default":{"description":"功能说明:是否为默认路由表\n\n取值范围:true表示默认路由表;false表示自定义路由表","type":"boolean","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"description":{"description":"功能说明:路由表描述信息\n\n取值范围:0-255个字符,不能包含“<”和“>”","maxLength":255,"minLength":0,"type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"id":{"description":"功能说明:路由表ID\n\n取值范围:标准UUID","example":"575c5798-bb62-4500-a8dc-174ef7d8685f","pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"name":{"description":"功能说明:路由表名称\n\n取值范围:0-64个字符,支持数字、字母、中文、_(下划线)、-(中划线)、.(点)","example":"rtb-01","maxLength":64,"minLength":0,"type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"routes":{"description":"功能说明:路由对象,参见route字段说明。\n\n约束:每个路由表最大关联200条路由","items":{"$ref":"#/definitions/RouteTableRoute","description":""},"type":"array","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc,obc"},"subnets":{"description":"功能说明:路由表所关联的子网\n\n约束:只能关联路由表所属VPC下的子网","items":{"$ref":"#/definitions/SubnetList"},"type":"array","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"tenant_id":{"description":"项目ID","example":"05137572fa00d5eb2fdcc014b0f5c751","pattern":"[0-9a-fA-F]{32}","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"updated_at":{"description":"功能说明:资源更新UTC时间\n格式:yyyy-MM-ddTHH:mm:ss","format":"date-time","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"vpc_id":{"description":"路由表所在的虚拟私有云ID","example":"575c5798-bb62-4500-a8dc-174ef7d8685f","pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["created_at","default","description","id","name","routes","subnets","tenant_id","updated_at","vpc_id"]},"RouteTableRoute":{"description":"","properties":{"description":{"description":"功能说明:路由的描述信息\n取值范围:0-255个字符,不能包含“<”和“>”","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,obc,tlf,ctc"},"destination":{"description":"功能说明:路由目的网段\n约束:合法的CIDR格式","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,obc"},"nexthop":{"description":"功能说明:路由下一跳对象的ID\n取值范围:\n当type为ecs时,传入ecs实例ID\n当type为eni时,取值为从网卡ID\n当type为vip时,取值为vip对应的IP地址\n当type为nat时,取值为nat实例对应的ID\n当type为peering时,取值为peering对应实例ID\n当type为vpn时,取值为vpn实例ID\n当type为dc时,取值为dc实例ID\n当type为cc时,取值为cc的实例ID","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,obc,tlf,ctc"},"type":{"description":"功能说明:路由的类型\n取值范围:\necs:弹性云服务器\neni:网卡\nvip:虚拟IP\nnat:NAT网关\npeering:对等连接\nvpn:虚拟专用网络\ndc:云专线\ncc:云连接\negw:VPC终端节点","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,obc,tlf,ctc"}},"required":["destination","nexthop","type"]},"RoutetableRespBodyShow":{"description":"","properties":{"routetable":{"$ref":"#/definitions/RouteTableResp","description":"路由表对象","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["routetable"]},"SubnetList":{"description":"","properties":{"id":{"description":"路由表关联的子网ID","example":"575c5798-bb62-4500-a8dc-174ef7d8685f","pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["id"]}},"description":null,"group_id":"4784d190da9948c381c1603ddda2f4ff","host":"vpc.cn-north-4.myhuaweicloud.com","id":"8076ada5f9dd45cc9ed56b5e9baf6c39","info_version":"v2","method":"post","name":"CreateRouteTable","parameters":{},"paths":{"/v1/{project_id}/routetables":{"post":{"consumes":[],"deprecated":false,"description":"创建路由表","operationId":"CreateRouteTable","parameters":[{"description":"用户Token\n获取Token,请参考《统一身份认证服务API参考》的“获取用户Token”章节。请求响应成功后在响应消息头中包含的“X-Subject-Token”的值即为Token值。","in":"header","name":"X-Auth-Token","required":true,"type":"string","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,sbc,obc","x-order":1},{"description":"项目ID","in":"path","name":"project_id","pattern":"[0-9a-fA-F]{32}","required":true,"type":"string","x-example":"05137572fa00d5eb2fdcc014b0f5c751","x-order":2},{"description":"创建路由表对象,参见CreateRouteTableReq对象","in":"body","name":"routetable","required":true,"schema":{"$ref":"#/definitions/CreateRoutetableReqBody"},"x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc","x-order":3}],"produces":[],"responses":{"200":{"description":"正常返回","examples":{"application/json":{"routetable":{"default":false,"description":"abc","id":"3d42a0d4-a980-4613-ae76-a2cddecff054","name":"routetable-1234","routes":[{"description":"abc","destination":"10.10.10.0/24","nexthop":"7c50463d-d36c-4417-aa85-cc11fa10f341","type":"ecs"}],"subnets":[{"id":"8d4ce32f-d68a-4c4c-9f18-c68d8a5c7f2f"}],"tenant_id":"6fbe9263116a4b68818cf1edce16bc4f","vpc_id":"ab78be2d-782f-42a5-aa72-35879f6890ff"}}},"schema":{"$ref":"#/definitions/RoutetableRespBodyShow"}},"400":{"description":"服务器未能处理请求。","schema":{"$ref":"#/definitions/ErrorResp"}},"401":{"description":"被请求的页面需要用户名和密码。","schema":{"$ref":"#/definitions/ErrorResp"}},"403":{"description":"对被请求页面的访问被禁止。","schema":{"$ref":"#/definitions/ErrorResp"}},"404":{"description":"服务器无法找到被请求的页面。","schema":{"$ref":"#/definitions/ErrorResp"}},"409":{"description":"由于冲突,请求无法被完成。","schema":{"$ref":"#/definitions/ErrorResp"}},"500":{"description":"请求未完成。服务异常。","schema":{"$ref":"#/definitions/ErrorResp"}}},"summary":"创建路由表","tags":["路由表"],"x-apiexplorer-hide":"false","x-constraint":"1、自定义路由表的目的网段,不能被包含在 local 类型路由的网段内\n2、同一个路由表,路由的目的网段不能相同\n3、一次下发的路由条目数,不能超过5条","x-first-open-time":"2019-01-30","x-hybridcloud":"false","x-is-registered":"Y","x-name":"创建路由表","x-open-region-cloud":"hc,hk,otc,tlf,ctc,obc","x-order":59,"x-publishpath":"","x-request-examples-1":{"routetable":{"description":"abc","name":"routetable-1234","routes":[{"destination":"10.10.10.0/24","nexthop":"7c50463d-d36c-4417-aa85-cc11fa10f341","type":"ecs"}],"vpc_id":"60c809cb-6731-45d0-ace8-3bf5626421a9"}},"x-request-examples-description-1":"","x-request-examples-text-1":"{\n \"routetable\": {\n \"name\": \"routetable-1234\",\n \"vpc_id\": \"60c809cb-6731-45d0-ace8-3bf5626421a9\",\n \"routes\": [\n {\n \"type\": \"ecs\",\n \"destination\": \"10.10.10.0/24\",\n \"nexthop\": \"7c50463d-d36c-4417-aa85-cc11fa10f341\"\n }\n ],\n \"description\": \"abc\"\n }\n}","x-request-examples-url-1":"POST https://{Endpoint}/v1/{project_id}/routetables","x-scope":"Commercial","x-source":"SelfDeveloped","x-support-sdk":"Y","x-version":"v1"}}},"product_short":"VPC","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建路由表","tags":"路由表","uri":null,"version":"2.0"}