1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. Webhook
dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi

dbtcloud.Webhook

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";

const testWebhook = new dbtcloud.Webhook("test_webhook", {
    name: "test-webhook",
    description: "Test webhook",
    clientUrl: "http://localhost/nothing",
    eventTypes: [
        "job.run.started",
        "job.run.completed",
    ],
    jobIds: [
        1234,
        5678,
    ],
});
Copy
import pulumi
import pulumi_dbtcloud as dbtcloud

test_webhook = dbtcloud.Webhook("test_webhook",
    name="test-webhook",
    description="Test webhook",
    client_url="http://localhost/nothing",
    event_types=[
        "job.run.started",
        "job.run.completed",
    ],
    job_ids=[
        1234,
        5678,
    ])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dbtcloud.NewWebhook(ctx, "test_webhook", &dbtcloud.WebhookArgs{
			Name:        pulumi.String("test-webhook"),
			Description: pulumi.String("Test webhook"),
			ClientUrl:   pulumi.String("http://localhost/nothing"),
			EventTypes: pulumi.StringArray{
				pulumi.String("job.run.started"),
				pulumi.String("job.run.completed"),
			},
			JobIds: pulumi.IntArray{
				pulumi.Int(1234),
				pulumi.Int(5678),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;

return await Deployment.RunAsync(() => 
{
    var testWebhook = new DbtCloud.Webhook("test_webhook", new()
    {
        Name = "test-webhook",
        Description = "Test webhook",
        ClientUrl = "http://localhost/nothing",
        EventTypes = new[]
        {
            "job.run.started",
            "job.run.completed",
        },
        JobIds = new[]
        {
            1234,
            5678,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.Webhook;
import com.pulumi.dbtcloud.WebhookArgs;
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 testWebhook = new Webhook("testWebhook", WebhookArgs.builder()
            .name("test-webhook")
            .description("Test webhook")
            .clientUrl("http://localhost/nothing")
            .eventTypes(            
                "job.run.started",
                "job.run.completed")
            .jobIds(            
                1234,
                5678)
            .build());

    }
}
Copy
resources:
  testWebhook:
    type: dbtcloud:Webhook
    name: test_webhook
    properties:
      name: test-webhook
      description: Test webhook
      clientUrl: http://localhost/nothing
      eventTypes:
        - job.run.started
        - job.run.completed
      jobIds:
        - 1234
        - 5678
Copy

Create Webhook Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
@overload
def Webhook(resource_name: str,
            args: WebhookArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Webhook(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            client_url: Optional[str] = None,
            event_types: Optional[Sequence[str]] = None,
            active: Optional[bool] = None,
            description: Optional[str] = None,
            job_ids: Optional[Sequence[int]] = None,
            name: Optional[str] = None)
func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
public Webhook(String name, WebhookArgs args)
public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
type: dbtcloud:Webhook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var webhookResource = new DbtCloud.Webhook("webhookResource", new()
{
    ClientUrl = "string",
    EventTypes = new[]
    {
        "string",
    },
    Active = false,
    Description = "string",
    JobIds = new[]
    {
        0,
    },
    Name = "string",
});
Copy
example, err := dbtcloud.NewWebhook(ctx, "webhookResource", &dbtcloud.WebhookArgs{
	ClientUrl: pulumi.String("string"),
	EventTypes: pulumi.StringArray{
		pulumi.String("string"),
	},
	Active:      pulumi.Bool(false),
	Description: pulumi.String("string"),
	JobIds: pulumi.IntArray{
		pulumi.Int(0),
	},
	Name: pulumi.String("string"),
})
Copy
var webhookResource = new Webhook("webhookResource", WebhookArgs.builder()
    .clientUrl("string")
    .eventTypes("string")
    .active(false)
    .description("string")
    .jobIds(0)
    .name("string")
    .build());
Copy
webhook_resource = dbtcloud.Webhook("webhookResource",
    client_url="string",
    event_types=["string"],
    active=False,
    description="string",
    job_ids=[0],
    name="string")
Copy
const webhookResource = new dbtcloud.Webhook("webhookResource", {
    clientUrl: "string",
    eventTypes: ["string"],
    active: false,
    description: "string",
    jobIds: [0],
    name: "string",
});
Copy
type: dbtcloud:Webhook
properties:
    active: false
    clientUrl: string
    description: string
    eventTypes:
        - string
    jobIds:
        - 0
    name: string
Copy

Webhook Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Webhook resource accepts the following input properties:

ClientUrl This property is required. string
Webhooks Client URL
EventTypes This property is required. List<string>
Webhooks Event Types
Active bool
Webhooks active flag
Description string
Webhooks Description
JobIds List<int>
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
Name string
Webhooks Name
ClientUrl This property is required. string
Webhooks Client URL
EventTypes This property is required. []string
Webhooks Event Types
Active bool
Webhooks active flag
Description string
Webhooks Description
JobIds []int
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
Name string
Webhooks Name
clientUrl This property is required. String
Webhooks Client URL
eventTypes This property is required. List<String>
Webhooks Event Types
active Boolean
Webhooks active flag
description String
Webhooks Description
jobIds List<Integer>
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name String
Webhooks Name
clientUrl This property is required. string
Webhooks Client URL
eventTypes This property is required. string[]
Webhooks Event Types
active boolean
Webhooks active flag
description string
Webhooks Description
jobIds number[]
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name string
Webhooks Name
client_url This property is required. str
Webhooks Client URL
event_types This property is required. Sequence[str]
Webhooks Event Types
active bool
Webhooks active flag
description str
Webhooks Description
job_ids Sequence[int]
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name str
Webhooks Name
clientUrl This property is required. String
Webhooks Client URL
eventTypes This property is required. List<String>
Webhooks Event Types
active Boolean
Webhooks active flag
description String
Webhooks Description
jobIds List<Number>
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name String
Webhooks Name

Outputs

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

AccountIdentifier string
Webhooks Account Identifier
HmacSecret string
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
HttpStatusCode string
Latest HTTP status of the webhook
Id string
The provider-assigned unique ID for this managed resource.
WebhookId string
Webhooks ID
AccountIdentifier string
Webhooks Account Identifier
HmacSecret string
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
HttpStatusCode string
Latest HTTP status of the webhook
Id string
The provider-assigned unique ID for this managed resource.
WebhookId string
Webhooks ID
accountIdentifier String
Webhooks Account Identifier
hmacSecret String
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
httpStatusCode String
Latest HTTP status of the webhook
id String
The provider-assigned unique ID for this managed resource.
webhookId String
Webhooks ID
accountIdentifier string
Webhooks Account Identifier
hmacSecret string
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
httpStatusCode string
Latest HTTP status of the webhook
id string
The provider-assigned unique ID for this managed resource.
webhookId string
Webhooks ID
account_identifier str
Webhooks Account Identifier
hmac_secret str
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
http_status_code str
Latest HTTP status of the webhook
id str
The provider-assigned unique ID for this managed resource.
webhook_id str
Webhooks ID
accountIdentifier String
Webhooks Account Identifier
hmacSecret String
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
httpStatusCode String
Latest HTTP status of the webhook
id String
The provider-assigned unique ID for this managed resource.
webhookId String
Webhooks ID

Look up Existing Webhook Resource

Get an existing Webhook 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?: WebhookState, opts?: CustomResourceOptions): Webhook
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_identifier: Optional[str] = None,
        active: Optional[bool] = None,
        client_url: Optional[str] = None,
        description: Optional[str] = None,
        event_types: Optional[Sequence[str]] = None,
        hmac_secret: Optional[str] = None,
        http_status_code: Optional[str] = None,
        job_ids: Optional[Sequence[int]] = None,
        name: Optional[str] = None,
        webhook_id: Optional[str] = None) -> Webhook
func GetWebhook(ctx *Context, name string, id IDInput, state *WebhookState, opts ...ResourceOption) (*Webhook, error)
public static Webhook Get(string name, Input<string> id, WebhookState? state, CustomResourceOptions? opts = null)
public static Webhook get(String name, Output<String> id, WebhookState state, CustomResourceOptions options)
resources:  _:    type: dbtcloud:Webhook    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AccountIdentifier string
Webhooks Account Identifier
Active bool
Webhooks active flag
ClientUrl string
Webhooks Client URL
Description string
Webhooks Description
EventTypes List<string>
Webhooks Event Types
HmacSecret string
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
HttpStatusCode string
Latest HTTP status of the webhook
JobIds List<int>
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
Name string
Webhooks Name
WebhookId string
Webhooks ID
AccountIdentifier string
Webhooks Account Identifier
Active bool
Webhooks active flag
ClientUrl string
Webhooks Client URL
Description string
Webhooks Description
EventTypes []string
Webhooks Event Types
HmacSecret string
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
HttpStatusCode string
Latest HTTP status of the webhook
JobIds []int
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
Name string
Webhooks Name
WebhookId string
Webhooks ID
accountIdentifier String
Webhooks Account Identifier
active Boolean
Webhooks active flag
clientUrl String
Webhooks Client URL
description String
Webhooks Description
eventTypes List<String>
Webhooks Event Types
hmacSecret String
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
httpStatusCode String
Latest HTTP status of the webhook
jobIds List<Integer>
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name String
Webhooks Name
webhookId String
Webhooks ID
accountIdentifier string
Webhooks Account Identifier
active boolean
Webhooks active flag
clientUrl string
Webhooks Client URL
description string
Webhooks Description
eventTypes string[]
Webhooks Event Types
hmacSecret string
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
httpStatusCode string
Latest HTTP status of the webhook
jobIds number[]
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name string
Webhooks Name
webhookId string
Webhooks ID
account_identifier str
Webhooks Account Identifier
active bool
Webhooks active flag
client_url str
Webhooks Client URL
description str
Webhooks Description
event_types Sequence[str]
Webhooks Event Types
hmac_secret str
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
http_status_code str
Latest HTTP status of the webhook
job_ids Sequence[int]
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name str
Webhooks Name
webhook_id str
Webhooks ID
accountIdentifier String
Webhooks Account Identifier
active Boolean
Webhooks active flag
clientUrl String
Webhooks Client URL
description String
Webhooks Description
eventTypes List<String>
Webhooks Event Types
hmacSecret String
Secret key for the webhook. Can be used to validate the authenticity of the webhook.
httpStatusCode String
Latest HTTP status of the webhook
jobIds List<Number>
List of job IDs to trigger the webhook, An empty list will trigger on all jobs
name String
Webhooks Name
webhookId String
Webhooks ID

Import

using import blocks (requires Terraform >= 1.5)

import {

to = dbtcloud_webhook.my_webhook

id = “webhook_id”

}

import {

to = dbtcloud_webhook.my_webhook

id = “wsu_abcdefg”

}

using the older import command

$ pulumi import dbtcloud:index/webhook:Webhook my_webhook "webhook_id"
Copy
$ pulumi import dbtcloud:index/webhook:Webhook my_webhook wsu_abcdefg
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
dbtcloud pulumi/pulumi-dbtcloud
License
Apache-2.0
Notes
This Pulumi package is based on the dbtcloud Terraform Provider.