端口移除安全组
功能介绍
端口移除安全组
URI
PUT /v3/{project_id}/ports/{port_id}/remove-security-groups
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
port_id |
是 |
String |
端口端口的唯一标识 |
project_id |
是 |
String |
项目ID |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
port |
是 |
RemoveSecurityGroupOption object |
端口移除安全组请求体 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
request_id |
String |
请求ID |
port |
port object |
端口移除安全组的响应体 |
参数 |
参数类型 |
描述 |
---|---|---|
admin_state_up |
Boolean |
|
binding:host_id |
String |
|
binding:profile |
Object |
|
binding:vif_details |
Object |
|
binding:vif_type |
String |
|
binding:vnic_type |
String |
|
created_at |
String |
|
updated_at |
String |
|
description |
String |
|
device_id |
String |
|
device_owner |
String |
|
ecs_flavor |
String |
|
id |
String |
|
instance_id |
String |
|
instance_type |
String |
|
mac_address |
String |
|
name |
String |
|
port_security_enabled |
Boolean |
|
private_ips |
Array of PrivateIpInfo objects |
|
project_id |
String |
|
security_groups |
Array of strings |
|
status |
String |
|
tenant_id |
String |
|
virsubnet_id |
String |
|
vpc_id |
String |
|
vpc_tenant_id |
String |
|
vtep_ip |
String |
|
enable_efi |
Boolean |
|
scope |
String |
|
zone_id |
String |
|
binding:migration_info |
Object |
|
extra_dhcp_opts |
Array of objects |
|
position_type |
String |
|
instance_info |
Object |
|
tags |
Array of strings |
|
allowed_address_pairs |
Array of AllowAddressPair objects |
参数 |
参数类型 |
描述 |
---|---|---|
ip_address |
String |
功能说明:端口IP地址 |
subnet_id |
String |
功能说明:端口所属子网ID |
参数 |
参数类型 |
描述 |
---|---|---|
ip_address |
String |
功能说明:IP地址约束:不支持0.0.0.0如果allowed_address_pairs配置地址池较大的CIDR(掩码小于24位),建议为该port配置一个单独的安全组。 |
mac_address |
String |
功能说明:MAC地址 |
请求示例
指定端口移除安全组,移除端口99fd0c77-56b4-4bf6-8365-df352e45d5fc关联的安全组8edd3747-ccd4-49a1-82b9-a165eec314b4、6c2d4540-3b7d-4207-a319-a7231b439995。
PUT https://{Endpoint}/v3/f5dab68cd75740e68c599e9af5fe0aed/ports/99fd0c77-56b4-4bf6-8365-df352e45d5fc/remove-security-groups { "port" : { "security_groups" : [ "8edd3747-ccd4-49a1-82b9-a165eec314b4", "6c2d4540-3b7d-4207-a319-a7231b439995" ] } }
响应示例
状态码: 200
OK
{ "port" : { "name" : "", "id" : "99fd0c77-56b4-4bf6-8365-df352e45d5fc", "admin_state_up" : true, "status" : "DOWN", "project_id" : "f5dab68cd75740e68c599e9af5fe0aed", "device_id" : "", "mac_address" : "fa:16:3e:1f:17:df", "device_owner" : "", "description" : "", "vpc_id" : null, "zone_id" : "", "scope" : "center", "position_type" : "center", "vtep_ip" : null, "created_at" : "2023-05-10T01:35:02", "updated_at" : "2023-05-10T01:35:02", "port_security_enabled" : true, "tags" : [ ], "security_groups" : [ "567be4e3-d171-46ce-9e8a-c15e91cfe86a" ], "allowed_address_pairs" : [ ], "extra_dhcp_opts" : [ ], "instance_info" : null, "instance_id" : "", "instance_type" : "", "ecs_flavor" : "", "enable_efi" : false, "virsubnet_id" : "3847b263-2370-45c0-8236-38a1de568049", "private_ips" : [ { "subnet_cidr_id" : "ffe98087-6d4f-45cd-988b-1c87f75d2d53", "ip_address" : "192.168.158.228" } ], "vpc_tenant_id" : null, "binding:host_id" : "", "binding:vif_type" : "unbound", "binding:vnic_type" : "normal", "binding:vif_details" : { }, "binding:profile" : { }, "binding:migration_info" : { } }, "request_id" : "abd08c76-c853-4967-a898-12804330efab" }
状态码
状态码 |
描述 |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
409 |
Conflict |
500 |
Internal Server Error |
错误码
请参见错误码。