app_spaces
Creates, updates, deletes, gets or lists an app_spaces resource.
Overview
| Name | app_spaces |
| Type | Resource |
| Id | databricks_workspace.apps.app_spaces |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the app space. |
name | string | |
effective_usage_policy_id | string | The effective usage policy ID used by apps in the space. |
group_id | string | The ID of the group attached to the app space. ASPs minted for apps in this space are added as members of this group at create time, so the group's resource permissions flow through to every app in the space. |
service_principal_client_id | string | The service principal client ID for the app space. |
service_principal_id | integer | The service principal ID for the app space. |
usage_policy_id | string | The usage policy ID for managing cost at the space level. |
service_principal_name | string | The service principal name for the app space. |
create_time | string (date-time) | The creation time of the app space. Formatted timestamp in ISO 6801. |
creator | string | The email of the user that created the app space. |
description | string | The description of the app space. |
effective_user_api_scopes | array | The effective api scopes granted to the user access token. |
resources | array | Resources for the app space. Resources configured at the space level are available to all apps in the space. |
status | object | The status of the app space. |
telemetry_export_destinations | array | Telemetry export destinations for all apps in this space. When configured, all apps in the space export OTEL telemetry (logs, metrics, traces) to the specified Unity Catalog tables. |
update_time | string (date-time) | The update time of the app space. Formatted timestamp in ISO 6801. |
updater | string | The email of the user that last updated the app space. |
user_api_scopes | array | OAuth scopes for apps in the space. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the app space. |
name | string | |
effective_usage_policy_id | string | The effective usage policy ID used by apps in the space. |
group_id | string | The ID of the group attached to the app space. ASPs minted for apps in this space are added as members of this group at create time, so the group's resource permissions flow through to every app in the space. |
service_principal_client_id | string | The service principal client ID for the app space. |
service_principal_id | integer | The service principal ID for the app space. |
usage_policy_id | string | The usage policy ID for managing cost at the space level. |
service_principal_name | string | The service principal name for the app space. |
create_time | string (date-time) | The creation time of the app space. Formatted timestamp in ISO 6801. |
creator | string | The email of the user that created the app space. |
description | string | The description of the app space. |
effective_user_api_scopes | array | The effective api scopes granted to the user access token. |
resources | array | Resources for the app space. Resources configured at the space level are available to all apps in the space. |
status | object | The status of the app space. |
telemetry_export_destinations | array | Telemetry export destinations for all apps in this space. When configured, all apps in the space export OTEL telemetry (logs, metrics, traces) to the specified Unity Catalog tables. |
update_time | string (date-time) | The update time of the app space. Formatted timestamp in ISO 6801. |
updater | string | The email of the user that last updated the app space. |
user_api_scopes | array | OAuth scopes for apps in the space. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | name, deployment_name | Retrieves information for the app space with the supplied name. | |
list | select | deployment_name | page_size, page_token | Lists all app spaces in the workspace. |
create | insert | deployment_name, space | Creates a new app space. | |
update | update | name, update_mask, deployment_name, space | Updates an app space. The update process is asynchronous and the status of the update can be checked | |
delete | delete | name, deployment_name | Deletes an app space. |
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) |
name | string | The name of the app space. |
update_mask | object | The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (.) to navigate sub-fields (e.g., author.given_name). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names. A field mask of * indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using * wildcards, as it can lead to unintended results if the API changes in the future. |
page_size | integer | Upper bound for items returned. |
page_token | string | Pagination token to go to the next page of app spaces. Requests first page if absent. |
SELECT examples
- get
- list
Retrieves information for the app space with the supplied name.
SELECT
id,
name,
effective_usage_policy_id,
group_id,
service_principal_client_id,
service_principal_id,
usage_policy_id,
service_principal_name,
create_time,
creator,
description,
effective_user_api_scopes,
resources,
status,
telemetry_export_destinations,
update_time,
updater,
user_api_scopes
FROM databricks_workspace.apps.app_spaces
WHERE name = '{{ name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Lists all app spaces in the workspace.
SELECT
id,
name,
effective_usage_policy_id,
group_id,
service_principal_client_id,
service_principal_id,
usage_policy_id,
service_principal_name,
create_time,
creator,
description,
effective_user_api_scopes,
resources,
status,
telemetry_export_destinations,
update_time,
updater,
user_api_scopes
FROM databricks_workspace.apps.app_spaces
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Creates a new app space.
INSERT INTO databricks_workspace.apps.app_spaces (
space,
deployment_name
)
SELECT
'{{ space }}' /* required */,
'{{ deployment_name }}'
;
# Description fields are for documentation purposes
- name: app_spaces
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the app_spaces resource.
- name: space
value:
name: "{{ name }}"
create_time: "{{ create_time }}"
creator: "{{ creator }}"
description: "{{ description }}"
effective_usage_policy_id: "{{ effective_usage_policy_id }}"
effective_user_api_scopes:
- "{{ effective_user_api_scopes }}"
group_id: "{{ group_id }}"
id: "{{ id }}"
resources:
- name: "{{ name }}"
app:
name: "{{ name }}"
permission: "{{ permission }}"
database:
instance_name: "{{ instance_name }}"
database_name: "{{ database_name }}"
permission: "{{ permission }}"
description: "{{ description }}"
experiment:
experiment_id: "{{ experiment_id }}"
permission: "{{ permission }}"
genie_space:
name: "{{ name }}"
space_id: "{{ space_id }}"
permission: "{{ permission }}"
job:
id: "{{ id }}"
permission: "{{ permission }}"
postgres:
branch: "{{ branch }}"
database: "{{ database }}"
permission: "{{ permission }}"
secret:
scope: "{{ scope }}"
key: "{{ key }}"
permission: "{{ permission }}"
serving_endpoint:
name: "{{ name }}"
permission: "{{ permission }}"
sql_warehouse:
id: "{{ id }}"
permission: "{{ permission }}"
uc_securable:
securable_full_name: "{{ securable_full_name }}"
securable_type: "{{ securable_type }}"
permission: "{{ permission }}"
securable_kind: "{{ securable_kind }}"
service_principal_client_id: "{{ service_principal_client_id }}"
service_principal_id: {{ service_principal_id }}
service_principal_name: "{{ service_principal_name }}"
status:
message: "{{ message }}"
state: "{{ state }}"
telemetry_export_destinations:
- unity_catalog:
logs_table: "{{ logs_table }}"
metrics_table: "{{ metrics_table }}"
traces_table: "{{ traces_table }}"
update_time: "{{ update_time }}"
updater: "{{ updater }}"
usage_policy_id: "{{ usage_policy_id }}"
user_api_scopes:
- "{{ user_api_scopes }}"
UPDATE examples
- update
Updates an app space. The update process is asynchronous and the status of the update can be checked
UPDATE databricks_workspace.apps.app_spaces
SET
space = '{{ space }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND space = '{{ space }}' --required;
DELETE examples
- delete
Deletes an app space.
DELETE FROM databricks_workspace.apps.app_spaces
WHERE name = '{{ name }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;