Networking

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

PATCH
/scopes/{scopeId}/network/security-groups/{securityGroupId}

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.

Authorization

bearerToken
headerAuthorizationBearer <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.

Path Parameters

scopeId*string

Opaque ownership+authorization scope resolving to tenant + subscription + project.

securityGroupId*string

Identifier of the security group to update.

Header Parameters

If-Match?string

ETag for optimistic concurrency on mutations/deletes; mismatch results in 412.

Request Body

application/json
  1. body

Mutable metadata edited via the detail view's "Edit" dialog. At least one field must be supplied.

name?string

New group name; lowercase letters, numbers and hyphens, up to 63 chars.

Match^[a-z0-9-]{1,63}$
description?string

New free-text description.

Lengthlength <= 255

Response Body

The updated security group.

application/json
  1. response

A stateful virtual firewall grouping rules that are enforced on every attached port/NIC.

origin?string

Where 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.

Value in"portal""api""system""imported"
id*string

Security group identifier (e.g. sg-web).

name*string

Unique group name within the project; lowercase letters, numbers and hyphens, up to 63 chars.

Match^[a-z0-9-]{1,63}$
description*string

Free-text description of the group's purpose.

rules*array<>

The complete rule set of the group; inbound/outbound tabs filter on direction.

attachedPorts*integer

Number 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*string

Creation timestamp (ISO 8601).

Formatdate-time
curl -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"}