auto_approval_rules
Creates, updates, deletes, gets or lists an auto_approval_rules resource.
Overview
| Name | auto_approval_rules |
| Type | Resource |
| Id | databricks_workspace.cleanrooms.auto_approval_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
rule_id | string | A generated UUID identifying the rule. |
clean_room_name | string | The name of the clean room this auto-approval rule belongs to. |
author_collaborator_alias | string | |
author_scope | string | Scope of authors covered by the rule. Only one of `author_collaborator_alias` and `author_scope` can be set. (ANY_AUTHOR) |
created_at | integer | Timestamp of when the rule was created, in epoch milliseconds. |
rule_owner_collaborator_alias | string | The owner of the rule to whom the rule applies. |
runner_collaborator_alias | string | Collaborator alias of the runner covered by the rule. |
| Name | Datatype | Description |
|---|---|---|
rule_id | string | A generated UUID identifying the rule. |
clean_room_name | string | The name of the clean room this auto-approval rule belongs to. |
author_collaborator_alias | string | |
author_scope | string | Scope of authors covered by the rule. Only one of `author_collaborator_alias` and `author_scope` can be set. (ANY_AUTHOR) |
created_at | integer | Timestamp of when the rule was created, in epoch milliseconds. |
rule_owner_collaborator_alias | string | The owner of the rule to whom the rule applies. |
runner_collaborator_alias | string | Collaborator alias of the runner covered by the rule. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | clean_room_name, rule_id, deployment_name | Get a auto-approval rule by rule ID | |
list | select | clean_room_name, deployment_name | page_size, page_token | List all auto-approval rules for the caller |
create | insert | clean_room_name, deployment_name, auto_approval_rule | Create an auto-approval rule | |
update | update | clean_room_name, rule_id, deployment_name, auto_approval_rule | Update a auto-approval rule by rule ID | |
delete | delete | clean_room_name, rule_id, deployment_name | Delete a auto-approval rule by rule ID |
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.
| Name | Datatype | Description |
|---|---|---|
clean_room_name | string | |
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
rule_id | string | |
page_size | integer | Maximum number of auto-approval rules to return. Defaults to 100. |
page_token | string | Opaque pagination token to go to next page based on previous query. |
SELECT examples
- get
- list
Get a auto-approval rule by rule ID
SELECT
rule_id,
clean_room_name,
author_collaborator_alias,
author_scope,
created_at,
rule_owner_collaborator_alias,
runner_collaborator_alias
FROM databricks_workspace.cleanrooms.auto_approval_rules
WHERE clean_room_name = '{{ clean_room_name }}' -- required
AND rule_id = '{{ rule_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
List all auto-approval rules for the caller
SELECT
rule_id,
clean_room_name,
author_collaborator_alias,
author_scope,
created_at,
rule_owner_collaborator_alias,
runner_collaborator_alias
FROM databricks_workspace.cleanrooms.auto_approval_rules
WHERE clean_room_name = '{{ clean_room_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Create an auto-approval rule
INSERT INTO databricks_workspace.cleanrooms.auto_approval_rules (
auto_approval_rule,
clean_room_name,
deployment_name
)
SELECT
'{{ auto_approval_rule }}' /* required */,
'{{ clean_room_name }}',
'{{ deployment_name }}'
RETURNING
rule_id,
clean_room_name,
author_collaborator_alias,
author_scope,
created_at,
rule_owner_collaborator_alias,
runner_collaborator_alias
;
# Description fields are for documentation purposes
- name: auto_approval_rules
props:
- name: clean_room_name
value: "{{ clean_room_name }}"
description: Required parameter for the auto_approval_rules resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the auto_approval_rules resource.
- name: auto_approval_rule
value:
author_collaborator_alias: "{{ author_collaborator_alias }}"
author_scope: "{{ author_scope }}"
clean_room_name: "{{ clean_room_name }}"
created_at: {{ created_at }}
rule_id: "{{ rule_id }}"
rule_owner_collaborator_alias: "{{ rule_owner_collaborator_alias }}"
runner_collaborator_alias: "{{ runner_collaborator_alias }}"
UPDATE examples
- update
Update a auto-approval rule by rule ID
UPDATE databricks_workspace.cleanrooms.auto_approval_rules
SET
auto_approval_rule = '{{ auto_approval_rule }}'
WHERE
clean_room_name = '{{ clean_room_name }}' --required
AND rule_id = '{{ rule_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND auto_approval_rule = '{{ auto_approval_rule }}' --required
RETURNING
rule_id,
clean_room_name,
author_collaborator_alias,
author_scope,
created_at,
rule_owner_collaborator_alias,
runner_collaborator_alias;
DELETE examples
- delete
Delete a auto-approval rule by rule ID
DELETE FROM databricks_workspace.cleanrooms.auto_approval_rules
WHERE clean_room_name = '{{ clean_room_name }}' --required
AND rule_id = '{{ rule_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;