app_deployments
Creates, updates, deletes, gets or lists an app_deployments resource.
Overview
| Name | app_deployments |
| Type | Resource |
| Id | databricks_workspace.apps.app_deployments |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
deployment_id | string | The unique id of the deployment. |
command | array | |
create_time | string | The creation time of the deployment. Formatted timestamp in ISO 6801. |
creator | string | The email of the user creates the deployment. |
deployment_artifacts | object | The deployment artifacts for an app. |
env_vars | array | The environment variables to set in the app runtime environment. This will override the environment variables specified in the app.yaml file. |
git_source | object | Git repository to use as the source for the app deployment. |
mode | string | The mode of which the deployment will manage the source code. (AUTO_SYNC, SNAPSHOT) |
source_code_path | string | The workspace file system path of the source code used to create the app deployment. This is different from `deployment_artifacts.source_code_path`, which is the path used by the deployed app. The former refers to the original source code location of the app in the workspace during deployment creation, whereas the latter provides a system generated stable snapshotted source code path used by the deployment. |
status | object | Status and status message of the deployment |
update_time | string | The update time of the deployment. Formatted timestamp in ISO 6801. |
| Name | Datatype | Description |
|---|---|---|
deployment_id | string | The unique id of the deployment. |
command | array | |
create_time | string | The creation time of the deployment. Formatted timestamp in ISO 6801. |
creator | string | The email of the user creates the deployment. |
deployment_artifacts | object | The deployment artifacts for an app. |
env_vars | array | The environment variables to set in the app runtime environment. This will override the environment variables specified in the app.yaml file. |
git_source | object | Git repository to use as the source for the app deployment. |
mode | string | The mode of which the deployment will manage the source code. (AUTO_SYNC, SNAPSHOT) |
source_code_path | string | The workspace file system path of the source code used to create the app deployment. This is different from `deployment_artifacts.source_code_path`, which is the path used by the deployed app. The former refers to the original source code location of the app in the workspace during deployment creation, whereas the latter provides a system generated stable snapshotted source code path used by the deployment. |
status | object | Status and status message of the deployment |
update_time | string | The update time of the deployment. Formatted timestamp in ISO 6801. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | app_name, deployment_id, deployment_name | Retrieves information for the app deployment with the supplied name and deployment id. | |
list | select | app_name, deployment_name | page_size, page_token | Lists all app deployments for the app with the supplied name. |
create | insert | app_name, deployment_name, app_deployment | Creates an app deployment for the app with the supplied name. |
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 |
|---|---|---|
app_name | string | The name of the app. |
deployment_id | string | The unique id of the deployment. |
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
page_size | integer | Upper bound for items returned. |
page_token | string | Pagination token to go to the next page of apps. Requests first page if absent. |
SELECT examples
- get
- list
Retrieves information for the app deployment with the supplied name and deployment id.
SELECT
deployment_id,
command,
create_time,
creator,
deployment_artifacts,
env_vars,
git_source,
mode,
source_code_path,
status,
update_time
FROM databricks_workspace.apps.app_deployments
WHERE app_name = '{{ app_name }}' -- required
AND deployment_id = '{{ deployment_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Lists all app deployments for the app with the supplied name.
SELECT
deployment_id,
command,
create_time,
creator,
deployment_artifacts,
env_vars,
git_source,
mode,
source_code_path,
status,
update_time
FROM databricks_workspace.apps.app_deployments
WHERE app_name = '{{ app_name }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Creates an app deployment for the app with the supplied name.
INSERT INTO databricks_workspace.apps.app_deployments (
app_deployment,
app_name,
deployment_name
)
SELECT
'{{ app_deployment }}' /* required */,
'{{ app_name }}',
'{{ deployment_name }}'
RETURNING
deployment_id,
command,
create_time,
creator,
deployment_artifacts,
env_vars,
git_source,
mode,
source_code_path,
status,
update_time
;
# Description fields are for documentation purposes
- name: app_deployments
props:
- name: app_name
value: "{{ app_name }}"
description: Required parameter for the app_deployments resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the app_deployments resource.
- name: app_deployment
description: |
The app deployment configuration.
value:
command:
- "{{ command }}"
create_time: "{{ create_time }}"
creator: "{{ creator }}"
deployment_artifacts:
source_code_path: "{{ source_code_path }}"
deployment_id: "{{ deployment_id }}"
env_vars:
- name: "{{ name }}"
value: "{{ value }}"
value_from: "{{ value_from }}"
git_source:
branch: "{{ branch }}"
commit: "{{ commit }}"
git_repository:
url: "{{ url }}"
provider: "{{ provider }}"
resolved_commit: "{{ resolved_commit }}"
source_code_path: "{{ source_code_path }}"
tag: "{{ tag }}"
mode: "{{ mode }}"
source_code_path: "{{ source_code_path }}"
status:
message: "{{ message }}"
state: "{{ state }}"
update_time: "{{ update_time }}"