cluster_policy_compliance
Creates, updates, deletes, gets or lists a cluster_policy_compliance
resource.
Overview
Name | cluster_policy_compliance |
Type | Resource |
Id | databricks_workspace.compute.cluster_policy_compliance |
Fields
The following fields are returned by SELECT
queries:
- getcompliance
Request completed successfully.
Name | Datatype | Description |
---|---|---|
is_compliant | boolean | |
violations | object |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getcompliance | select | deployment_name | Returns the policy compliance status of a cluster. Clusters could be out of compliance if their policy was updated after the cluster was last edited. | |
enforcecompliance | replace | deployment_name | Updates a cluster to be compliant with the current version of its policy. A cluster can be updated if it is in a |
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 |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- getcompliance
Returns the policy compliance status of a cluster. Clusters could be out of compliance if their policy was updated after the cluster was last edited.
SELECT
is_compliant,
violations
FROM databricks_workspace.compute.cluster_policy_compliance
WHERE deployment_name = '{{ deployment_name }}' -- required;
REPLACE
examples
- enforcecompliance
Updates a cluster to be compliant with the current version of its policy. A cluster can be updated if it is in a
REPLACE databricks_workspace.compute.cluster_policy_compliance
SET
data__cluster_id = '{{ cluster_id }}',
data__validate_only = '{{ validate_only }}'
WHERE
deployment_name = '{{ deployment_name }}' --required
RETURNING
changes,
has_changes;