Skip to main content

session_store_permissions

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

Overview​

Namesession_store_permissions
TypeResource
Iddatabricks_workspace.agentkit.session_store_permissions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
permissionstringThe permission level. WRITE includes READ; PERMISSION_LEVEL_UNSPECIFIED means neither is available. (READ, WRITE)
â–¶principalobjectThe principal whose permission is reported.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsession_store_id, deployment_name, workspace_domainpage_size, page_tokenLists explicit session store grants. Only the owner or a workspace admin may list permissions.
grantexecsession_store_id, deployment_name, workspace_domain, principal, permissionGrants a READ or WRITE permission on a session store to a principal. Only the owner or a workspace
revokeexecsession_store_id, deployment_name, workspace_domain, principalRemoves a principal's explicit READ and WRITE grants on a session store. Only the owner or a workspace

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)
session_store_idstringThe session_store_id segment of the name resource name (session-stores/{session_store_id}). Resource name in the form session-stores/{session_store_id}.
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"}})
page_sizeintegerMaximum number of permissions to return. Defaults to 100; maximum is 1000.
page_tokenstringContinuation token from a previous response.

SELECT examples​

Lists explicit session store grants. Only the owner or a workspace admin may list permissions.

SELECT
permission,
principal
FROM databricks_workspace.agentkit.session_store_permissions
WHERE session_store_id = '{{ session_store_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;

Lifecycle Methods​

Grants a READ or WRITE permission on a session store to a principal. Only the owner or a workspace

EXEC databricks_workspace.agentkit.session_store_permissions.grant
@session_store_id='{{ session_store_id }}' --required,
@deployment_name='{{ deployment_name }}' --required,
@workspace_domain='{{ workspace_domain }}' --required
@@json=
'{
"principal": "{{ principal }}",
"permission": "{{ permission }}"
}'
;