Skip to main content

scopes

Operations on a scopes resource.

Overview

Namescopes
TypeResource
Iddatabricks_workspace.secrets.scopes

Fields

NameDatatype
namestring
backend_typestring

Methods

NameAccessible byRequired ParamsDescription
listscopesSELECTdeployment_nameLists all secret scopes available in the workspace.
createscopeINSERTdeployment_nameThe scope name must consist of alphanumeric characters, dashes, underscores, and periods, and may not exceed 128 characters.
deletescopeDELETEdeployment_nameDeletes a secret scope.

SELECT examples

SELECT
name,
backend_type
FROM databricks_workspace.secrets.scopes
WHERE deployment_name = '{{ deployment_name }}';

INSERT example

Use the following StackQL query and manifest file to create a new scopes resource.

/*+ create */
INSERT INTO databricks_workspace.secrets.scopes (
deployment_name,
data__scope,
data__initial_manage_principal,
data__scope_backend_type
)
SELECT
'{{ deployment_name }}',
'{{ scope }}',
'{{ initial_manage_principal }}',
'{{ scope_backend_type }}'
;

DELETE example

Deletes a scopes resource.

/*+ delete */
DELETE FROM databricks_workspace.secrets.scopes
WHERE deployment_name = '{{ deployment_name }}';