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

dbtcloud.getModelNotifications

Explore with Pulumi AI

dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi

Get model notifications configuration for a dbt Cloud environment

Example Usage

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

const prodModelNotifications = dbtcloud.getModelNotifications({
    environmentId: prodEnvironment.environmentId,
});
const qaModelNotifications = dbtcloud.getModelNotifications({
    environmentId: "12345",
});
Copy
import pulumi
import pulumi_dbtcloud as dbtcloud

prod_model_notifications = dbtcloud.get_model_notifications(environment_id=prod_environment["environmentId"])
qa_model_notifications = dbtcloud.get_model_notifications(environment_id="12345")
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.LookupModelNotifications(ctx, &dbtcloud.LookupModelNotificationsArgs{
			EnvironmentId: prodEnvironment.EnvironmentId,
		}, nil)
		if err != nil {
			return err
		}
		_, err = dbtcloud.LookupModelNotifications(ctx, &dbtcloud.LookupModelNotificationsArgs{
			EnvironmentId: "12345",
		}, nil)
		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 prodModelNotifications = DbtCloud.GetModelNotifications.Invoke(new()
    {
        EnvironmentId = prodEnvironment.EnvironmentId,
    });

    var qaModelNotifications = DbtCloud.GetModelNotifications.Invoke(new()
    {
        EnvironmentId = "12345",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.DbtcloudFunctions;
import com.pulumi.dbtcloud.inputs.GetModelNotificationsArgs;
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) {
        final var prodModelNotifications = DbtcloudFunctions.getModelNotifications(GetModelNotificationsArgs.builder()
            .environmentId(prodEnvironment.environmentId())
            .build());

        final var qaModelNotifications = DbtcloudFunctions.getModelNotifications(GetModelNotificationsArgs.builder()
            .environmentId(12345)
            .build());

    }
}
Copy
variables:
  prodModelNotifications:
    fn::invoke:
      function: dbtcloud:getModelNotifications
      arguments:
        environmentId: ${prodEnvironment.environmentId}
  qaModelNotifications:
    fn::invoke:
      function: dbtcloud:getModelNotifications
      arguments:
        environmentId: 12345
Copy

Using getModelNotifications

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getModelNotifications(args: GetModelNotificationsArgs, opts?: InvokeOptions): Promise<GetModelNotificationsResult>
function getModelNotificationsOutput(args: GetModelNotificationsOutputArgs, opts?: InvokeOptions): Output<GetModelNotificationsResult>
Copy
def get_model_notifications(environment_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetModelNotificationsResult
def get_model_notifications_output(environment_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetModelNotificationsResult]
Copy
func LookupModelNotifications(ctx *Context, args *LookupModelNotificationsArgs, opts ...InvokeOption) (*LookupModelNotificationsResult, error)
func LookupModelNotificationsOutput(ctx *Context, args *LookupModelNotificationsOutputArgs, opts ...InvokeOption) LookupModelNotificationsResultOutput
Copy

> Note: This function is named LookupModelNotifications in the Go SDK.

public static class GetModelNotifications 
{
    public static Task<GetModelNotificationsResult> InvokeAsync(GetModelNotificationsArgs args, InvokeOptions? opts = null)
    public static Output<GetModelNotificationsResult> Invoke(GetModelNotificationsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetModelNotificationsResult> getModelNotifications(GetModelNotificationsArgs args, InvokeOptions options)
public static Output<GetModelNotificationsResult> getModelNotifications(GetModelNotificationsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: dbtcloud:index/getModelNotifications:getModelNotifications
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnvironmentId This property is required. string
The ID of the dbt Cloud environment
EnvironmentId This property is required. string
The ID of the dbt Cloud environment
environmentId This property is required. String
The ID of the dbt Cloud environment
environmentId This property is required. string
The ID of the dbt Cloud environment
environment_id This property is required. str
The ID of the dbt Cloud environment
environmentId This property is required. String
The ID of the dbt Cloud environment

getModelNotifications Result

The following output properties are available:

Enabled bool
Whether model notifications are enabled for this environment
EnvironmentId string
The ID of the dbt Cloud environment
Id int
The internal ID of the model notifications configuration
OnFailure bool
Whether to send notifications for failed model runs
OnSkipped bool
Whether to send notifications for skipped model runs
OnSuccess bool
Whether to send notifications for successful model runs
OnWarning bool
Whether to send notifications for model runs with warnings
Enabled bool
Whether model notifications are enabled for this environment
EnvironmentId string
The ID of the dbt Cloud environment
Id int
The internal ID of the model notifications configuration
OnFailure bool
Whether to send notifications for failed model runs
OnSkipped bool
Whether to send notifications for skipped model runs
OnSuccess bool
Whether to send notifications for successful model runs
OnWarning bool
Whether to send notifications for model runs with warnings
enabled Boolean
Whether model notifications are enabled for this environment
environmentId String
The ID of the dbt Cloud environment
id Integer
The internal ID of the model notifications configuration
onFailure Boolean
Whether to send notifications for failed model runs
onSkipped Boolean
Whether to send notifications for skipped model runs
onSuccess Boolean
Whether to send notifications for successful model runs
onWarning Boolean
Whether to send notifications for model runs with warnings
enabled boolean
Whether model notifications are enabled for this environment
environmentId string
The ID of the dbt Cloud environment
id number
The internal ID of the model notifications configuration
onFailure boolean
Whether to send notifications for failed model runs
onSkipped boolean
Whether to send notifications for skipped model runs
onSuccess boolean
Whether to send notifications for successful model runs
onWarning boolean
Whether to send notifications for model runs with warnings
enabled bool
Whether model notifications are enabled for this environment
environment_id str
The ID of the dbt Cloud environment
id int
The internal ID of the model notifications configuration
on_failure bool
Whether to send notifications for failed model runs
on_skipped bool
Whether to send notifications for skipped model runs
on_success bool
Whether to send notifications for successful model runs
on_warning bool
Whether to send notifications for model runs with warnings
enabled Boolean
Whether model notifications are enabled for this environment
environmentId String
The ID of the dbt Cloud environment
id Number
The internal ID of the model notifications configuration
onFailure Boolean
Whether to send notifications for failed model runs
onSkipped Boolean
Whether to send notifications for skipped model runs
onSuccess Boolean
Whether to send notifications for successful model runs
onWarning Boolean
Whether to send notifications for model runs with warnings

Package Details

Repository
dbtcloud pulumi/pulumi-dbtcloud
License
Apache-2.0
Notes
This Pulumi package is based on the dbtcloud Terraform Provider.
dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi