model_web_hooks
Operations on a model_web_hooks
resource.
Overview
Name | model_web_hooks |
Type | Resource |
Id | databricks_workspace.machinelearning.model_web_hooks |
Fields
Name | Datatype |
---|---|
id | string |
description | string |
creation_timestamp | integer |
events | array |
http_url_spec | object |
last_updated_timestamp | integer |
model_name | string |
status | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
listwebhooks | SELECT | deployment_name | This endpoint is in Public Preview. |
createwebhook | INSERT | deployment_name | : This endpoint is in Public Preview. |
deletewebhook | DELETE | deployment_name | This endpoint is in Public Preview. |
updatewebhook | UPDATE | deployment_name | This endpoint is in Public Preview. |
testregistrywebhook | EXEC | deployment_name | This endpoint is in Public Preview. |
SELECT
examples
SELECT
id,
description,
creation_timestamp,
events,
http_url_spec,
last_updated_timestamp,
model_name,
status
FROM databricks_workspace.machinelearning.model_web_hooks
WHERE deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new model_web_hooks
resource.
- model_web_hooks
- Manifest
/*+ create */
INSERT INTO databricks_workspace.machinelearning.model_web_hooks (
deployment_name,
data__job_spec,
data__http_url_spec,
data__events,
data__model_name,
data__description,
data__status
)
SELECT
'{{ deployment_name }}',
'{{ job_spec }}',
'{{ http_url_spec }}',
'{{ events }}',
'{{ model_name }}',
'{{ description }}',
'{{ status }}'
;
- name: your_resource_model_name
props:
- name: job_spec
value:
job_id: '1'
access_token: dapi12345678935845824
workspace_url: string
- name: http_url_spec
value:
url: https://hooks.slack.com/services/...
secret: anyRandomString
enable_ssl_verification: true
authorization: Bearer <access_token>
- name: events
value:
- MODEL_VERSION_CREATED
- MODEL_VERSION_TRANSITIONED_TO_STAGING
- COMMENT_CREATED
- name: model_name
value: registered-model-1
- name: description
value: Webhook for comment creation
- name: status
value: ACTIVE
UPDATE
example
Updates a model_web_hooks
resource.
/*+ update */
-- replace field1, field2, etc. with the fields you want to update
UPDATE databricks_workspace.machinelearning.model_web_hooks
SET field1 = '{{ value1 }}',
field2 = '{{ value2 }}', ...
WHERE deployment_name = '{{ deployment_name }}';
DELETE
example
Deletes a model_web_hooks
resource.
/*+ delete */
DELETE FROM databricks_workspace.machinelearning.model_web_hooks
WHERE deployment_name = '{{ deployment_name }}';