huawei-cloud-api-definitions-ESW 0.1.20251128

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"Connection":{"properties":{"created_at":{"description":"- 参数解释:二层连接创建时间。\n- 约束限制:UTC时间,格式为yyyy-MM-ddTHH:mm:ss。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","format":"date-time","type":"string"},"fixed_ips":{"description":"- 参数解释:下联面网口主备IP;ESW实例在本端二层子网中占用的主备接口IP。\n- 约束限制:字符串列表,只能设置两个字符串,且每个字符串内容应该是标准IPv4格式;IP必须在二层子网网段范围内。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"[\"1.1.1.1\",\"2.2.2.2\"]","items":{"type":"string"},"type":"array"},"id":{"description":"- 参数解释:二层连接的唯一标识。\n- 约束限制:带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"49bb8306-9b76-4de3-8905-d7a207c8fc54","type":"string"},"instance_id":{"description":"- 参数解释:ESW实例的唯一标识。\n- 约束限制:带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"94e7bf9d-c5a0-40da-9bcb-4407fde1907d","type":"string"},"name":{"description":"- 参数解释:二层连接的名称。\n- 约束限制:\n  - 长度范围为1~64个字符。\n  - 名称由中文、英文字母、数字、下划线(_)、中划线(-)、点(.)组成。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"lisiaa","type":"string"},"project_id":{"description":"- 参数解释:ESW实例所属项目ID。\n- 约束限制:不涉及。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"b2782e6708b8475c993e6064bc456bf8","type":"string"},"remote_infos":{"description":"- 参数解释:远端隧道信息。\n- 约束限制:不涉及。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"[{\"segmentation_id\":7788,\"tunnel_ip\":\"3.3.3.3\",\"tunnel_port\":4788,\"tunnel_type\":\"vxlan\"},{\"segmentation_id\":7788,\"tunnel_ip\":\"4.4.4.4\",\"tunnel_port\":4789,\"tunnel_type\":\"vxlan\"}]","items":{"$ref":"#/definitions/RemoteInfosResult"},"type":"array"},"status":{"description":"- 参数解释:二层连接的状态。\n- 约束限制:不涉及。\n- 取值范围:\n  - pending:准备中\n  - connected:已连接\n  - disconnect:未连接\n  - failed:创建失败\n  - abnormal:异常\n- 默认取值:不涉及。","example":"active","type":"string"},"updated_at":{"description":"- 参数解释:二层连接更新时间。\n- 约束限制:UTC时间,格式为yyyy-MM-ddTHH:mm:ss。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","format":"date-time","type":"string"},"virsubnet_id":{"description":"- 参数解释:二层连接关联的二层子网ID。\n- 约束限制:\n  - 需要使用本租户下可操作的子网资源的ID;此值即为子网详情中的“网络ID”参数值。\n  - 带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"67d2ed7f-f895-46df-a119-3378a2077efd","type":"string"},"vpc_id":{"description":"- 参数解释:ESW所在VPC资源ID。\n- 约束限制:\n  - 需要使用本租户下可操作的VPC资源的ID。\n  - 带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"6b933ada-1ea9-4df9-9770-c94d0a646bf2","type":"string"}},"required":["created_at","fixed_ips","id","instance_id","name","project_id","remote_infos","status","updated_at","virsubnet_id","vpc_id"],"type":"object"},"CreateConnectionOption":{"properties":{"fixed_ips":{"description":"- 参数解释:下联面网口主备IP;ESW实例在本端二层子网中占用的主备接口IP。\n- 约束限制:字符串列表,只能设置两个字符串,且每个字符串内容应该是标准IPv4格式;IP必须在二层子网网段范围内。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"[\"1.1.1.1\",\"2.2.2.2\"]","items":{"type":"string"},"type":"array"},"name":{"description":"- 参数解释:二层连接的名称。\n- 约束限制:\n  - 长度范围为1~64个字符。\n  - 名称由中文、英文字母、数字、下划线(_)、中划线(-)、点(.)组成。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"lisiaa","type":"string"},"remote_infos":{"description":"- 参数解释:远端隧道信息。\n- 约束限制:不涉及。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"[{\"tunnel_ip\":\"3.3.3.3\",\"segmentation_id\":7788,\"tunnel_port\":4788},{\"tunnel_ip\":\"4.4.4.4\",\"segmentation_id\":7788,\"tunnel_port\":4789}]","items":{"$ref":"#/definitions/RemoteInfosOption"},"type":"array"},"virsubnet_id":{"description":"- 参数解释:二层连接关联的二层子网ID。\n- 约束限制:\n  - 需要使用本租户下可操作的子网资源的ID;此值即为子网详情中的“网络ID”参数值。\n  - 带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"67d2ed7f-f895-46df-a119-3378a2077efd","type":"string"},"vpc_id":{"description":"- 参数解释:ESW所在VPC资源ID。\n- 约束限制:\n  - 需要使用本租户下可操作的VPC资源的ID。\n  - 带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","example":"6b933ada-1ea9-4df9-9770-c94d0a646bf2","type":"string"}},"required":["name","remote_infos","virsubnet_id","vpc_id"],"type":"object"},"CreateConnectionRequestBody":{"properties":{"connection":{"$ref":"#/definitions/CreateConnectionOption","description":"- 参数解释:创建二层连接的请求体。\n- 约束限制:不涉及。\n- 取值范围:不涉及。\n- 默认取值:不涉及。"}},"required":["connection"],"type":"object"},"CreateConnectionResponseBody":{"properties":{"connection":{"$ref":"#/definitions/Connection","description":"- 参数解释:创建二层连接的响应体。\n- 约束限制:不涉及。\n- 取值范围:不涉及。\n- 默认取值:不涉及。"},"request_id":{"description":"- 参数解释:请求的唯一标识。\n- 约束限制:UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","type":"string"}},"required":["connection","request_id"],"type":"object"},"RemoteInfosOption":{"properties":{"segmentation_id":{"description":"- 参数解释:二层连接的隧道号,对应VXLAN网络标识VNI。\n- 约束限制:需与对端VXLAN设置的VNI保持一致。\n- 取值范围:1-16777216。\n- 默认取值:不涉及。","example":10000,"format":"int32","type":"integer"},"tunnel_ip":{"description":"- 参数解释:ESW实例的远端隧道IP。\n- 约束限制:需与对端VXLAN设置的VTEP IP保持一致。\n- 取值范围:标准的IPv4格式,例:192.168.1.1。\n- 默认取值:不涉及。","type":"string"},"tunnel_port":{"description":"- 参数解释:二层连接的远端隧道端口。\n- 约束限制:不涉及。\n- 取值范围:4789。\n- 默认取值:不涉及。","format":"int32","type":"integer"}},"required":["segmentation_id","tunnel_ip"],"type":"object"},"RemoteInfosResult":{"properties":{"segmentation_id":{"description":"- 参数解释:二层连接的隧道号,对应VXLAN网络标识VNI。\n- 约束限制:需与对端VXLAN设置的VNI保持一致。\n- 取值范围:1-16777216。\n- 默认取值:不涉及。","example":11000,"format":"int32","type":"integer"},"tunnel_ip":{"description":"- 参数解释:ESW实例的远端隧道IP。\n- 约束限制:不能与已存在的子网IP冲突。\n- 取值范围:标准的IPv4格式,例:192.168.1.1。\n- 默认取值:不涉及。","type":"string"},"tunnel_port":{"description":"- 参数解释:二层连接的远端隧道端口。\n- 约束限制:不涉及。\n- 取值范围:4789。\n- 默认取值:不涉及。","format":"int32","type":"integer"},"tunnel_type":{"description":"- 参数解释:ESW实例的隧道协议类型。\n- 约束限制:不涉及。\n- 取值范围:vxlan。\n- 默认取值:不涉及。","type":"string"}},"required":["segmentation_id","tunnel_ip","tunnel_port","tunnel_type"],"type":"object"}},"description":null,"group_id":"85bc4f8eac384af6b052b0374dba3eac","host":"esw.cn-north-4.myhuaweicloud.com","id":"7e91d089672e4b7397ef3f85f10ec484","info_version":"v1","method":"post","name":"CreateConnection","parameters":{},"paths":{"/v3/{project_id}/l2cg/instances/{instance_id}/connections":{"post":{"description":"当您的ESW实例创建成功后,您可以通过调用此接口在该实例上创建一个二层连接。","operationId":"CreateConnection","parameters":[{"description":"- 参数解释:ESW实例的唯一标识。\n- 约束限制:带“-”的UUID格式。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","in":"path","name":"instance_id","required":true,"type":"string","x-order":2},{"description":"- 参数解释:ESW实例所属项目ID。\n- 约束限制:不涉及。\n- 取值范围:不涉及。\n- 默认取值:不涉及。","in":"path","name":"project_id","required":true,"type":"string","x-order":1},{"in":"body","name":"CreateConnectionRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateConnectionRequestBody"}}],"responses":{"201":{"description":"POST操作正常返回,更多状态码请参见[状态码](esw_api0020.xml)。","examples":{"application/json":{"connection":{"created_at":"2025-07-28T08:39:59Z","fixed_ips":["192.168.0.11","192.168.0.12"],"id":"555fe9b7-62fe-48c6-a73d-a62413f110f1","instance_id":"87fea8df-3e0d-473a-a1bd-e6a76157f4ce","name":"l2conn-7a0c","project_id":"dd9e484e058b48e18b820948dcbd480e","remote_infos":[{"segmentation_id":7127,"tunnel_ip":"192.168.111.111","tunnel_port":4789,"tunnel_type":"vxlan"}],"status":"pending","updated_at":"2025-07-28T08:39:59Z","virsubnet_id":"2c649856-0d44-400c-8194-f6d67603e0eb","vpc_id":"6ae030de-f630-476e-8284-7bcfbd94929d"},"request_id":"318ad7fa0bae74f2b0a22b44d6740309"}},"schema":{"$ref":"#/definitions/CreateConnectionResponseBody"}}},"summary":"创建二层连接","tags":["二层连接"],"x-api-type":"open-api","x-apiexplorer-hide":"false","x-first-open-time":"","x-hybridcloud":"false","x-is-registered":"Y","x-name":"createConnection","x-open-region-cloud":"hws,hws_hk,hws_test,hws_eu,dt,dt_test","x-order":0,"x-publishpath":"","x-request-examples-1":{"connection":{"fixed_ips":["192.168.0.11","192.168.0.12"],"name":"l2conn-7a0c","remote_infos":[{"segmentation_id":7127,"tunnel_ip":"192.168.111.111","tunnel_port":4789}],"virsubnet_id":"2c649856-0d44-400c-8194-f6d67603e0eb","vpc_id":"6ae030de-f630-476e-8284-7bcfbd94929d"}},"x-request-examples-text-1":{"connection":{"fixed_ips":["192.168.0.11","192.168.0.12"],"name":"l2conn-7a0c","remote_infos":[{"segmentation_id":7127,"tunnel_ip":"192.168.111.111","tunnel_port":4789}],"virsubnet_id":"2c649856-0d44-400c-8194-f6d67603e0eb","vpc_id":"6ae030de-f630-476e-8284-7bcfbd94929d"}},"x-request-examples-url-1":"POST https://{endpoint}/v3/dd9e484e058b48e18b820948dcbd480e/l2cg/instances/87fea8df-3e0d-473a-a1bd-e6a76157f4ce/connections","x-scope":"Commercial","x-source":"SelfDeveloped","x-support-sdk":"Y"}}},"product_short":"ESW","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建二层连接","tags":"二层连接","uri":null,"version":"2.0"}