华为云用户手册

  • 响应示例 状态码:200 PUT操作正常返回,更多状态码请参见状态码。 { "sub_network_interface" : { "id" : "4c2b455a-4c75-4c4d-bada-727be4d0f7b5", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.160", "ipv6_ip_address" : null, "mac_address" : "fa:16:3e:26:7e:1e", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "aaa", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 3413, "state" : null, "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:21:16Z" }, "request_id" : "d346a69661d82c7b14bdc7ac0cd62cbd" }
  • URI GET /v3/{project_id}/vpc/address-groups 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 获取方式请参见获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 功能说明:每页返回的个数。 取值范围:0~2000。 marker 否 String 分页查询起始的资源ID,为空时查询第一页。 id 否 Array of strings 地址组唯一标识,填写后接口按照id进行过滤,支持多ID同时过滤。 name 否 Array of strings 地址组名称,填写后按照名称进行过滤,支持多名称同时过滤。 ip_version 否 Integer 功能说明:IP地址组ip版本,填写后按照ip版本进行过滤。 取值范围:4、6。 description 否 Array of strings 地址组描述信息,填写后按照地址组描述信息过滤,支持多描述同时过滤。 enterprise_project_id 否 String 功能说明:企业项目ID。可以使用该字段过滤某个企业项目下的IP地址组。 取值范围:最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。“0”表示默认企业项目。若需要查询当前用户所有企业项目绑定的IP地址组,请传参all_granted_eps。 最大长度:36
  • 响应示例 状态码:200 GET操作正常返回,更多状态码请参见状态码。 { "address_groups" : [ { "id" : "dd18a501-fcd5-4adc-acfe-b0e2384baf08", "name" : "AutoTester746010.580123789", "tenant_id" : "b2782e6708b8475c993e6064bc456bf8", "ip_version" : 4, "max_capacity" : 20, "ip_set" : [ "192.168.5.0/24", "192.168.3.20-192.168.3.100", "192.168.3.40", "192.168.3.2" ], "ip_extra_set" : [ { "ip" : "192.168.5.0/24", "remarks" : null }, { "ip" : "192.168.3.20-192.168.3.100", "remarks" : null }, { "ip" : "192.168.3.40", "remarks" : null }, { "ip" : "192.168.3.2", "remarks" : null } ], "enterprise_project_id" : "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", "created_at" : "2019-06-28T02:06:38.000+00:00", "updated_at" : "2019-06-28T02:06:38.000+00:00", "description" : "test", "status" : "NORMAL", "status_message" : "" } ], "page_info" : { "previous_marker" : "dd18a501-fcd5-4adc-acfe-b0e2384baf08", "current_count" : 1 }, "request_id" : "e51fa17c-3259-4122-afb1-9c03d4ef5408" }
  • URI GET /v3/{project_id}/vpc/traffic-mirror-filter-rules/{traffic_mirror_filter_rule_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 获取方式请参见获取项目ID。 traffic_mirror_filter_rule_id 是 String 流量镜像筛选规则ID
  • 响应示例 状态码:200 OK { "traffic_mirror_filter_rule" : { "created_at" : "2023-02-23T16:08:45.000+00:00", "updated_at" : "2023-02-23T16:17:12.000+00:00", "id" : "2230d5a2-1868-4264-b917-0e06fa132898", "project_id" : "7365fcd452924e398ec4cc1fe39c0d12", "description" : 123, "traffic_mirror_filter_id" : "417d7317-6c17-4428-a0f3-997d3e2293a0", "direction" : "ingress", "protocol" : "TCP", "ethertype" : "IPv4", "source_cidr_block" : "8.8.8.8/32", "destination_cidr_block" : "9.9.9.9/32", "destination_port_range" : "10-65535", "action" : "accept", "priority" : 20 }, "request_id" : "ca9682cf-0680-469f-bb04-5b0f17b075d0" }
  • 请求示例 批量创建3个辅助弹性网卡,虚拟子网id为115b5a84-31dc-4b1e-8de9-bf5a75d2c566,宿主网络接口id为8b6c46f1-c68d-4bba-a922-2d97da185af5,关联安全组6727c950-9f01-47a2-a7aa-7d3686c4c95b。 POST https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces/batch-create { "sub_network_interface" : { "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5" }, "count" : 3 }
  • 响应示例 状态码:201 POST操作正常返回,更多状态码请参见状态码。 { "sub_network_interfaces" : [ { "id" : "4c2b455a-4c75-4c4d-bada-727be4d0f7b5", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.160", "ipv6_ip_address" : null, "mac_address" : "fa:16:3e:26:7e:1e", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 3413, "state" : null, "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:21:16Z" }, { "id" : "a9ecbff0-d24f-493d-b62c-ee9b916db23a", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.20", "ipv6_ip_address" : null, "mac_address" : "fa:16:3e:26:7e:92", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 595, "state" : null, "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:21:16Z" } ], "request_id" : "3f8a9620bea08c3e6ce0d4004d71f0c8" }
  • 响应示例 状态码:200 OK { "request_id" : "197e0ed1-f59f-473b-9363-74666a7d3710", "traffic_mirror_filter_rule" : { "created_at" : "2023-03-09T13:14:47.000+00:00", "updated_at" : "2023-03-09T13:16:43.000+00:00", "id" : "7c12805a-1b8d-40b5-ab23-a8fac480f2ec", "project_id" : "7365fcd452924e398ec4cc1fe39c0d12", "description" : "", "traffic_mirror_filter_id" : "417d7317-6c17-4428-a0f3-997d3e2293a0", "direction" : "ingress", "protocol" : "ICMP", "ethertype" : "IPv4", "source_cidr_block" : "80-90", "destination_cidr_block" : "192.168.1.0/24", "source_port_range" : "10.0.0.0/8", "action" : "reject", "priority" : 23 } }
  • 请求示例 更新ID为7c12805a-1b8d-40b5-ab23-a8fac480f2ec的流量镜像筛选规则,策略更新为reject PUT http://{endpoint}/v3/{project_id}/vpc/traffic-mirror-filter-rules/7c12805a-1b8d-40b5-ab23-a8fac480f2ec { "traffic_mirror_filter_rule" : { "source_port_range" : "80-90", "destination_cidr_block" : "192.168.1.0/24", "source_cidr_block" : "10.0.0.0/8", "action" : "reject" } }
  • URI PUT /v3/{project_id}/vpc/traffic-mirror-filter-rules/{traffic_mirror_filter_rule_id} 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 获取方式请参见获取项目ID。 traffic_mirror_filter_rule_id 是 String 流量镜像筛选条件规则ID
  • 响应示例 状态码:200 GET操作正常返回,更多状态码请参见状态码。 { "security_group" : { "id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "name" : "security_group_1", "project_id" : "060576782980d5762f9ec014dd2f1148", "description" : "security group description", "enterprise_project_id" : 0, "tags" : [ { "key" : "a", "value" : "b" } ], "security_group_rules" : [ { "id" : "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80", "project_id" : "060576782980d5762f9ec014dd2f1148", "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "direction" : "ingress", "description" : "", "created_at" : "2020-07-09T05:56:27.000+00:00", "updated_at" : "2020-07-09T05:56:27.000+00:00", "ethertype" : "IPv6", "action" : "allow", "priority" : 100, "protocol" : null, "multiport" : null, "remote_ip_prefix" : null, "remote_address_group_id" : null, "enabled" : true }, { "id" : "3d6480e8-9ea4-46dc-bb1b-8db190cd5677", "project_id" : "060576782980d5762f9ec014dd2f1148", "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "direction" : "egress", "description" : "", "created_at" : "2020-07-09T05:56:27.000+00:00", "updated_at" : "2020-07-09T05:56:27.000+00:00", "ethertype" : "IPv6", "action" : "allow", "priority" : 100, "protocol" : null, "multiport" : null, "remote_ip_prefix" : null, "remote_group_id" : null, "remote_address_group_id" : null, "enabled" : true }, { "id" : "9581f18c-1fdd-43da-ace9-7758a56ef28a", "project_id" : "060576782980d5762f9ec014dd2f1148", "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "direction" : "egress", "description" : "", "created_at" : "2020-07-09T05:56:27.000+00:00", "updated_at" : "2020-07-09T05:56:27.000+00:00", "ethertype" : "IPv4", "action" : "allow", "priority" : 100, "protocol" : null, "multiport" : null, "remote_ip_prefix" : null, "remote_group_id" : null, "remote_address_group_id" : null, "enabled" : true }, { "id" : "a3ba270e-e58b-432d-a912-aeb7eace9fb8", "project_id" : "060576782980d5762f9ec014dd2f1148", "security_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "remote_group_id" : "69c999ad-d9ef-4d79-94fd-35e6ceb75325", "direction" : "ingress", "description" : "", "created_at" : "2020-07-09T05:56:27.000+00:00", "updated_at" : "2020-07-09T05:56:27.000+00:00", "ethertype" : "IPv4", "action" : "allow", "priority" : 100, "protocol" : null, "multiport" : null, "remote_ip_prefix" : null, "remote_address_group_id" : null, "enabled" : true } ], "created_at" : "2020-07-09T05:56:27.000+00:00", "updated_at" : "2020-07-09T05:56:27.000+00:00" }, "request_id" : "a8cf4f79ca3c22ca685e7e8872e8c20b" }
  • 请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 traffic_mirror_session 是 TrafficMirrorSourcesOption object 流量镜像会话对象 表3 TrafficMirrorSourcesOption 参数 是否必选 参数类型 描述 traffic_mirror_sources 是 Array of strings 功能说明:镜像源ID列表
  • URI PUT /v3/{project_id}/vpc/traffic-mirror-sessions/{traffic_mirror_session_id}/remove-sources 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 获取方式请参见获取项目ID。 traffic_mirror_session_id 是 String 流量镜像会话ID
  • 请求示例 移除ID为e15a6e40-2580-4949-bf2a-55ee7cd49392的镜像会话中的镜像源6134900d-31a6-4b71-8453-dbca7f26982a PUT https://{endpoint}/v3/{project_id}/vpc/traffic-mirror-sessions/e15a6e40-2580-4949-bf2a-55ee7cd49392/remove-sources { "traffic_mirror_session" : { "traffic_mirror_sources" : [ "6134900d-31a6-4b71-8453-dbca7f26982a" ] } }
  • 响应示例 状态码:200 OK { "traffic_mirror_session" : { "name" : "test-session", "created_at" : "2023-02-23T06:57:39.000+00:00", "updated_at" : "2023-02-23T06:57:39.000+00:00", "id" : "e15a6e40-2580-4949-bf2a-55ee7cd49392", "project_id" : "7365fcd452924e398ec4cc1fe39c0d12", "description" : "", "traffic_mirror_filter_id" : "b765ba87-c0b4-4f1a-9ec3-d5b1d1ddb137", "traffic_mirror_sources" : [ ], "traffic_mirror_target_id" : "", "traffic_mirror_target_type" : "", "virtual_network_id" : 1, "packet_length" : 96, "priority" : 6, "enabled" : true, "type" : "eni" }, "request_id" : "6f107fc1-93be-4d5a-af71-4099da7eeaa9" }
  • 请求示例 创建辅助弹性网卡,虚拟子网id为08278e6c-61ca-46c1-9fc3-0d4f6c12f193,宿主网络接口id为637748df-2986-4350-8303-95d259580fb3,关联安全组6727c950-9f01-47a2-a7aa-7d3686c4c95b。 POST https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces { "sub_network_interface" : { "virsubnet_id" : "08278e6c-61ca-46c1-9fc3-0d4f6c12f193", "parent_id" : "637748df-2986-4350-8303-95d259580fb3", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ] } }
  • 响应示例 状态码:201 POST操作正常返回,更多状态码请参见状态码。 { "sub_network_interface" : { "id" : "1f5fca65-6a75-47c8-942b-db1bbb81a22a", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.219", "ipv6_ip_address" : "2407:c080:1200:2038:53a4:ad1c:ef34:f4ef", "mac_address" : "fa:16:3e:26:7e:59", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 551, "state" : "NORMAL", "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:17:16Z" }, "request_id" : "f0893730b622bf32beea6fa5b387a5dc" }
  • 请求示例 创建一条流量镜像筛选规则,入方向,筛选条件ID为417d7317-6c17-4428-a0f3-997d3e2293a0,源cidr为192.168.0.0/24。 POST http://{endpoint}/v3/{project_id}/vpc/traffic-mirror-filter-rules { "traffic_mirror_filter_rule" : { "traffic_mirror_filter_id" : "417d7317-6c17-4428-a0f3-997d3e2293a0", "ethertype" : "ipv4", "direction" : "ingress", "protocol" : "ICMP", "source_cidr_block" : "192.168.0.0/24", "action" : "accept", "priority" : 29 } }
  • 响应示例 状态码:201 Created { "request_id" : "8dec5453-1690-4378-a976-40ba5e6d62ff", "traffic_mirror_filter_rule" : { "created_at" : "2023-03-22T07:07:55.000+00:00", "updated_at" : "2023-03-22T07:07:55.000+00:00", "id" : "1be5f64b-49a1-427d-a49e-9619cfb0492c", "project_id" : "7365fcd452924e398ec4cc1fe39c0d12", "description" : "", "traffic_mirror_filter_id" : "417d7317-6c17-4428-a0f3-997d3e2293a0", "direction" : "ingress", "protocol" : "ICMP", "ethertype" : "IPv4", "source_cidr_block" : "192.168.0.0/24", "action" : "accept", "priority" : 29 } }
  • 请求示例 更新ID为16538eda-7e94-4b90-b5f3-a653f62dc817的流量镜像会话,镜像目的类型为elb,镜像目的ID为c9f8acef-d550-4fbe-be7c-e8bfd3501dc1 PUT http://{endpoint}/v3/{project_id}/vpc/traffic-mirror-sessions/16538eda-7e94-4b90-b5f3-a653f62dc817 { "traffic_mirror_session" : { "traffic_mirror_target_id" : "c9f8acef-d550-4fbe-be7c-e8bfd3501dc1", "traffic_mirror_target_type" : "elb" } }
  • 响应示例 状态码:200 OK { "traffic_mirror_session" : { "name" : "test-session", "created_at" : "2023-03-23T10:53:12.000+00:00", "updated_at" : "2023-03-23T10:56:54.000+00:00", "id" : "16538eda-7e94-4b90-b5f3-a653f62dc817", "project_id" : "7365fcd452924e398ec4cc1fe39c0d12", "description" : "", "traffic_mirror_filter_id" : "b765ba87-c0b4-4f1a-9ec3-d5b1d1ddb137", "traffic_mirror_sources" : [ "6134900d-31a6-4b71-8453-dbca7f26982a" ], "traffic_mirror_target_id" : "c9f8acef-d550-4fbe-be7c-e8bfd3501dc1", "traffic_mirror_target_type" : "elb", "virtual_network_id" : 1, "packet_length" : 96, "priority" : 11, "enabled" : true, "type" : "eni" }, "request_id" : "a7ee4a0e-12e9-457a-b739-46bffb2e7bbb" }
  • 响应示例 状态码:200 GET操作正常返回,更多状态码请参见状态码。 { "security_group_rule" : { "id" : "f626eb24-d8bd-4d26-ae0b-c16bb65730cb", "project_id" : "060576782980d5762f9ec014dd2f1148", "security_group_id" : "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", "direction" : "ingress", "protocol" : "tcp", "description" : "security group rule description", "created_at" : "2020-08-13T07:12:36.000+00:00", "updated_at" : "2020-08-13T07:12:36.000+00:00", "ethertype" : "IPv4", "remote_ip_prefix" : "10.10.0.0/16", "multiport" : 333, "action" : "allow", "priority" : 1, "remote_group_id" : null, "remote_address_group_id" : null, "enabled" : true }, "request_id" : "034c4840bde0b1263a4b2e66fbd74d5f" }
  • 请求示例 添加扩展网段,vpc id为99d9d709-8478-4b46-9f3f-2206b1023fd3,添加的扩展网段为23.8.0.0/16。 PUT https://{Endpoint}/v3/{project_id}/vpc/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3/add-extend-cidr { "vpc" : { "extend_cidrs" : [ "23.8.0.0/16" ] } }
  • 响应示例 状态码:200 PUT操作正常返回,更多状态码请参见状态码。 { "request_id" : "84eb4f775d66dd916db121768ec55626", "vpc" : { "id" : "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", "name" : "vpc1", "description" : "test1", "cidr" : "192.168.0.0/16", "extend_cidrs" : [ "23.8.0.0/16" ], "enterprise_project_id" : "0", "tags" : [ { "key" : "key", "value" : "value" } ], "cloud_resources" : [ { "resource_type" : "routetable", "resource_count" : 1 } ], "status" : "ACTIVE", "project_id" : "060576782980d5762f9ec014dd2f1148", "created_at" : "2018-03-23T09:26:08", "updated_at" : "2018-08-24T08:49:53" } } 状态码:202 API V3的指定预检请求正常返回,更多状态码请参见状态码。 { "error_msg" : "Request validation has been passed with dry run...", "error_code" : "SYS.0202", "request_id" : "cfd81aea3f59eac7128dba4b36d516c8" }
  • 请求参数 表2 请求Body参数 参数 是否必选 参数类型 描述 dry_run 否 Boolean 功能说明:是否只预检此次请求。 取值范围: true:发送检查请求,不会添加扩展网段。检查项包括是否填写了必需参数、请求格式、业务限制。如果检查不通过,则返回对应错误。如果检查通过,则返回响应码202。 false(默认值):发送正常请求,并直接添加VPC扩展网段。 vpc 是 AddExtendCidrOption object 添加VPC扩展网段请求体。 表3 AddExtendCidrOption 参数 是否必选 参数类型 描述 extend_cidrs 是 Array of strings 功能说明:扩展cidr列表。 取值范围:不能包含以下网段 100.64.0.0/10 214.0.0.0/7 198.18.0.0/15 169.254.0.0/16 0.0.0.0/8 127.0.0.0/8 240.0.0.0/4 172.31.0.0/16 192.168.0.0/16 255.255.255.255/32
  • 响应示例 状态码:200 GET操作正常返回,更多状态码请参见状态码。 { "request_id" : "84eb4f775d66dd916db121768ec55626", "vpc" : { "id" : "0552091e-b83a-49dd-88a7-4a5c86fd9ec3", "name" : "name-test", "description" : "description-test", "cidr" : "192.168.0.0/16", "extend_cidrs" : [ "21.8.0.0/16" ], "enterprise_project_id" : "0", "tags" : [ { "key" : "key", "value" : "value" } ], "cloud_resources" : [ { "resource_type" : "routetable", "resource_count" : 1 } ], "status" : "ACTIVE", "project_id" : "060576782980d5762f9ec014dd2f1148", "created_at" : "2018-03-23T09:26:08", "updated_at" : "2018-08-24T08:49:53" } }
  • 请求示例 使用辅助弹性网卡ID过滤查询辅助弹性网卡列表。 GET https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces?id=022b5c53-20e1-4f4b-b90c-0575a5e97412&id=056d6cb4-b436-460d-9a63-67666bf3ea9c 多条件组合过滤查询辅助弹性网卡 https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces?virsubnet_id=3eae2c96-de45-4c41-bf2d-e4ad53a2acb4&private_ip_address=192.168.22.177&parent_id=5eb9dc59-8159-4197-88ea-f3507ad8e0a7 分页查询辅助弹性网卡列表 GET https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces?limit=2
  • 响应示例 状态码:200 GET操作正常返回,更多状态码请参见状态码。 { "request_id" : "db2bd86cad7519610d9d405228e63076", "sub_network_interfaces" : [ { "id" : "4c2b455a-4c75-4c4d-bada-727be4d0f7b5", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.160", "ipv6_ip_address" : null, "mac_address" : "fa:16:3e:26:7e:1e", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 3413, "state" : null, "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:21:16Z" }, { "id" : "a9ecbff0-d24f-493d-b62c-ee9b916db23a", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.20", "ipv6_ip_address" : null, "mac_address" : "fa:16:3e:26:7e:92", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 595, "state" : null, "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:21:16Z" } ], "page_info" : { "previous_marker" : "4c2b455a-4c75-4c4d-bada-727be4d0f7b5", "current_count" : 2 } }
  • URI GET /v3/{project_id}/vpc/sub-network-interfaces 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。 获取方式请参见获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 功能说明:每页返回的个数。 取值范围:0-2000。 marker 否 String 分页查询起始的资源ID,为空时查询第一页。 id 否 Array of strings 功能说明:辅助弹性网卡ID,支持多ID过滤。 使用场景:查询需要的多个辅助弹性网卡信息。 description 否 Array of strings 功能说明:辅助弹性网卡的描述信息,支持多个同时过滤。 使用场景:通过描述信息过滤辅助弹性网卡。 vpc_id 否 Array of strings 功能说明:辅助弹性网卡所属的VPC_ID,支持多ID过滤。 使用场景:过滤单个或多个VPC下的辅助弹性网卡信息。 virsubnet_id 否 Array of strings 功能说明:辅助弹性网卡所属虚拟子网的ID,支持多个ID过滤。 使用场景:过滤需要的单个或者多个虚拟子网下的辅助弹性网卡。 parent_id 否 Array of strings 功能说明:辅助弹性网卡的宿主网卡的ID,支持多ID过滤。 使用场景:过滤单个或多个宿主网卡下存在的辅助弹性网卡。 private_ip_address 否 Array of strings 功能说明:辅助弹性网卡的私有IPv4地址,支持多个地址同时过滤。 使用场景:通过单个或者多个ip地址过滤查询辅助弹性网卡。 mac_address 否 Array of strings 功能说明:辅助弹性网卡的mac地址,支持多个同时过滤。 使用场景:使用mac地址精确过滤辅助弹性网卡。 enable_eip 否 Boolean 功能说明:按照“是否关联EIP”过滤查询。 scope 否 String 功能说明:按照publicBorderGroup过滤查询。 security_groups 否 String 功能说明:辅助弹性网卡绑定的安全组id,支持多个id同时过滤。 parent_device_id 否 String 功能说明:辅助弹性网卡绑定的设备id,支持多个id同时过滤。 vlan_id 否 Integer 功能说明:辅助弹性网卡的VLAN ID,支持多个id同时过滤。 取值范围:1-4094。 state 否 String 功能说明:辅助弹性网卡当前状态, 支持多个同时过滤。 取值范围:NORMAL, UNBOUND。 ipv6_ip_address 否 String 功能说明:功能说明:辅助弹性网卡的IPv6地址,支持多个同时过滤。 project_id 否 String 功能说明:辅助弹性网卡所属项目ID,支持多个id同时过滤。 instance_id 否 String 功能说明: 辅助弹性网卡所属实例ID,例如RDS实例ID, 支持多个id同时过滤。 instacne_type 否 String 功能说明:辅助弹性网卡所属实例类型,例如“RDS”, 支持多个同时过滤。
  • 响应示例 状态码:200 GET操作正常返回,更多状态码请参见状态码。 { "sub_network_interface" : { "id" : "4c2b455a-4c75-4c4d-bada-727be4d0f7b5", "project_id" : "6b32266bded64091a138e9ec19cff361", "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702", "private_ip_address" : "192.168.0.160", "ipv6_ip_address" : null, "mac_address" : "fa:16:3e:26:7e:1e", "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d", "security_enabled" : false, "security_groups" : [ ], "allowed_address_pairs" : [ ], "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e", "instance_id" : "", "instance_type" : "", "description" : "", "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2", "vlan_id" : 3413, "state" : null, "tags" : [ ], "scope" : "center", "created_at" : "2025-02-10T08:21:16Z" }, "request_id" : "16fe2bcb91bd7ad03a895adbc63bf44e" }
共100000条
提示

您即将访问非华为云网站,请注意账号财产安全