Skip to main content

restrict_workspace_admins

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

Overview

Namerestrict_workspace_admins
TypeResource
Iddatabricks_workspace.settings.restrict_workspace_admins

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
setting_namestringName of the corresponding setting. This field is populated in the response, but it will not be respected even if it's set in the request body. The setting name in the path parameter will be respected instead. Setting name is required to be 'default' if the setting only has one instance per workspace.
etagstringetag used for versioning. The response is at least as fresh as the eTag provided. This is used for optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting each other. It is strongly suggested that systems make use of the etag in the read -> update pattern to perform setting updates in order to avoid race conditions. That is, get an etag from a GET request, and pass it with the PATCH request to identify the setting version you are updating.
restrict_workspace_adminsobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_nameetagGets the restrict workspace admins setting.
updateupdatedeployment_name, allow_missing, setting, field_maskUpdates the restrict workspace admins setting for the workspace. A fresh etag needs to be provided in
deletedeletedeployment_nameetagReverts the restrict workspace admins setting status for the workspace. A fresh etag needs to be

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 (default: dbc-abcd0123-a1bc)
etagstringetag used for versioning. The response is at least as fresh as the eTag provided. This is used for optimistic concurrency control as a way to help prevent simultaneous writes of a setting overwriting each other. It is strongly suggested that systems make use of the etag in the read -> delete pattern to perform setting deletions in order to avoid race conditions. That is, get an etag from a GET request, and pass it with the DELETE request to identify the rule set version you are deleting.

SELECT examples

Gets the restrict workspace admins setting.

SELECT
setting_name,
etag,
restrict_workspace_admins
FROM databricks_workspace.settings.restrict_workspace_admins
WHERE deployment_name = '{{ deployment_name }}' -- required
AND etag = '{{ etag }}'
;

UPDATE examples

Updates the restrict workspace admins setting for the workspace. A fresh etag needs to be provided in

UPDATE databricks_workspace.settings.restrict_workspace_admins
SET
allow_missing = {{ allow_missing }},
setting = '{{ setting }}',
field_mask = '{{ field_mask }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
AND allow_missing = {{ allow_missing }} --required
AND setting = '{{ setting }}' --required
AND field_mask = '{{ field_mask }}' --required
RETURNING
setting_name,
etag,
restrict_workspace_admins;

DELETE examples

Reverts the restrict workspace admins setting status for the workspace. A fresh etag needs to be

DELETE FROM databricks_workspace.settings.restrict_workspace_admins
WHERE deployment_name = '{{ deployment_name }}' --required
AND etag = '{{ etag }}'
;