Skip to main content

session_stores

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

Overview​

Namesession_stores
TypeResource
Iddatabricks_workspace.agentkit.session_stores

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringResource name in the form ``session-stores/{session_store_id}``.
creator_user_idstringWorkspace-local user ID of the authenticated principal that created the store. This is immutable server-set attribution and does not grant access; authorization is evaluated from the authenticated request context.
create_timestring (date-time)Time when the store was created.
descriptionstringHuman-readable description of the session store.
metadataobjectMutable caller-defined string labels.
update_timestring (date-time)Time when the store was last updated.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsession_store_id, deployment_name, workspace_domainGets a session store by resource name.
listselectdeployment_name, workspace_domainpage_size, page_tokenLists session stores.
createinsertsession_store_id, deployment_name, workspace_domainCreates a session store.
updateupdatesession_store_id, update_mask, deployment_name, workspace_domainUpdates a session store's description and metadata.
deletedeletesession_store_id, deployment_name, workspace_domainDeletes a session store, its sessions and items, and its service-managed storage. Memory entries

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}.
update_maskobjectFields to update. Only description and metadata are mutable; any other path returns INVALID_PARAMETER_VALUE.
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 session stores to return. Defaults to 10; must be between 1 and 100.
page_tokenstringToken returned by a previous list request.

SELECT examples​

Gets a session store by resource name.

SELECT
name,
creator_user_id,
create_time,
description,
metadata,
update_time
FROM databricks_workspace.agentkit.session_stores
WHERE session_store_id = '{{ session_store_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND workspace_domain = '{{ workspace_domain }}' -- required
;

INSERT examples​

Creates a session store.

INSERT INTO databricks_workspace.agentkit.session_stores (
create_time,
creator_user_id,
description,
metadata,
name,
update_time,
session_store_id,
deployment_name,
workspace_domain
)
SELECT
'{{ create_time }}',
'{{ creator_user_id }}',
'{{ description }}',
'{{ metadata }}',
'{{ name }}',
'{{ update_time }}',
'{{ session_store_id }}',
'{{ deployment_name }}',
'{{ workspace_domain }}'
RETURNING
name,
creator_user_id,
create_time,
description,
metadata,
update_time
;

UPDATE examples​

Updates a session store's description and metadata.

UPDATE databricks_workspace.agentkit.session_stores
SET
create_time = '{{ create_time }}',
creator_user_id = '{{ creator_user_id }}',
description = '{{ description }}',
metadata = '{{ metadata }}',
name = '{{ name }}',
update_time = '{{ update_time }}'
WHERE
session_store_id = '{{ session_store_id }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
RETURNING
name,
creator_user_id,
create_time,
description,
metadata,
update_time;

DELETE examples​

Deletes a session store, its sessions and items, and its service-managed storage. Memory entries

DELETE FROM databricks_workspace.agentkit.session_stores
WHERE session_store_id = '{{ session_store_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND workspace_domain = '{{ workspace_domain }}' --required
;