Skip to main content

role_permissions

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

Overview

Namerole_permissions
TypeResource
Idokta.iam.role_permissions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
permissionsarrayArray of permissions assigned to the role. See Permissions.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_role_permissionsselectsubdomainLists all permissions for a custom role by roleIdOrLabel
get_role_permissionselectsubdomainRetrieves a permission (identified by permissionType) for a custom role
create_role_permissioninsertsubdomainCreates a permission (specified by permissionType) for a custom role
replace_role_permissionreplacesubdomainReplaces a permission (specified by permissionType) for a custom role
delete_role_permissiondeletesubdomainDeletes a permission (identified by permissionType) from a custom role

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
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)

SELECT examples

Lists all permissions for a custom role by roleIdOrLabel

SELECT
permissions
FROM okta.iam.role_permissions
WHERE subdomain = '{{ subdomain }}' -- required
;

INSERT examples

Creates a permission (specified by permissionType) for a custom role

INSERT INTO okta.iam.role_permissions (
data__conditions,
subdomain
)
SELECT
'{{ conditions }}',
'{{ subdomain }}'
;

REPLACE examples

Replaces a permission (specified by permissionType) for a custom role

REPLACE okta.iam.role_permissions
SET
data__conditions = '{{ conditions }}'
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
_links,
conditions,
created,
label,
lastUpdated
;

DELETE examples

Deletes a permission (identified by permissionType) from a custom role

DELETE FROM okta.iam.role_permissions
WHERE subdomain = '{{ subdomain }}' --required
;