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,
],
});
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,
])
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
})
}
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,
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args WebhookArgs
- 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 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 string
- The unique name of the resource.
- args WebhookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebhookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var webhookResource = new Webhook("webhookResource", WebhookArgs.builder()
.clientUrl("string")
.eventTypes("string")
.active(false)
.description("string")
.jobIds(0)
.name("string")
.build());
webhook_resource = dbtcloud.Webhook("webhookResource",
client_url="string",
event_types=["string"],
active=False,
description="string",
job_ids=[0],
name="string")
const webhookResource = new dbtcloud.Webhook("webhookResource", {
clientUrl: "string",
eventTypes: ["string"],
active: false,
description: "string",
jobIds: [0],
name: "string",
});
type: dbtcloud:Webhook
properties:
active: false
clientUrl: string
description: string
eventTypes:
- string
jobIds:
- 0
name: string
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:
- Client
Url string - Webhooks Client URL
- Event
Types List<string> - Webhooks Event Types
- Active bool
- Webhooks active flag
- Description string
- Webhooks Description
- Job
Ids List<int> - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- Name string
- Webhooks Name
- Client
Url string - Webhooks Client URL
- Event
Types []string - Webhooks Event Types
- Active bool
- Webhooks active flag
- Description string
- Webhooks Description
- Job
Ids []int - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- Name string
- Webhooks Name
- client
Url String - Webhooks Client URL
- event
Types List<String> - Webhooks Event Types
- active Boolean
- Webhooks active flag
- description String
- Webhooks Description
- job
Ids List<Integer> - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- name String
- Webhooks Name
- client
Url string - Webhooks Client URL
- event
Types string[] - Webhooks Event Types
- active boolean
- Webhooks active flag
- description string
- Webhooks Description
- job
Ids number[] - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- name string
- Webhooks Name
- client_
url str - Webhooks Client URL
- event_
types 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
- client
Url String - Webhooks Client URL
- event
Types List<String> - Webhooks Event Types
- active Boolean
- Webhooks active flag
- description String
- Webhooks Description
- job
Ids 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:
- Account
Identifier string - Webhooks Account Identifier
- Hmac
Secret string - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- Http
Status stringCode - Latest HTTP status of the webhook
- Id string
- The provider-assigned unique ID for this managed resource.
- Webhook
Id string - Webhooks ID
- Account
Identifier string - Webhooks Account Identifier
- Hmac
Secret string - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- Http
Status stringCode - Latest HTTP status of the webhook
- Id string
- The provider-assigned unique ID for this managed resource.
- Webhook
Id string - Webhooks ID
- account
Identifier String - Webhooks Account Identifier
- hmac
Secret String - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- http
Status StringCode - Latest HTTP status of the webhook
- id String
- The provider-assigned unique ID for this managed resource.
- webhook
Id String - Webhooks ID
- account
Identifier string - Webhooks Account Identifier
- hmac
Secret string - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- http
Status stringCode - Latest HTTP status of the webhook
- id string
- The provider-assigned unique ID for this managed resource.
- webhook
Id 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_ strcode - Latest HTTP status of the webhook
- id str
- The provider-assigned unique ID for this managed resource.
- webhook_
id str - Webhooks ID
- account
Identifier String - Webhooks Account Identifier
- hmac
Secret String - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- http
Status StringCode - Latest HTTP status of the webhook
- id String
- The provider-assigned unique ID for this managed resource.
- webhook
Id 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)
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.
- Account
Identifier string - Webhooks Account Identifier
- Active bool
- Webhooks active flag
- Client
Url string - Webhooks Client URL
- Description string
- Webhooks Description
- Event
Types List<string> - Webhooks Event Types
- Hmac
Secret string - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- Http
Status stringCode - Latest HTTP status of the webhook
- Job
Ids List<int> - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- Name string
- Webhooks Name
- Webhook
Id string - Webhooks ID
- Account
Identifier string - Webhooks Account Identifier
- Active bool
- Webhooks active flag
- Client
Url string - Webhooks Client URL
- Description string
- Webhooks Description
- Event
Types []string - Webhooks Event Types
- Hmac
Secret string - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- Http
Status stringCode - Latest HTTP status of the webhook
- Job
Ids []int - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- Name string
- Webhooks Name
- Webhook
Id string - Webhooks ID
- account
Identifier String - Webhooks Account Identifier
- active Boolean
- Webhooks active flag
- client
Url String - Webhooks Client URL
- description String
- Webhooks Description
- event
Types List<String> - Webhooks Event Types
- hmac
Secret String - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- http
Status StringCode - Latest HTTP status of the webhook
- job
Ids List<Integer> - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- name String
- Webhooks Name
- webhook
Id String - Webhooks ID
- account
Identifier string - Webhooks Account Identifier
- active boolean
- Webhooks active flag
- client
Url string - Webhooks Client URL
- description string
- Webhooks Description
- event
Types string[] - Webhooks Event Types
- hmac
Secret string - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- http
Status stringCode - Latest HTTP status of the webhook
- job
Ids number[] - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- name string
- Webhooks Name
- webhook
Id 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_ strcode - 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
- account
Identifier String - Webhooks Account Identifier
- active Boolean
- Webhooks active flag
- client
Url String - Webhooks Client URL
- description String
- Webhooks Description
- event
Types List<String> - Webhooks Event Types
- hmac
Secret String - Secret key for the webhook. Can be used to validate the authenticity of the webhook.
- http
Status StringCode - Latest HTTP status of the webhook
- job
Ids List<Number> - List of job IDs to trigger the webhook, An empty list will trigger on all jobs
- name String
- Webhooks Name
- webhook
Id 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"
$ pulumi import dbtcloud:index/webhook:Webhook my_webhook wsu_abcdefg
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.