databricks logo
Databricks v1.14.0, May 23 23

databricks.MlflowWebhook

Explore with Pulumi AI

This resource allows you to create MLflow Model Registry Webhooks in Databricks. Webhooks enable you to listen for Model Registry events so your integrations can automatically trigger actions. You can use webhooks to automate and integrate your machine learning pipeline with existing CI/CD tools and workflows. Webhooks allow trigger execution of a Databricks job or call a web service on specific event(s) that is generated in the MLflow Registry - stage transitioning, creation of registered model, creation of transition request, etc.

Access Control

  • MLflow webhooks could be configured only by workspace admins.

The following resources are often used in the same context:

Example Usage

POSTing to URL

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Databricks = Pulumi.Databricks;

return await Deployment.RunAsync(() => 
{
    var url = new Databricks.MlflowWebhook("url", new()
    {
        Description = "URL webhook trigger",
        Events = new[]
        {
            "TRANSITION_REQUEST_CREATED",
        },
        HttpUrlSpec = new Databricks.Inputs.MlflowWebhookHttpUrlSpecArgs
        {
            Url = "https://my_cool_host/webhook",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databricks.NewMlflowWebhook(ctx, "url", &databricks.MlflowWebhookArgs{
			Description: pulumi.String("URL webhook trigger"),
			Events: pulumi.StringArray{
				pulumi.String("TRANSITION_REQUEST_CREATED"),
			},
			HttpUrlSpec: &databricks.MlflowWebhookHttpUrlSpecArgs{
				Url: pulumi.String("https://my_cool_host/webhook"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.MlflowWebhook;
import com.pulumi.databricks.MlflowWebhookArgs;
import com.pulumi.databricks.inputs.MlflowWebhookHttpUrlSpecArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var url = new MlflowWebhook("url", MlflowWebhookArgs.builder()        
            .description("URL webhook trigger")
            .events("TRANSITION_REQUEST_CREATED")
            .httpUrlSpec(MlflowWebhookHttpUrlSpecArgs.builder()
                .url("https://my_cool_host/webhook")
                .build())
            .build());

    }
}
import pulumi
import pulumi_databricks as databricks

url = databricks.MlflowWebhook("url",
    description="URL webhook trigger",
    events=["TRANSITION_REQUEST_CREATED"],
    http_url_spec=databricks.MlflowWebhookHttpUrlSpecArgs(
        url="https://my_cool_host/webhook",
    ))
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";

const url = new databricks.MlflowWebhook("url", {
    description: "URL webhook trigger",
    events: ["TRANSITION_REQUEST_CREATED"],
    httpUrlSpec: {
        url: "https://my_cool_host/webhook",
    },
});
resources:
  url:
    type: databricks:MlflowWebhook
    properties:
      description: URL webhook trigger
      events:
        - TRANSITION_REQUEST_CREATED
      httpUrlSpec:
        url: https://my_cool_host/webhook

Create MlflowWebhook Resource

new MlflowWebhook(name: string, args: MlflowWebhookArgs, opts?: CustomResourceOptions);
@overload
def MlflowWebhook(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  description: Optional[str] = None,
                  events: Optional[Sequence[str]] = None,
                  http_url_spec: Optional[MlflowWebhookHttpUrlSpecArgs] = None,
                  job_spec: Optional[MlflowWebhookJobSpecArgs] = None,
                  model_name: Optional[str] = None,
                  status: Optional[str] = None)
@overload
def MlflowWebhook(resource_name: str,
                  args: MlflowWebhookArgs,
                  opts: Optional[ResourceOptions] = None)
func NewMlflowWebhook(ctx *Context, name string, args MlflowWebhookArgs, opts ...ResourceOption) (*MlflowWebhook, error)
public MlflowWebhook(string name, MlflowWebhookArgs args, CustomResourceOptions? opts = null)
public MlflowWebhook(String name, MlflowWebhookArgs args)
public MlflowWebhook(String name, MlflowWebhookArgs args, CustomResourceOptions options)
type: databricks:MlflowWebhook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args MlflowWebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args MlflowWebhookArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args MlflowWebhookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MlflowWebhookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args MlflowWebhookArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

MlflowWebhook Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The MlflowWebhook resource accepts the following input properties:

Events List<string>

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

Description string

Optional description of the MLflow webhook.

HttpUrlSpec MlflowWebhookHttpUrlSpecArgs
JobSpec MlflowWebhookJobSpecArgs
ModelName string

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

Status string

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

Events []string

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

Description string

Optional description of the MLflow webhook.

HttpUrlSpec MlflowWebhookHttpUrlSpecArgs
JobSpec MlflowWebhookJobSpecArgs
ModelName string

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

Status string

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

events List<String>

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

description String

Optional description of the MLflow webhook.

httpUrlSpec MlflowWebhookHttpUrlSpecArgs
jobSpec MlflowWebhookJobSpecArgs
modelName String

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status String

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

events string[]

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

description string

Optional description of the MLflow webhook.

httpUrlSpec MlflowWebhookHttpUrlSpecArgs
jobSpec MlflowWebhookJobSpecArgs
modelName string

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status string

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

events Sequence[str]

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

description str

Optional description of the MLflow webhook.

http_url_spec MlflowWebhookHttpUrlSpecArgs
job_spec MlflowWebhookJobSpecArgs
model_name str

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status str

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

events List<String>

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

description String

Optional description of the MLflow webhook.

httpUrlSpec Property Map
jobSpec Property Map
modelName String

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status String

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

Outputs

All input properties are implicitly available as output properties. Additionally, the MlflowWebhook resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing MlflowWebhook Resource

Get an existing MlflowWebhook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MlflowWebhookState, opts?: CustomResourceOptions): MlflowWebhook
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        events: Optional[Sequence[str]] = None,
        http_url_spec: Optional[MlflowWebhookHttpUrlSpecArgs] = None,
        job_spec: Optional[MlflowWebhookJobSpecArgs] = None,
        model_name: Optional[str] = None,
        status: Optional[str] = None) -> MlflowWebhook
func GetMlflowWebhook(ctx *Context, name string, id IDInput, state *MlflowWebhookState, opts ...ResourceOption) (*MlflowWebhook, error)
public static MlflowWebhook Get(string name, Input<string> id, MlflowWebhookState? state, CustomResourceOptions? opts = null)
public static MlflowWebhook get(String name, Output<String> id, MlflowWebhookState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string

Optional description of the MLflow webhook.

Events List<string>

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

HttpUrlSpec MlflowWebhookHttpUrlSpecArgs
JobSpec MlflowWebhookJobSpecArgs
ModelName string

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

Status string

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

Description string

Optional description of the MLflow webhook.

Events []string

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

HttpUrlSpec MlflowWebhookHttpUrlSpecArgs
JobSpec MlflowWebhookJobSpecArgs
ModelName string

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

Status string

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

description String

Optional description of the MLflow webhook.

events List<String>

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

httpUrlSpec MlflowWebhookHttpUrlSpecArgs
jobSpec MlflowWebhookJobSpecArgs
modelName String

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status String

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

description string

Optional description of the MLflow webhook.

events string[]

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

httpUrlSpec MlflowWebhookHttpUrlSpecArgs
jobSpec MlflowWebhookJobSpecArgs
modelName string

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status string

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

description str

Optional description of the MLflow webhook.

events Sequence[str]

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

http_url_spec MlflowWebhookHttpUrlSpecArgs
job_spec MlflowWebhookJobSpecArgs
model_name str

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status str

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

description String

Optional description of the MLflow webhook.

events List<String>

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events.

Configuration must include one of http_url_spec or job_spec blocks, but not both.

httpUrlSpec Property Map
jobSpec Property Map
modelName String

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models.

status String

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE.

Supporting Types

MlflowWebhookHttpUrlSpec

Url string

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details.

Authorization string

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request.

EnableSslVerification bool

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host.

Secret string

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload.

Url string

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details.

Authorization string

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request.

EnableSslVerification bool

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host.

Secret string

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload.

url String

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details.

authorization String

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request.

enableSslVerification Boolean

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host.

secret String

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload.

url string

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details.

authorization string

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request.

enableSslVerification boolean

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host.

secret string

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload.

url str

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details.

authorization str

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request.

enable_ssl_verification bool

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host.

secret str

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload.

url String

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details.

authorization String

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request.

enableSslVerification Boolean

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host.

secret String

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload.

MlflowWebhookJobSpec

AccessToken string

The personal access token used to authorize webhook's job runs.

JobId string

ID of the Databricks job that the webhook runs.

WorkspaceUrl string

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created.

AccessToken string

The personal access token used to authorize webhook's job runs.

JobId string

ID of the Databricks job that the webhook runs.

WorkspaceUrl string

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created.

accessToken String

The personal access token used to authorize webhook's job runs.

jobId String

ID of the Databricks job that the webhook runs.

workspaceUrl String

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created.

accessToken string

The personal access token used to authorize webhook's job runs.

jobId string

ID of the Databricks job that the webhook runs.

workspaceUrl string

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created.

access_token str

The personal access token used to authorize webhook's job runs.

job_id str

ID of the Databricks job that the webhook runs.

workspace_url str

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created.

accessToken String

The personal access token used to authorize webhook's job runs.

jobId String

ID of the Databricks job that the webhook runs.

workspaceUrl String

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created.

Import

-> Note Importing this resource is not currently supported.

Package Details

Repository
databricks pulumi/pulumi-databricks
License
Apache-2.0
Notes

This Pulumi package is based on the databricks Terraform Provider.