v44

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-20129390589.6 KB
Roles

Update role

⚠️ This endpoint is in public preview.

Update a role's name and/or policy.

put/preview/v2/roles/{id}

Path parameters

idstring required

A resource path like 'sfc:role:acme:my-role' or an ID. Resource paths are human-readable but not stable - they change when resources are renamed or moved. IDs are stable and permanent.

Example:role_k3R-nX9vLm7Qp2Yw5Jd8F

Role ID, resource path, or name

Request body

namestring

Example request

{
  "name": "my-resource-name"
}

Response

Role updated.

idstring required
resource_pathstring required

A resource path for a role resource. Format: sfc:role:<account>:<name>.

ownerstring required
namestring required
object'role' required
role_type'built_in' | 'custom' required
created_atinteger required

Unix timestamp.

updated_atinteger required

Unix timestamp.

Example response

{
  "id": "role_k3R-nX9vLm7Qp2Yw5Jd8F",
  "resource_path": "sfc:role:<account_id>:<name>",
  "owner": "my-resource-name",
  "name": "my-resource-name",
  "object": "role",
  "created_at": 1738972800,
  "updated_at": 1738972800
}