1. Packages
  2. dbt Cloud
  3. API Docs
  4. Notification
dbt Cloud v0.1.8 published on Tuesday, Jun 11, 2024 by Pulumi

dbtcloud.Notification

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.8 published on Tuesday, Jun 11, 2024 by Pulumi

    Setup notifications on jobs success/failure to internal users, external email addresses or Slack channels

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    // dbt Cloud allows us to create internal and external notifications
    //
    // an internal notification will send emails to the user mentioned in `user_id`
    //
    // NOTE: If internal notification settings already exist for a user, currently you MUST import
    // those first into the state file before you can create a new internal notification for that user.
    // Failure to do so, will result in the user losing access to existing notifications and dbt
    // support will need to be contacted to restore access.
    // cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
    const prodJobInternalNotification = new dbtcloud.Notification("prod_job_internal_notification", {
        userId: 100,
        onSuccesses: [prodJob.id],
        onFailures: [12345],
        notificationType: 1,
    });
    // we can also send "external" email notifications to emails to related to dbt Cloud users
    const prodJobExternalNotification = new dbtcloud.Notification("prod_job_external_notification", {
        userId: 100,
        onFailures: [
            23456,
            56788,
        ],
        onCancels: [prodJob.id],
        notificationType: 4,
        externalEmail: "my_email@mail.com",
    });
    // and finally, we can set up Slack notifications
    const prodJobSlackNotifications = new dbtcloud.Notification("prod_job_slack_notifications", {
        userId: 100,
        onFailures: [
            23456,
            56788,
        ],
        onCancels: [prodJob.id],
        notificationType: 2,
        slackChannelId: "C12345ABCDE",
        slackChannelName: "#my-awesome-channel",
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    # dbt Cloud allows us to create internal and external notifications
    #
    # an internal notification will send emails to the user mentioned in `user_id`
    #
    # NOTE: If internal notification settings already exist for a user, currently you MUST import
    # those first into the state file before you can create a new internal notification for that user.
    # Failure to do so, will result in the user losing access to existing notifications and dbt
    # support will need to be contacted to restore access.
    # cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
    prod_job_internal_notification = dbtcloud.Notification("prod_job_internal_notification",
        user_id=100,
        on_successes=[prod_job["id"]],
        on_failures=[12345],
        notification_type=1)
    # we can also send "external" email notifications to emails to related to dbt Cloud users
    prod_job_external_notification = dbtcloud.Notification("prod_job_external_notification",
        user_id=100,
        on_failures=[
            23456,
            56788,
        ],
        on_cancels=[prod_job["id"]],
        notification_type=4,
        external_email="my_email@mail.com")
    # and finally, we can set up Slack notifications
    prod_job_slack_notifications = dbtcloud.Notification("prod_job_slack_notifications",
        user_id=100,
        on_failures=[
            23456,
            56788,
        ],
        on_cancels=[prod_job["id"]],
        notification_type=2,
        slack_channel_id="C12345ABCDE",
        slack_channel_name="#my-awesome-channel")
    
    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 {
    		// dbt Cloud allows us to create internal and external notifications
    		//
    		// an internal notification will send emails to the user mentioned in `user_id`
    		//
    		// NOTE: If internal notification settings already exist for a user, currently you MUST import
    		// those first into the state file before you can create a new internal notification for that user.
    		// Failure to do so, will result in the user losing access to existing notifications and dbt
    		// support will need to be contacted to restore access.
    		// cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
    		_, err := dbtcloud.NewNotification(ctx, "prod_job_internal_notification", &dbtcloud.NotificationArgs{
    			UserId: pulumi.Int(100),
    			OnSuccesses: pulumi.IntArray{
    				prodJob.Id,
    			},
    			OnFailures: pulumi.IntArray{
    				pulumi.Int(12345),
    			},
    			NotificationType: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		// we can also send "external" email notifications to emails to related to dbt Cloud users
    		_, err = dbtcloud.NewNotification(ctx, "prod_job_external_notification", &dbtcloud.NotificationArgs{
    			UserId: pulumi.Int(100),
    			OnFailures: pulumi.IntArray{
    				pulumi.Int(23456),
    				pulumi.Int(56788),
    			},
    			OnCancels: pulumi.IntArray{
    				prodJob.Id,
    			},
    			NotificationType: pulumi.Int(4),
    			ExternalEmail:    pulumi.String("my_email@mail.com"),
    		})
    		if err != nil {
    			return err
    		}
    		// and finally, we can set up Slack notifications
    		_, err = dbtcloud.NewNotification(ctx, "prod_job_slack_notifications", &dbtcloud.NotificationArgs{
    			UserId: pulumi.Int(100),
    			OnFailures: pulumi.IntArray{
    				pulumi.Int(23456),
    				pulumi.Int(56788),
    			},
    			OnCancels: pulumi.IntArray{
    				prodJob.Id,
    			},
    			NotificationType: pulumi.Int(2),
    			SlackChannelId:   pulumi.String("C12345ABCDE"),
    			SlackChannelName: pulumi.String("#my-awesome-channel"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // dbt Cloud allows us to create internal and external notifications
        //
        // an internal notification will send emails to the user mentioned in `user_id`
        //
        // NOTE: If internal notification settings already exist for a user, currently you MUST import
        // those first into the state file before you can create a new internal notification for that user.
        // Failure to do so, will result in the user losing access to existing notifications and dbt
        // support will need to be contacted to restore access.
        // cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
        var prodJobInternalNotification = new DbtCloud.Notification("prod_job_internal_notification", new()
        {
            UserId = 100,
            OnSuccesses = new[]
            {
                prodJob.Id,
            },
            OnFailures = new[]
            {
                12345,
            },
            NotificationType = 1,
        });
    
        // we can also send "external" email notifications to emails to related to dbt Cloud users
        var prodJobExternalNotification = new DbtCloud.Notification("prod_job_external_notification", new()
        {
            UserId = 100,
            OnFailures = new[]
            {
                23456,
                56788,
            },
            OnCancels = new[]
            {
                prodJob.Id,
            },
            NotificationType = 4,
            ExternalEmail = "my_email@mail.com",
        });
    
        // and finally, we can set up Slack notifications
        var prodJobSlackNotifications = new DbtCloud.Notification("prod_job_slack_notifications", new()
        {
            UserId = 100,
            OnFailures = new[]
            {
                23456,
                56788,
            },
            OnCancels = new[]
            {
                prodJob.Id,
            },
            NotificationType = 2,
            SlackChannelId = "C12345ABCDE",
            SlackChannelName = "#my-awesome-channel",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.Notification;
    import com.pulumi.dbtcloud.NotificationArgs;
    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) {
            // dbt Cloud allows us to create internal and external notifications
            //
            // an internal notification will send emails to the user mentioned in `user_id`
            //
            // NOTE: If internal notification settings already exist for a user, currently you MUST import
            // those first into the state file before you can create a new internal notification for that user.
            // Failure to do so, will result in the user losing access to existing notifications and dbt
            // support will need to be contacted to restore access.
            // cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
            var prodJobInternalNotification = new Notification("prodJobInternalNotification", NotificationArgs.builder()
                .userId(100)
                .onSuccesses(prodJob.id())
                .onFailures(12345)
                .notificationType(1)
                .build());
    
            // we can also send "external" email notifications to emails to related to dbt Cloud users
            var prodJobExternalNotification = new Notification("prodJobExternalNotification", NotificationArgs.builder()
                .userId(100)
                .onFailures(            
                    23456,
                    56788)
                .onCancels(prodJob.id())
                .notificationType(4)
                .externalEmail("my_email@mail.com")
                .build());
    
            // and finally, we can set up Slack notifications
            var prodJobSlackNotifications = new Notification("prodJobSlackNotifications", NotificationArgs.builder()
                .userId(100)
                .onFailures(            
                    23456,
                    56788)
                .onCancels(prodJob.id())
                .notificationType(2)
                .slackChannelId("C12345ABCDE")
                .slackChannelName("#my-awesome-channel")
                .build());
    
        }
    }
    
    resources:
      # dbt Cloud allows us to create internal and external notifications
      # //
      # // an internal notification will send emails to the user mentioned in `user_id`
      # //
      # // NOTE: If internal notification settings already exist for a user, currently you MUST import
      # // those first into the state file before you can create a new internal notification for that user.
      # // Failure to do so, will result in the user losing access to existing notifications and dbt
      # // support will need to be contacted to restore access.
      # // cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
      prodJobInternalNotification:
        type: dbtcloud:Notification
        name: prod_job_internal_notification
        properties:
          userId: 100
          onSuccesses:
            - ${prodJob.id}
          onFailures:
            - 12345
          notificationType: 1
      # we can also send "external" email notifications to emails to related to dbt Cloud users
      prodJobExternalNotification:
        type: dbtcloud:Notification
        name: prod_job_external_notification
        properties:
          userId: 100
          onFailures:
            - 23456
            - 56788
          onCancels:
            - ${prodJob.id}
          notificationType: 4 # the external_email is the email address that will receive the notification
          externalEmail: my_email@mail.com
      # and finally, we can set up Slack notifications
      prodJobSlackNotifications:
        type: dbtcloud:Notification
        name: prod_job_slack_notifications
        properties:
          userId: 100
          onFailures:
            - 23456
            - 56788
          onCancels:
            - ${prodJob.id}
          notificationType: 2
          slackChannelId: C12345ABCDE
          slackChannelName: '#my-awesome-channel'
    

    Create Notification Resource

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

    Constructor syntax

    new Notification(name: string, args: NotificationArgs, opts?: CustomResourceOptions);
    @overload
    def Notification(resource_name: str,
                     args: NotificationArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Notification(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     user_id: Optional[int] = None,
                     external_email: Optional[str] = None,
                     notification_type: Optional[int] = None,
                     on_cancels: Optional[Sequence[int]] = None,
                     on_failures: Optional[Sequence[int]] = None,
                     on_successes: Optional[Sequence[int]] = None,
                     on_warnings: Optional[Sequence[int]] = None,
                     slack_channel_id: Optional[str] = None,
                     slack_channel_name: Optional[str] = None,
                     state: Optional[int] = None)
    func NewNotification(ctx *Context, name string, args NotificationArgs, opts ...ResourceOption) (*Notification, error)
    public Notification(string name, NotificationArgs args, CustomResourceOptions? opts = null)
    public Notification(String name, NotificationArgs args)
    public Notification(String name, NotificationArgs args, CustomResourceOptions options)
    
    type: dbtcloud:Notification
    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 NotificationArgs
    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 NotificationArgs
    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 NotificationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotificationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotificationArgs
    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 notificationResource = new DbtCloud.Notification("notificationResource", new()
    {
        UserId = 0,
        ExternalEmail = "string",
        NotificationType = 0,
        OnCancels = new[]
        {
            0,
        },
        OnFailures = new[]
        {
            0,
        },
        OnSuccesses = new[]
        {
            0,
        },
        OnWarnings = new[]
        {
            0,
        },
        SlackChannelId = "string",
        SlackChannelName = "string",
        State = 0,
    });
    
    example, err := dbtcloud.NewNotification(ctx, "notificationResource", &dbtcloud.NotificationArgs{
    	UserId:           pulumi.Int(0),
    	ExternalEmail:    pulumi.String("string"),
    	NotificationType: pulumi.Int(0),
    	OnCancels: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	OnFailures: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	OnSuccesses: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	OnWarnings: pulumi.IntArray{
    		pulumi.Int(0),
    	},
    	SlackChannelId:   pulumi.String("string"),
    	SlackChannelName: pulumi.String("string"),
    	State:            pulumi.Int(0),
    })
    
    var notificationResource = new Notification("notificationResource", NotificationArgs.builder()
        .userId(0)
        .externalEmail("string")
        .notificationType(0)
        .onCancels(0)
        .onFailures(0)
        .onSuccesses(0)
        .onWarnings(0)
        .slackChannelId("string")
        .slackChannelName("string")
        .state(0)
        .build());
    
    notification_resource = dbtcloud.Notification("notificationResource",
        user_id=0,
        external_email="string",
        notification_type=0,
        on_cancels=[0],
        on_failures=[0],
        on_successes=[0],
        on_warnings=[0],
        slack_channel_id="string",
        slack_channel_name="string",
        state=0)
    
    const notificationResource = new dbtcloud.Notification("notificationResource", {
        userId: 0,
        externalEmail: "string",
        notificationType: 0,
        onCancels: [0],
        onFailures: [0],
        onSuccesses: [0],
        onWarnings: [0],
        slackChannelId: "string",
        slackChannelName: "string",
        state: 0,
    });
    
    type: dbtcloud:Notification
    properties:
        externalEmail: string
        notificationType: 0
        onCancels:
            - 0
        onFailures:
            - 0
        onSuccesses:
            - 0
        onWarnings:
            - 0
        slackChannelId: string
        slackChannelName: string
        state: 0
        userId: 0
    

    Notification 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 Notification resource accepts the following input properties:

    UserId int
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    ExternalEmail string
    The external email to receive the notification
    NotificationType int
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    OnCancels List<int>
    List of job IDs to trigger the webhook on cancel
    OnFailures List<int>
    List of job IDs to trigger the webhook on failure
    OnSuccesses List<int>
    List of job IDs to trigger the webhook on success
    OnWarnings List<int>
    List of job IDs to trigger the webhook on warning
    SlackChannelId string
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    SlackChannelName string
    The name of the slack channel
    State int
    State of the notification (1 = active (default), 2 = inactive)
    UserId int
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    ExternalEmail string
    The external email to receive the notification
    NotificationType int
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    OnCancels []int
    List of job IDs to trigger the webhook on cancel
    OnFailures []int
    List of job IDs to trigger the webhook on failure
    OnSuccesses []int
    List of job IDs to trigger the webhook on success
    OnWarnings []int
    List of job IDs to trigger the webhook on warning
    SlackChannelId string
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    SlackChannelName string
    The name of the slack channel
    State int
    State of the notification (1 = active (default), 2 = inactive)
    userId Integer
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    externalEmail String
    The external email to receive the notification
    notificationType Integer
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    onCancels List<Integer>
    List of job IDs to trigger the webhook on cancel
    onFailures List<Integer>
    List of job IDs to trigger the webhook on failure
    onSuccesses List<Integer>
    List of job IDs to trigger the webhook on success
    onWarnings List<Integer>
    List of job IDs to trigger the webhook on warning
    slackChannelId String
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slackChannelName String
    The name of the slack channel
    state Integer
    State of the notification (1 = active (default), 2 = inactive)
    userId number
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    externalEmail string
    The external email to receive the notification
    notificationType number
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    onCancels number[]
    List of job IDs to trigger the webhook on cancel
    onFailures number[]
    List of job IDs to trigger the webhook on failure
    onSuccesses number[]
    List of job IDs to trigger the webhook on success
    onWarnings number[]
    List of job IDs to trigger the webhook on warning
    slackChannelId string
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slackChannelName string
    The name of the slack channel
    state number
    State of the notification (1 = active (default), 2 = inactive)
    user_id int
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    external_email str
    The external email to receive the notification
    notification_type int
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    on_cancels Sequence[int]
    List of job IDs to trigger the webhook on cancel
    on_failures Sequence[int]
    List of job IDs to trigger the webhook on failure
    on_successes Sequence[int]
    List of job IDs to trigger the webhook on success
    on_warnings Sequence[int]
    List of job IDs to trigger the webhook on warning
    slack_channel_id str
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slack_channel_name str
    The name of the slack channel
    state int
    State of the notification (1 = active (default), 2 = inactive)
    userId Number
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    externalEmail String
    The external email to receive the notification
    notificationType Number
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    onCancels List<Number>
    List of job IDs to trigger the webhook on cancel
    onFailures List<Number>
    List of job IDs to trigger the webhook on failure
    onSuccesses List<Number>
    List of job IDs to trigger the webhook on success
    onWarnings List<Number>
    List of job IDs to trigger the webhook on warning
    slackChannelId String
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slackChannelName String
    The name of the slack channel
    state Number
    State of the notification (1 = active (default), 2 = inactive)

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Notification 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 Notification Resource

    Get an existing Notification 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?: NotificationState, opts?: CustomResourceOptions): Notification
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            external_email: Optional[str] = None,
            notification_type: Optional[int] = None,
            on_cancels: Optional[Sequence[int]] = None,
            on_failures: Optional[Sequence[int]] = None,
            on_successes: Optional[Sequence[int]] = None,
            on_warnings: Optional[Sequence[int]] = None,
            slack_channel_id: Optional[str] = None,
            slack_channel_name: Optional[str] = None,
            state: Optional[int] = None,
            user_id: Optional[int] = None) -> Notification
    func GetNotification(ctx *Context, name string, id IDInput, state *NotificationState, opts ...ResourceOption) (*Notification, error)
    public static Notification Get(string name, Input<string> id, NotificationState? state, CustomResourceOptions? opts = null)
    public static Notification get(String name, Output<String> id, NotificationState 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:
    ExternalEmail string
    The external email to receive the notification
    NotificationType int
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    OnCancels List<int>
    List of job IDs to trigger the webhook on cancel
    OnFailures List<int>
    List of job IDs to trigger the webhook on failure
    OnSuccesses List<int>
    List of job IDs to trigger the webhook on success
    OnWarnings List<int>
    List of job IDs to trigger the webhook on warning
    SlackChannelId string
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    SlackChannelName string
    The name of the slack channel
    State int
    State of the notification (1 = active (default), 2 = inactive)
    UserId int
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    ExternalEmail string
    The external email to receive the notification
    NotificationType int
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    OnCancels []int
    List of job IDs to trigger the webhook on cancel
    OnFailures []int
    List of job IDs to trigger the webhook on failure
    OnSuccesses []int
    List of job IDs to trigger the webhook on success
    OnWarnings []int
    List of job IDs to trigger the webhook on warning
    SlackChannelId string
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    SlackChannelName string
    The name of the slack channel
    State int
    State of the notification (1 = active (default), 2 = inactive)
    UserId int
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    externalEmail String
    The external email to receive the notification
    notificationType Integer
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    onCancels List<Integer>
    List of job IDs to trigger the webhook on cancel
    onFailures List<Integer>
    List of job IDs to trigger the webhook on failure
    onSuccesses List<Integer>
    List of job IDs to trigger the webhook on success
    onWarnings List<Integer>
    List of job IDs to trigger the webhook on warning
    slackChannelId String
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slackChannelName String
    The name of the slack channel
    state Integer
    State of the notification (1 = active (default), 2 = inactive)
    userId Integer
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    externalEmail string
    The external email to receive the notification
    notificationType number
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    onCancels number[]
    List of job IDs to trigger the webhook on cancel
    onFailures number[]
    List of job IDs to trigger the webhook on failure
    onSuccesses number[]
    List of job IDs to trigger the webhook on success
    onWarnings number[]
    List of job IDs to trigger the webhook on warning
    slackChannelId string
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slackChannelName string
    The name of the slack channel
    state number
    State of the notification (1 = active (default), 2 = inactive)
    userId number
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    external_email str
    The external email to receive the notification
    notification_type int
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    on_cancels Sequence[int]
    List of job IDs to trigger the webhook on cancel
    on_failures Sequence[int]
    List of job IDs to trigger the webhook on failure
    on_successes Sequence[int]
    List of job IDs to trigger the webhook on success
    on_warnings Sequence[int]
    List of job IDs to trigger the webhook on warning
    slack_channel_id str
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slack_channel_name str
    The name of the slack channel
    state int
    State of the notification (1 = active (default), 2 = inactive)
    user_id int
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one
    externalEmail String
    The external email to receive the notification
    notificationType Number
    Type of notification (1 = dbt Cloud user email (default): does not require an external_email ; 2 = Slack channel: requires slack_channel_id and slack_channel_name ; 4 = external email: requires setting an external_email)
    onCancels List<Number>
    List of job IDs to trigger the webhook on cancel
    onFailures List<Number>
    List of job IDs to trigger the webhook on failure
    onSuccesses List<Number>
    List of job IDs to trigger the webhook on success
    onWarnings List<Number>
    List of job IDs to trigger the webhook on warning
    slackChannelId String
    The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
    slackChannelName String
    The name of the slack channel
    state Number
    State of the notification (1 = active (default), 2 = inactive)
    userId Number
    Internal dbt Cloud User ID. Must be the user_id for an existing user even if the notification is an external one

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_notification.my_notification

    id = “notification_id”

    }

    import {

    to = dbtcloud_notification.my_notification

    id = “12345”

    }

    using the older import command

    $ pulumi import dbtcloud:index/notification:Notification my_notification "notification_id"
    
    $ pulumi import dbtcloud:index/notification:Notification my_notification 12345
    

    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.
    dbtcloud logo
    dbt Cloud v0.1.8 published on Tuesday, Jun 11, 2024 by Pulumi