Skip to main content

assignable_roles

Creates, updates, deletes, gets or lists an assignable_roles resource.

Overview​

Nameassignable_roles
TypeResource
Iddatabricks_workspace.iam.assignable_roles

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
â–¶rolesarray

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource, deployment_name, workspace_domainGets all the roles that can be granted on an account level resource. A role is grantable if the rule

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
deployment_namestringThe Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME)
resourcestringThe resource name for which assignable roles will be listed. Examples | Summary :--- | :--- resource=accounts/<ACCOUNT_ID> | A resource name for the account. resource=accounts/<ACCOUNT_ID>/groups/<GROUP_ID> | A resource name for the group. resource=accounts/<ACCOUNT_ID>/servicePrincipals/<SP_ID> | A resource name for the service principal. resource=accounts/<ACCOUNT_ID>/tagPolicies/<TAG_POLICY_ID> | A resource name for the tag policy.
workspace_domainstringThe Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}})

SELECT examples​

Gets all the roles that can be granted on an account level resource. A role is grantable if the rule

SELECT
roles
FROM databricks_workspace.iam.assignable_roles
WHERE resource = '{{ resource }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;