Skip to main content

role_resource_set_bindings

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

Overview​

Namerole_resource_set_bindings
TypeResource
Idokta.iam.role_resource_set_bindings

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringid of the role resource set binding
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_bindingselectresourceSetIdOrLabel, roleIdOrLabel, subdomainRetrieves the binding of a role (identified by roleIdOrLabel) for a resource set (identified by resourceSetIdOrLabel)
list_bindingsselectresourceSetIdOrLabel, subdomainafterLists all bindings for a resource set with pagination support.

The returned roles array contains the roles for each binding associated with the specified resource set. If there are more than 100 bindings for the specified resource set, links.next provides the resource with pagination for the next list of bindings.
create_resource_set_bindinginsertresourceSetIdOrLabel, subdomainCreates a binding for the resource set, custom role, and members (users or groups)

> Note: If you use a custom role with permissions that don't apply to the resources in the resource set, it doesn't affect the admin role. For example,
the okta.users.userprofile.manage permission gives the admin no privileges if it's granted to a resource set that only includes https://{yourOktaDomain}/api/v1/groups/{targetGroupId}
resources. If you want the admin to be able to manage the users within the group, the resource set must include the corresponding https://{yourOktaDomain}/api/v1/groups/{targetGroupId}/users resource.
delete_bindingdeleteresourceSetIdOrLabel, roleIdOrLabel, subdomainDeletes a binding of a role (identified by roleIdOrLabel) and a resource set (identified by resourceSetIdOrLabel)

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
resourceSetIdOrLabelstringid or label of the resource set
roleIdOrLabelstringid or label of the role
subdomainstring(default: my-org)
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination and Link header.

SELECT examples​

Retrieves the binding of a role (identified by roleIdOrLabel) for a resource set (identified by resourceSetIdOrLabel)

SELECT
id,
_links
FROM okta.iam.role_resource_set_bindings
WHERE resourceSetIdOrLabel = '{{ resourceSetIdOrLabel }}' -- required
AND roleIdOrLabel = '{{ roleIdOrLabel }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

INSERT examples​

Creates a binding for the resource set, custom role, and members (users or groups)

> Note: If you use a custom role with permissions that don't apply to the resources in the resource set, it doesn't affect the admin role. For example,
the okta.users.userprofile.manage permission gives the admin no privileges if it's granted to a resource set that only includes https://{yourOktaDomain}/api/v1/groups/{targetGroupId}
resources. If you want the admin to be able to manage the users within the group, the resource set must include the corresponding https://{yourOktaDomain}/api/v1/groups/{targetGroupId}/users resource.

INSERT INTO okta.iam.role_resource_set_bindings (
members,
role,
resourceSetIdOrLabel,
subdomain
)
SELECT
'{{ members }}',
'{{ role }}',
'{{ resourceSetIdOrLabel }}',
'{{ subdomain }}'
RETURNING
_links
;

DELETE examples​

Deletes a binding of a role (identified by roleIdOrLabel) and a resource set (identified by resourceSetIdOrLabel)

DELETE FROM okta.iam.role_resource_set_bindings
WHERE resourceSetIdOrLabel = '{{ resourceSetIdOrLabel }}' --required
AND roleIdOrLabel = '{{ roleIdOrLabel }}' --required
AND subdomain = '{{ subdomain }}' --required
;