Preview — pending review
This reference is generated from the platform API contract and is still under review. Operations, fields, and descriptions can change before publication.
Update a security group
Updates the mutable metadata of an existing security group from the detail view's "Edit" dialog ("Save
changes"): the group name and description. Rules are managed through the dedicated security-rule
sub-resource endpoints, not through this PATCH. The change is applied in place and immediately visible to
subsequent reads; attached ports keep enforcing the same rule set under the new name.
Validation: the security group must exist in the scope and not be soft-deleted → 404 NOT_FOUND; when
name is supplied it must match ^[a-z0-9-]{1,63}$ → 422 VALIDATION_FAILED and be unique within the resource
group → 409 CONFLICT; at least one updatable field must be present → 422; current resource state must permit
update (no deletion in progress) → 409 CONFLICT.
Async & state: Synchronous metadata mutation — returns 200 with the updated SecurityGroup; no
transitional state. A resource.updated SSE frame is emitted for the security-group resource with a
name/description patch so open list and detail views refresh.
Errors: 401 unauthenticated; 403 caller lacks contributor rights; 404 unknown security group;
409 CONFLICT on duplicate name or when a concurrent delete is in flight; 412 when the supplied If-Match ETag
no longer matches; 422 on field validation failure; 500 on persistence errors.
Idempotency/Concurrency: This operation does not use Idempotency-Key; it may be omitted
and a sent one is ignored. A repeated identical PATCH re-applies the same fields (same end
state) and bumps the ETag, so resending a request that already succeeded with its original
If-Match gets 412. If-Match with the ETag from the detail read is honored; a stale ETag yields
412 PRECONDITION_FAILED so lost updates are prevented.
bearerTokenAuthorizationBearer <token>An API token (pc_live_…) or a service-account key (sak_live_…), created in Identity & Access Management and sent as Authorization: Bearer <token>. Requests are rate limited per credential and per tenant: every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, and a refused request gets 429 RATE_LIMITED with Retry-After.
scopeId*stringOpaque ownership+authorization scope resolving to tenant + subscription + project.
securityGroupId*stringIdentifier of the security group to update.
If-Match?stringETag for optimistic concurrency on mutations/deletes; mismatch results in 412.
application/json- body
Mutable metadata edited via the detail view's "Edit" dialog. At least one field must be supplied.
name?stringNew group name; lowercase letters, numbers and hyphens, up to 63 chars.
^[a-z0-9-]{1,63}$description?stringNew free-text description.
length <= 255The updated security group.
application/json- response
A stateful virtual firewall grouping rules that are enforced on every attached port/NIC.
origin?stringWhere the resource was made -- portal for a create on the console, api for an object made straight against the OpenStack API (CLI, Terraform, the Kubernetes cloud provider) that discovery adopted. Informational; nothing behaves differently. Absent from a backend that predates it, which means portal.
"portal""api""system""imported"id*stringSecurity group identifier (e.g. sg-web).
name*stringUnique group name within the project; lowercase letters, numbers and hyphens, up to 63 chars.
^[a-z0-9-]{1,63}$description*stringFree-text description of the group's purpose.
rules*array<>The complete rule set of the group; inbound/outbound tabs filter on direction.
attachedPorts*integerNumber of ports/NICs currently attached to (enforcing) this group, DERIVED from the attached port set on every read — so a detach lowers it immediately and a deleted port stops counting. This is the number a "is anything still using this group?" decision rests on, which is why it is not a stored counter (it was one, was written 0 at create and maintained by nothing, and reported 0 for a group filtering a running VM —).
createdAt*stringCreation timestamp (ISO 8601).
date-timecurl -X PATCH "https://example.com/scopes/string/network/security-groups/string" \ -H "Content-Type: application/json" \ -d '{}'{ "origin": "portal", "id": "string", "name": "string", "description": "string", "rules": [ { "id": "string", "direction": "ingress", "etherType": "IPv4", "protocol": "tcp", "portMin": 0, "portMax": 0, "remoteCidr": "string", "remoteGroup": "string", "description": "string" } ], "attachedPorts": 0, "createdAt": "2019-08-24T14:15:22Z"}