Skip to main content

Update Security Group

PUT/v2.0/security-groups/{security_group_id}

Updates the name and description of a security group. Rules are not changed here; add or delete them through the rule endpoints.

Request​

Parameters​

security_group_idstringrequiredpath

The ID of the security group.

security_groupobjectrequiredbody

Security group wrapper.

2 fields
namestringrequiredbody

New name.

descriptionstringbody

New description. Default: empty string.

Sample Request​

curl -ks -X PUT -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
-d '{
"security_group": {
"name": "mysecgroup",
"description": "My security group"
}
}' https://api.vietnix.cloud:9696/v2.0/security-groups/{security_group_id}

Response​

Sample Response​

Response body
{
"security_group": {
"id": "e7489f02-f846-46f2-9edf-cc5a2640041a",
"name": "mysecgroup",
"description": "My security group",
"stateful": true,
"tenant_id": "f5d834d636c642c7bfe8af86139c6f26",
"project_id": "f5d834d636c642c7bfe8af86139c6f26",
"security_group_rules": [],
"tags": [],
"created_at": "2026-02-11T08:21:14Z",
"updated_at": "2026-02-11T08:31:47Z",
"revision_number": 2
}
}

Status Code​

Success​

Status CodeDescription
200 - OKThe security group was updated.

Error​

Status CodeDescription
400 - Bad RequestThe body is malformed.
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.
404 - Not FoundThe security group does not exist.
409 - ConflictA group with the same name already exists in the project.
note

Renaming a group does not affect the VMs that already use it: ports reference the group by ID, not by name.