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.
Edit a custom role
Updates a custom role's display name, description, assignable scope levels and/or permission matrix
("Edit" / "Edit role" in the Roles page and the role detail page; also exposed as a bulk action on selected
rows). Built-in roles are managed and immutable. Changes to the permission matrix affect every
principal currently assigned the role; the resulting state is available to subsequent reads.
Validation: role must exist and be visible (else 404 NOT_FOUND); builtIn: true roles reject
any update with 409 LOCKED; if name is supplied it must remain unique in the tenant; permissions
keys must be known resource keys with values manage|read|none and assignableScopes entries
subscription|project — violations → 422 VALIDATION_FAILED.
Async & state: Synchronous. Every edit — name, description, assignable scopes and the
permission matrix alike — is applied inline and returns 200 with the updated RoleDef. A
permission-matrix change additionally stages the OpenStack re-projection of every holder in the
same transaction; it runs after the response and is not tracked by an Operation here (the edit
is recorded as an already-SUCCEEDED iam.role.update Operation in the activity feed).
Errors: 401 unauthenticated; 403 when the caller lacks iam:manage; 404 unknown role; 409 LOCKED
when targeting a built-in role; 422 for invalid fields; 500 on internal failure.
Idempotency/Concurrency: This operation does not use Idempotency-Key; it may be omitted
and a sent one is ignored. A repeated identical PATCH applies the same fields again (same end
state) and returns 200 with the role; each call records another iam.role.update audit
Operation and, when permissions is sent, stages another OpenStack re-projection. This
operation does not check If-Match; a sent one is ignored and the last write wins.
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.
roleId*stringRole identifier of the custom role to update.
application/json- body
Partial update for a custom role. Omitted fields are left unchanged. Built-in roles reject all updates.
name?stringNew display name; must remain unique within the tenant.
^[^\p{C}\p{Z}\x{10000}-\x{10FFFF}](?:[^\p{C}\p{Zl}\p{Zp}\x{10000}-\x{10FFFF}]*[^\p{C}\p{Z}\x{10000}-\x{10FFFF}])?$1 <= length <= 255description?stringNew human-readable summary.
length <= 255assignableScopes?array<>Replacement set of scope levels the role may be assigned at.
permissions?Replacement permission matrix entries (resourceKey → access level); keys not present are left unchanged.
Edit applied synchronously (metadata and permission matrix alike); returns the updated role.
application/json- response
IAM role definition — built-in (owner, contributor, reader, billing-ops) or custom — with its permission matrix over platform resource keys.
id*stringRole identifier. Built-in ids are owner, contributor, reader, billing-ops; custom roles receive generated ids.
name*stringDisplay name, e.g. "Owner".
description*stringHuman-readable summary of what the role allows.
custom*booleanTrue when the role was created or cloned by the tenant.
members*integerNumber of principals currently assigned this role.
assignableScopes*array<>Scope levels this role can be assigned at.
builtIn*booleanBuilt-in roles are managed and cannot be edited or deleted.
createdAt*stringdate-timeupdatedAt*stringdate-timepermissions*Permission matrix — resourceKey (compute, storage, network, loadbalancer, kubernetes, observability, billing, budgets, iam, tokens, branding, audit) → access level.
curl -X PATCH "https://example.com/scopes/string/iam/roles/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "description": "string", "custom": true, "members": 0, "assignableScopes": [ "tenant" ], "builtIn": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "permissions": { "property1": "manage", "property2": "manage" }}