华为云用户手册

  • 响应参数 状态码: 200 表6 响应Body参数 参数 参数类型 描述 resources Array of ListResourceResp objects 资源列表 total_count Integer 资源数量 request_id String 请求ID 表7 ListResourceResp 参数 参数类型 描述 resource_id String 资源ID resource_detail Object 资源详情。 资源对象,用于扩展。默认为空 resource_name String 资源名称,资源没有名称时默认为空字符串. tags Array of ResourceTag objects 标签列表,没有标签默认为空数组 表8 ResourceTag 参数 参数类型 描述 key String 功能说明:标签键。 约束:同一资源的key值不能重复。 最小长度:1 最大长度:128 value String 功能说明:标签值。 最大长度:255 状态码: 400 表9 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 401 表10 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 403 表11 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 404 表12 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 500 表13 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。
  • 响应示例 状态码: 200 请求正常返回 { "resources" : [ { "resource_id" : "55046c0b-f38e-4bc4-988a-06529b34a7db", "resource_detail" : "", "resource_name" : "network_aclv3_test", "tags" : [ { "key" : "key1", "value" : "value1" }, { "key" : "key2", "value" : "value2" } ] }, { "resource_id" : "1828c600-793d-4570-987b-ac59f3ef0734", "resource_detail" : "", "resource_name" : "network_aclv3_test", "tags" : [ { "key" : "key1", "value" : "value1" }, { "key" : "key5", "value" : "value5" } ] } ], "request_id" : "2d9cef8c-4e17-40bc-9111-f3fc97b97294", "total_count" : 2 }
  • URI POST /v3/{project_id}/firewalls/resource-instances/filter 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 功能说明:查询记录数 取值范围:1-1000 约束:默认为1000 缺省值:1000 offset 否 Integer 功能说明:索引位置, 从第一条数据偏移offset条数据后开始查询 约束:默认为0(偏移0条数据,表示从第一条数据开始查询),必须为数字,不能为负数 缺省值:0
  • 请求示例 创建地址组,命名为AutoTester746010.580123789,指定ip类型为IPv4,地址集包含:192.168.3.2、192.168.3.40、192.168.3.20-192.168.3.100、192.168.5.0/24。 POST https://{{endpoint}}/v3/b2782e6708b8475c993e6064bc456bf8/vpc/address-groups { "address_group" : { "ip_version" : 4, "name" : "AutoTester746010.580123789", "ip_set" : [ "192.168.3.2", "192.168.3.40", "192.168.3.20-192.168.3.100", "192.168.5.0/24" ], "description" : "test", "enterprise_project_id" : "0aad99bc-f5f6-4f78-8404-c598d76b0ed2", "max_capacity" : 20 } }
  • 响应示例 状态码: 201 POST操作正常返回,更多状态码请参见状态码。 { "address_group" : { "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" : "" }, "request_id" : "f568db7a-2675-4271-8747-3e3f1c6381ba" }
  • 响应参数 状态码: 400 表2 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 401 表3 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 403 表4 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 404 表5 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 409 表6 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 500 表7 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999
  • 响应示例 状态码: 201 Created { "traffic_mirror_session" : { "name" : "test-session", "created_at" : "2023-03-23T10:53:12.000+00:00", "updated_at" : "2023-03-23T10:53:12.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" : "eni", "virtual_network_id" : 1, "packet_length" : 96, "priority" : 11, "enabled" : true, "type" : "eni" }, "request_id" : "9a880225-1d2f-461e-8d8e-1866bfda77db" }
  • 请求示例 创建流量镜像会话,命名为test-session POST http://{endpoint}/v3/{project_id}/vpc/traffic-mirror-sessions { "traffic_mirror_session" : { "name" : "test-session", "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" : "eni", "priority" : 11 } }
  • 响应示例 状态码: 200 OK { "traffic_mirror_filter" : { "id" : "59d2b2e7-0d35-41f7-a12e-f7699366cd21", "project_id" : "49a42f378df747bf8b8f6a70e25b63fb", "name" : "test1", "description" : "new_filter", "ingress_rules" : [ ], "egress_rules" : [ ], "created_at" : "2022-08-29T06:22:01.000+00:00", "updated_at" : "2022-08-29T06:22:01.000+00:00" }, "request_id" : "f05abcd9-fa75-43a5-a795-b3d8e8b7a9e9" }
  • 响应示例 状态码: 200 PUT操作正常返回,更多状态码请参见状态码。 { "firewall" : { "id" : "e9a7731d-5bd9-4250-a524-b9a076fd5629", "name" : "network_acl_test1", "description" : "network_acl_test1", "project_id" : "9476ea5a8a9849c38358e43c0c3a9e12", "created_at" : "2022-04-07T07:30:46.000+00:00", "updated_at" : "2022-04-07T07:30:46.000+00:00", "admin_state_up" : true, "enterprise_project_id" : "158ad39a-dab7-45a3-9b5a-2836b3cf93f9", "status" : "ACTIVE", "tags" : [ ], "ingress_rules" : [ { "id" : "e9a7731d-5bd9-4250-a524-b9a076fd5629", "name" : "network_acl_rule test", "description" : "network_acl_rule test", "action" : "allow", "project_id" : "9476ea5a8a9849c38358e43c0c3a9e12", "protocol" : "tcp", "ip_version" : 4, "source_ip_address" : "192.168.3.0/24", "destination_ip_address" : "192.168.6.0/24", "source_port" : "30-40,60-90", "destination_port" : "40-60,70-90" } ], "egress_rules" : [ { "id" : "f9a7731d-5bd9-4250-a524-b9a076fd5629", "name" : "network_acl_rule test", "description" : "network_acl_rule test", "action" : "allow", "project_id" : "9476ea5a8a9849c38358e43c0c3a9e12", "protocol" : "tcp", "ip_version" : 4, "source_ip_address" : "192.168.3.0/24", "destination_ip_address" : "192.168.6.0/24", "source_port" : "30-40,60-90", "destination_port" : "40-60,70-90" } ], "associations" : [ { "virsubnet_id" : "8359e5b0-353f-4ef3-a071-98e67a34a143" } ] } }
  • 请求示例 插入一条入方向规则到id为e9a7731d-5bd9-4250-a524-b9a076fd5629的网络ACL中,插入到规则e9a7731d-5bd9-4250-a524-b9a076fd5630后面。 PUT https://{Endpoint}/v3/{project_id}/vpc/firewalls/e9a7731d-5bd9-4250-a524-b9a076fd5629/insert-rules { "firewall" : { "ingress_rules" : [ { "name" : "network_acl_rule test", "description" : "network_acl_rule test", "action" : "allow", "protocol" : "tcp", "ip_version" : "4", "source_ip_address" : "192.168.3.0/24", "destination_ip_address" : "192.168.6.0/24", "source_port" : "30-40,60-90", "destination_port" : "40-60,70-90", "source_address_group_id" : null, "destination_address_group_id" : null } ], "insert_after_rule" : "e9a7731d-5bd9-4250-a524-b9a076fd5630" } } 插入一条出方向规则到id为e9a7731d-5bd9-4250-a524-b9a076fd5629的网络ACL中,插入到规则e9a7731d-5bd9-4250-a524-b9a076fd5630之后。 PUT https://{Endpoint}/v3/{project_id}/vpc/firewalls/e9a7731d-5bd9-4250-a524-b9a076fd5629/insert-rules { "firewall" : { "egress_rules" : [ { "name" : "network_acl_rule test", "description" : "network_acl_rule test", "action" : "allow", "protocol" : "tcp", "ip_version" : "4", "source_ip_address" : "192.168.3.0/24", "destination_ip_address" : "192.168.6.0/24", "source_port" : "30-40,60-90", "destination_port" : "40-60,70-90", "source_address_group_id" : null, "destination_address_group_id" : null } ], "insert_after_rule" : "e9a7731d-5bd9-4250-a524-b9a076fd5630" } }
  • 请求示例 更新id为2be868f2-f7c9-48db-abc0-eea0b9105b0d的辅助弹性网卡,更新关联的安全组列表。 PUT https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces/2be868f2-f7c9-48db-abc0-eea0b9105b0d { "sub_network_interface" : { "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ { "ip_address" : "1.1.1.1/0" } ] } }
  • 响应示例 状态码: 200 PUT操作正常返回,更多状态码请参见状态码。 { "sub_network_interface" : { "id" : "2be868f2-f7c9-48db-abc0-eea0b9105b0d", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "08278e6c-61ca-46c1-9fc3-0d4f6c12f193", "private_ip_address" : "10.0.0.225", "mac_address" : "fa:16:3e:48:f8:6f", "parent_device_id" : "1ab01f1d-4ef7-4d83-82be-802b3aca0223", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ { "ip_address" : "1.1.1.1/0" } ], "vpc_id" : "63b97e6b-3598-430f-9eb8-1caf06937be8", "parent_id" : "637748df-2986-4350-8303-95d259580fb3", "vlan_id" : 2787, "instance_type" : "", "instance_id" : "", "tags" : [ ], "created_at" : "2020-05-19T01:16:25.000+00:00" }, "request_id" : "ceb6273e-1ec9-4168-ac11-3dfeaacfc889" }
  • 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 地址组唯一标识,填写后接口按照id进行过滤,支持多ID同时过滤。 name 否 Array 地址组名称,填写后按照名称进行过滤,支持多名称同时过滤。 ip_version 否 Integer 功能说明:IP地址组ip版本,填写后按照ip版本进行过滤。 取值范围:4、6。 description 否 Array 地址组描述信息,填写后按照地址组描述信息过滤,支持多描述同时过滤。 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" }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 tags Array of ResourceTag objects tag对象列表 request_id String 请求ID 表3 ResourceTag 参数 参数类型 描述 key String 功能说明:标签键。 约束:同一资源的key值不能重复。 最小长度:1 最大长度:128 value String 功能说明:标签值。 最大长度:255 状态码: 400 表4 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 401 表5 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 403 表6 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 404 表7 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。 状态码: 500 表8 响应Body参数 参数 参数类型 描述 request_id String 请求ID。 error_msg String 错误消息。 error_code String 错误码。
  • 请求示例 批量创建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" : "d1f8094c-bb3d-43c5-b625-52dd43eab451", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "private_ip_address" : "192.168.6.245", "ipv6_ip_address" : "2001:db8:a583:5d:11e8:b908:4fe6:9802", "mac_address" : "fa:16:3e:97:1f:f5", "parent_device_id" : "11185aa2-4e08-4d9e-87ed-84817280eaa7", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "description" : "", "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5", "vlan_id" : 41, "instance_type" : "", "instance_id" : "", "tags" : [ ] }, { "id" : "0dce57ab-00de-443b-a7fe-e8ff68bd95bc", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "private_ip_address" : "192.168.6.75", "ipv6_ip_address" : "2001:db8:a583:5d:6c22:8ea2:c061:a802", "mac_address" : "fa:16:3e:5a:61:84", "parent_device_id" : "11185aa2-4e08-4d9e-87ed-84817280eaa7", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "description" : "", "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5", "vlan_id" : 42, "instance_type" : "", "instance_id" : "", "tags" : [ ] }, { "id" : "1eca03ee-c0f1-4434-9c4c-87fe4426718c", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "115b5a84-31dc-4b1e-8de9-bf5a75d2c566", "private_ip_address" : "192.168.6.194", "ipv6_ip_address" : "2001:db8:a583:5d:2b45:a3ae:17db:ec02", "mac_address" : "fa:16:3e:b8:ec:6d", "parent_device_id" : "11185aa2-4e08-4d9e-87ed-84817280eaa7", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "description" : "", "parent_id" : "8b6c46f1-c68d-4bba-a922-2d97da185af5", "vlan_id" : 43, "instance_type" : "", "instance_id" : "", "tags" : [ ] } ], "request_id" : "344544c1-d053-4ad3-b673-900a0e01db7e" }
  • 响应示例 状态码: 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 }, { "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 }, { "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 }, { "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 } ], "created_at" : "2020-07-09T05:56:27.000+00:00", "updated_at" : "2020-07-09T05:56:27.000+00:00" }, "request_id" : "a8cf4f79ca3c22ca685e7e8872e8c20b" }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 tags Array of ResourceTag objects tag对象列表 表3 ResourceTag 参数 参数类型 描述 key String 功能说明:标签键 约束:同一资源的key值不能重复。 最小长度:0 最大长度:36 value String 功能说明:标签值 最小长度:0 最大长度:43 状态码: 400 表4 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 401 表5 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 403 表6 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 404 表7 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 409 表8 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999 状态码: 500 表9 响应Body参数 参数 参数类型 描述 code String 请求返回的错误码 message String 请求返回的错误信息 最小长度:1 最大长度:999
  • 请求参数 表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" : "2be868f2-f7c9-48db-abc0-eea0b9105b0d", "project_id" : "8c6fb137a48a428aaf9a0229dca4edb3", "virsubnet_id" : "08278e6c-61ca-46c1-9fc3-0d4f6c12f193", "private_ip_address" : "10.0.0.225", "mac_address" : "fa:16:3e:48:f8:6f", "parent_device_id" : "1ab01f1d-4ef7-4d83-82be-802b3aca0223", "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ], "allowed_address_pairs" : [ ], "vpc_id" : "63b97e6b-3598-430f-9eb8-1caf06937be8", "parent_id" : "637748df-2986-4350-8303-95d259580fb3", "vlan_id" : 2787, "instance_type" : "", "instance_id" : "", "tags" : [ ], "created_at" : "2020-05-19T01:16:25.000+00:00" }, "request_id" : "ceb6273e-1ec9-4168-ac11-3dfeaacfc889" }
  • 响应示例 状态码: 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 } }
共100000条