Skip to navigation

Create an access rule.

View as Markdown

Use to bind a predefined role to a subject (user, group or application) in a scope.

Authentication

AuthorizationBearer
Bearer authentication

Request

The access rule to create.
subjectIdstringRequired

The unique identifier of the subject (e.g., user, group, or app).

roleIdintegerRequired
The numeric ID of the assigned role.
scopeIdstringRequired
The unique identifier of the scope.
scopeTypeenumRequired
Allowed values:
subjectTypeenumRequired

Subject type enum for access rules.

Note: The ‘app’ subject type is DEPRECATED. Please use ‘service-account’ instead for service accounts.

Allowed values:
clusterIdstringOptionalformat: "uuid"
The id of the cluster.

Response

Created
subjectIdstring

The unique identifier of the subject (e.g., user, group, or app).

roleIdinteger
The numeric ID of the assigned role.
scopeIdstring
The unique identifier of the scope.
scopeTypeenum
Allowed values:
subjectTypeenum

Subject type enum for access rule responses. Extends SubjectType with the built-in all-authenticated-users subject, which applies to every authenticated user and service account.

Note: The ‘app’ subject type is DEPRECATED. Please use ‘service-account’ instead for service accounts.

Allowed values:
roleNamestring

The name of the assigned role (e.g., admin, viewer).

scopeNamestring

Human-readable name of the scope (e.g., tenant-x).

idinteger
The ID of the access rule entry.
createdAtdatetime
The timestamp for when the access rule was created.
updatedAtdatetime
The timestamp for the last time the access rule was updated.
tenantIdinteger
The id of the tenant.
createdBystring
Identifier of the user who created the access rule.
clusterIdstringOptionalformat: "uuid"
The id of the cluster.
deletedAtdatetime or nullOptional
The timestamp indicating when the access rule was deleted.
statusobjectOptional
Status of the Access Rule in the cluster. Available only for clusters of version 2.22.0 or above.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error
503
Service Unavailable Error