Security Groups
Update security group
Updates the specified security group with the provided changes.
Behavior:
- Simple fields (name, description) will be updated if provided
- Undefined fields will remain unchanged
- If no change is detected for a specific field compared to the current security group state, that field will be skipped
- If no changes are detected at all across all fields, no task will be created and an empty task list will be returned
Important - Security Group Rules:
- Rules must be specified completely as the desired final state
- The system compares the provided rules against the current state
- Rules that exist in the request but not in the current state will be added
- Rules that exist in the current state but not in the request will be removed
- To keep existing rules, they must be included in the request alongside any new rules
patch/cloud/v2/security_groups/{project_id}/{region_id}/{group_id}
Path parameters
project_idinteger required
Project ID
Example:1
Project ID
region_idinteger required
Region ID
Example:1
Region ID
group_idstring uuid4 required
Security group ID
Example:00000000-0000-4000-8000-000000000000
Security group ID
Request body
Example request
{
"description": "Some description",
"name": "some_name",
"rules": [
{
"description": "Some description",
"ethertype": "IPv4",
"port_range_max": 80,
"port_range_min": 80,
"remote_group_id": "00000000-0000-4000-8000-000000000000",
"remote_ip_prefix": "10.0.0.0/8"
}
]
}Response
OK
Example response
{
"tasks": [
"d478ae29-dedc-4869-82f0-96104425f565"
]
}