operations
Creates, updates, deletes, gets or lists an operations resource.
Overview
| Name | operations |
| Type | Resource |
| Id | databricks_workspace.bundledeployments.operations |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Resource name of the operation. Format: deployments/{deployment_id}/versions/{version_id}/operations/{resource_key} |
resource_id | string | ID of the actual resource in the workspace (e.g. the job ID, pipeline ID). Optional at creation: CREATE and RECREATE operations produce a new resource whose ID is not yet known when the operation is recorded. Mutable: may be filled in (or corrected) later via UpdateOperation once the ID is known. |
sequence_id | integer | Monotonically increasing revision used for optimistic concurrency control (the AIP-154 concurrency token for this resource, realized as a sequence number rather than an opaque etag). The server assigns 1 on creation and increments it on every successful UpdateOperation. It is OPTIONAL rather than OUTPUT_ONLY because it is dual-purpose: CreateOperation/GetOperation return the current value, and UpdateOperation reads the caller-supplied value as a precondition. The caller must echo the value it last observed; if it no longer matches the server's value, the update is rejected with ABORTED so the caller can re-read and retry. Ignored on CreateOperation. |
action_type | string | The type of operation performed on this resource. (OPERATION_ACTION_TYPE_BIND, OPERATION_ACTION_TYPE_BIND_AND_UPDATE, OPERATION_ACTION_TYPE_CREATE, OPERATION_ACTION_TYPE_DELETE, OPERATION_ACTION_TYPE_INITIAL_REGISTER, OPERATION_ACTION_TYPE_RECREATE, OPERATION_ACTION_TYPE_RESIZE, OPERATION_ACTION_TYPE_UPDATE, OPERATION_ACTION_TYPE_UPDATE_WITH_ID) |
create_time | string (date-time) | When the operation was recorded. |
dashboard_metadata | object | Dashboard-specific metadata; set only for dashboard resources. |
error_message | string | Error message if the operation failed. Set when status is OPERATION_STATUS_FAILED. Captures the error encountered while applying the resource to the workspace. Mutable: may be updated after creation via UpdateOperation; setting it to an empty string clears it. After an update is applied, an operation whose status is OPERATION_STATUS_SUCCEEDED cannot carry an error_message. |
resource_key | string | Resource identifier within the bundle (e.g. "jobs.foo", "pipelines.bar", "jobs.foo.permissions", "files.<rel-path>"). Can be an arbitrary UTF-8 encoded string key. This key links the operation to the corresponding deployment-level Resource. |
resource_type | string | The type of the deployment resource this operation applies to. Derived from the ``resource_key`` prefix (e.g. "jobs" → JOB); the caller does not set this field. (DEPLOYMENT_RESOURCE_TYPE_ALERT, DEPLOYMENT_RESOURCE_TYPE_APP, DEPLOYMENT_RESOURCE_TYPE_CATALOG, DEPLOYMENT_RESOURCE_TYPE_CLUSTER, DEPLOYMENT_RESOURCE_TYPE_DASHBOARD, DEPLOYMENT_RESOURCE_TYPE_DATABASE_CATALOG, DEPLOYMENT_RESOURCE_TYPE_DATABASE_INSTANCE, DEPLOYMENT_RESOURCE_TYPE_EXPERIMENT, DEPLOYMENT_RESOURCE_TYPE_EXTERNAL_LOCATION, DEPLOYMENT_RESOURCE_TYPE_JOB, DEPLOYMENT_RESOURCE_TYPE_MODEL, DEPLOYMENT_RESOURCE_TYPE_MODEL_SERVING_ENDPOINT, DEPLOYMENT_RESOURCE_TYPE_PIPELINE, DEPLOYMENT_RESOURCE_TYPE_POSTGRES_BRANCH, DEPLOYMENT_RESOURCE_TYPE_POSTGRES_ENDPOINT, DEPLOYMENT_RESOURCE_TYPE_POSTGRES_PROJECT, DEPLOYMENT_RESOURCE_TYPE_QUALITY_MONITOR, DEPLOYMENT_RESOURCE_TYPE_REGISTERED_MODEL, DEPLOYMENT_RESOURCE_TYPE_SCHEMA, DEPLOYMENT_RESOURCE_TYPE_SECRET_SCOPE, DEPLOYMENT_RESOURCE_TYPE_SQL_WAREHOUSE, DEPLOYMENT_RESOURCE_TYPE_SYNCED_DATABASE_TABLE, DEPLOYMENT_RESOURCE_TYPE_VOLUME) |
state | object | Serialized local config state after the operation. Should be unset for delete operations. Mutable: may be updated after creation via UpdateOperation. When updating, the caller must echo the last-observed ``sequence_id`` as a concurrency precondition. |
status | string | Whether the operation succeeded or failed. Mutable: may be updated after creation via UpdateOperation, e.g. when an operation recorded as failed is retried and eventually succeeds. A succeeded operation cannot carry an ``error_message``. (OPERATION_STATUS_FAILED, OPERATION_STATUS_SUCCEEDED) |
update_time | string (date-time) | When the operation was last updated. Set to ``create_time`` when the operation is created and to the server timestamp on each successful UpdateOperation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | parent, deployment_name | page_size, page_token | Lists resource operations under a version. |
create | insert | parent, resource_key, deployment_name, operation | Creates a resource operation under a version. | |
update | update | name, update_mask, deployment_name, operation | Updates a resource operation's mutable fields. |
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 | Resource name of the operation. Format: deployments/{deployment_id}/versions/{version_id}/operations/{resource_key} |
parent | string | The parent version where this operation will be recorded. Format: deployments/{deployment_id}/versions/{version_id} |
resource_key | string | The key identifying the resource this operation applies to. Becomes the final component of the operation's name. |
update_mask | object | The set of fields to update. Required; supported paths are state, error_message, resource_id, and status. An empty mask or any other path is rejected with INVALID_PARAMETER_VALUE. |
page_size | integer | The maximum number of operations to return. The service may return fewer than this value. If unspecified, at most 50 operations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
page_token | string | A page token, received from a previous ListOperations call. Provide this to retrieve the subsequent page. |
SELECT examples
- list
Lists resource operations under a version.
SELECT
name,
resource_id,
sequence_id,
action_type,
create_time,
dashboard_metadata,
error_message,
resource_key,
resource_type,
state,
status,
update_time
FROM databricks_workspace.bundledeployments.operations
WHERE parent = '{{ parent }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- create
- Manifest
Creates a resource operation under a version.
INSERT INTO databricks_workspace.bundledeployments.operations (
operation,
parent,
resource_key,
deployment_name
)
SELECT
'{{ operation }}' /* required */,
'{{ parent }}',
'{{ resource_key }}',
'{{ deployment_name }}'
RETURNING
name,
resource_id,
sequence_id,
action_type,
create_time,
dashboard_metadata,
error_message,
resource_key,
resource_type,
state,
status,
update_time
;
# Description fields are for documentation purposes
- name: operations
props:
- name: parent
value: "{{ parent }}"
description: Required parameter for the operations resource.
- name: resource_key
value: "{{ resource_key }}"
description: Required parameter for the operations resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the operations resource.
- name: operation
description: |
The resource operation to create.
value:
action_type: "{{ action_type }}"
status: "{{ status }}"
create_time: "{{ create_time }}"
dashboard_metadata:
definition_path: "{{ definition_path }}"
source_path: "{{ source_path }}"
error_message: "{{ error_message }}"
name: "{{ name }}"
resource_id: "{{ resource_id }}"
resource_key: "{{ resource_key }}"
resource_type: "{{ resource_type }}"
sequence_id: {{ sequence_id }}
state: "{{ state }}"
update_time: "{{ update_time }}"
UPDATE examples
- update
Updates a resource operation's mutable fields.
UPDATE databricks_workspace.bundledeployments.operations
SET
operation = '{{ operation }}'
WHERE
name = '{{ name }}' --required
AND update_mask = '{{ update_mask }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND operation = '{{ operation }}' --required
RETURNING
name,
resource_id,
sequence_id,
action_type,
create_time,
dashboard_metadata,
error_message,
resource_key,
resource_type,
state,
status,
update_time;