{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"AsscoiateReq":{"description":"","properties":{"subnets":{"$ref":"#/definitions/AssociateRouteTableAndSubnetReq","description":"关联、解除关联要操作的子网,参见AssociateRouteTableAndSubnetReq对象","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["subnets"]},"AssociateRouteTableAndSubnetReq":{"description":"","properties":{"associate":{"description":"路由表关联子网ID列表","items":{"pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string"},"type":"array","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"},"disassociate":{"description":"路由表解除关联子网ID列表","items":{"pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string"},"type":"array","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}}},"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"]},"RoutetableAssociateReqbody":{"description":"","properties":{"routetable":{"$ref":"#/definitions/AsscoiateReq","description":"路由表对象","x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc"}},"required":["routetable"]},"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":"4b16b48817f549519908ccf7b2425b45","info_version":"v2","method":"post","name":"AssociateRouteTable","parameters":{},"paths":{"/v1/{project_id}/routetables/{routetable_id}/action":{"post":{"consumes":[],"deprecated":false,"description":"路由表关联子网。子网关联路由表A后,再关联B,不需要先跟路由表A解关联再关联路由表B","operationId":"AssociateRouteTable","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,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":"路由表ID","in":"path","name":"routetable_id","pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","required":true,"type":"string","x-example":"575c5798-bb62-4500-a8dc-174ef7d8685f","x-order":3},{"description":"关联路由表与子网请求体","in":"body","name":"RoutetableAssociate","required":true,"schema":{"$ref":"#/definitions/RoutetableAssociateReqbody"},"x-admin":"False","x-internal":"False","x-open-region-cloud":"hc,hk,otc,tlf,ctc,hcso,obc","x-order":4}],"produces":[],"responses":{"200":{"description":"正常返回","examples":{"application/json":{"routetable":{"default":false,"description":"abc","id":"3d42a0d4-a980-4613-ae76-a2cddecff054","name":"routetable_01","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":"只能关联路由表所属vpc下的子网","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":61,"x-publishpath":"","x-request-examples-1":{"routetable":{"subnets":{"associate":["1a8b8c98-3976-401b-a735-8b058109268c"]}}},"x-request-examples-description-1":"","x-request-examples-text-1":"{\n \"routetable\": {\n \"subnets\": {\n \"associate\": [\n \"1a8b8c98-3976-401b-a735-8b058109268c\"\n ]\n }\n }\n}","x-request-examples-url-1":"POST https://{Endpoint}/v1/{project_id}/routetables/{routetable_id}/action","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"}