Removing a Security Group from a Security Group List of a Port
Function
This API is used to remove a security group from a security group list of a port.
URI
PUT /v3/{project_id}/ports/{port_id}/remove-security-groups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
port_id |
Yes |
String |
Unique identifier of a port |
project_id |
Yes |
String |
Project ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
port |
Yes |
RemoveSecurityGroupOption object |
Request body for removing a security group from a security group list of a port |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID |
port |
port object |
Response body for removing a security group from a security group list of a port |
Parameter |
Type |
Description |
---|---|---|
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 |
|
Parameter |
Type |
Description |
---|---|---|
ip_address |
String |
Port IP address |
subnet_id |
String |
ID of the device that a port belongs to. |
Parameter |
Type |
Description |
---|---|---|
ip_address |
String |
IP address. You cannot set it to 0.0.0.0. Configure an independent security group for the port if parameter allowed_address_pairs has a CIDR block with a netmask length less than 24. |
mac_address |
String |
MAC address |
Example Request
Remove security groups (8edd3747-ccd4-49a1-82b9-a165eec314b4 and 6c2d4540-3b7d-4207-a319-a7231b439995) associated with the port (99fd0c77-56b4-4bf6-8365-df352e45d5fc).
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" ] } }
Example Response
Status code: 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" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
409 |
Conflict |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot