usage_dashboards
Creates, updates, deletes, gets or lists a usage_dashboards resource.
Overview
| Name | usage_dashboards |
| Type | Resource |
| Id | databricks_account.billing.usage_dashboards |
Fields
The following fields are returned by SELECT queries:
- usage_dashboards_get
| Name | Datatype | Description |
|---|---|---|
dashboard_id | string | |
dashboard_url | string | The URL of the usage dashboard. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
usage_dashboards_get | select | account_id | dashboard_type, workspace_id | Get a usage dashboard specified by workspaceId, accountId, and dashboard type. |
usage_dashboards_create | insert | account_id | Create a usage dashboard specified by workspaceId, accountId, and dashboard type. |
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 |
|---|---|---|
account_id | string | |
dashboard_type | string | Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage dashboard shows usage data for all workspaces in the account. |
workspace_id | integer | The workspace ID of the workspace in which the usage dashboard is created. |
SELECT examples
- usage_dashboards_get
Get a usage dashboard specified by workspaceId, accountId, and dashboard type.
SELECT
dashboard_id,
dashboard_url
FROM databricks_account.billing.usage_dashboards
WHERE account_id = '{{ account_id }}' -- required
AND dashboard_type = '{{ dashboard_type }}'
AND workspace_id = '{{ workspace_id }}'
;
INSERT examples
- usage_dashboards_create
- Manifest
Create a usage dashboard specified by workspaceId, accountId, and dashboard type.
INSERT INTO databricks_account.billing.usage_dashboards (
dashboard_type,
major_version,
workspace_id,
account_id
)
SELECT
'{{ dashboard_type }}',
'{{ major_version }}',
{{ workspace_id }},
'{{ account_id }}'
RETURNING
dashboard_id
;
# Description fields are for documentation purposes
- name: usage_dashboards
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the usage_dashboards resource.
- name: dashboard_type
value: "{{ dashboard_type }}"
description: |
Workspace level usage dashboard shows usage data for the specified workspace ID. Global level usage dashboard shows usage data for all workspaces in the account.
- name: major_version
value: "{{ major_version }}"
description: |
The major version of the usage dashboard template to use. Defaults to VERSION_1.
- name: workspace_id
value: {{ workspace_id }}
description: |
The workspace ID of the workspace in which the usage dashboard is created.