Skip to main content

role_bindings

Creates, updates, deletes, gets or lists a role_bindings resource.

Overview

Namerole_bindings
TypeResource
Idconfluent.iam.role_bindings

Fields

The following fields are returned by SELECT queries:

Role Binding.

NameDatatypeDescription
idstringID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de)
role_namestringThe name of the role to bind to the principal (example: CloudClusterAdmin)
api_versionstringAPIVersion defines the schema version of this representation of a resource. (iam/v2)
crn_patternstring (uri)A CRN that specifies the scope and resource patterns necessary for the role to bind (pattern: ^crn://.+$, example: crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa)
kindstringKind defines the object this REST resource represents. (RoleBinding)
metadataobjectObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
principalstringThe principal User to bind the role to (pattern: (^User:.+$), example: User:u-111aaa)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_iam_v2_role_bindingselectidMake a request to read a role binding.
list_iam_v2_role_bindingsselectcrn_patternprincipal, role_name, page_size, page_tokenRetrieve a sorted, filtered, paginated list of all role bindings.
create_iam_v2_role_bindinginsertprincipal, role_name, crn_patternMake a request to create a role binding.
delete_iam_v2_role_bindingdeleteidMake a request to delete a role binding.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
crn_patternstringFilter the results by a partial search of crn_pattern. (example: crn://confluent.cloud/organization=1111aaaa-11aa-11aa-11aa-111111aaaaaa/environment=env-aaa1111/cloud-cluster=lkc-1111aaa)
idstringThe unique identifier for the role binding.
page_sizeintegerA pagination size for collection requests.
page_tokenstringAn opaque pagination token for collection requests.
principalstringFilter the results by exact match for principal. (example: User:u-111aaa)
role_namestringFilter the results by exact match for role_name. (example: CloudClusterAdmin)

SELECT examples

Make a request to read a role binding.

SELECT
id,
role_name,
api_version,
crn_pattern,
kind,
metadata,
principal
FROM confluent.iam.role_bindings
WHERE id = '{{ id }}' -- required
;

INSERT examples

Make a request to create a role binding.

INSERT INTO confluent.iam.role_bindings (
principal,
role_name,
crn_pattern
)
SELECT
'{{ principal }}' /* required */,
'{{ role_name }}' /* required */,
'{{ crn_pattern }}' /* required */
RETURNING
id,
role_name,
api_version,
crn_pattern,
kind,
metadata,
principal
;

DELETE examples

Make a request to delete a role binding.

DELETE FROM confluent.iam.role_bindings
WHERE id = '{{ id }}' --required
;