Notification Channel
A notification. Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15. Other available API versions: 2016-05-15.
Example Usage
NotificationChannels_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var notificationChannel = new AzureNative.DevTestLab.NotificationChannel("notificationChannel", new()
{
Description = "Integration configured for auto-shutdown",
EmailRecipient = "{email}",
Events = new[]
{
new AzureNative.DevTestLab.Inputs.EventArgs
{
EventName = "AutoShutdown",
},
},
LabName = "{labName}",
Name = "{notificationChannelName}",
NotificationLocale = "en",
ResourceGroupName = "resourceGroupName",
WebHookUrl = "{webhookUrl}",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewNotificationChannel(ctx, "notificationChannel", &devtestlab.NotificationChannelArgs{
Description: pulumi.String("Integration configured for auto-shutdown"),
EmailRecipient: pulumi.String("{email}"),
Events: []devtestlab.EventArgs{
{
EventName: pulumi.String("AutoShutdown"),
},
},
LabName: pulumi.String("{labName}"),
Name: pulumi.String("{notificationChannelName}"),
NotificationLocale: pulumi.String("en"),
ResourceGroupName: pulumi.String("resourceGroupName"),
WebHookUrl: pulumi.String("{webhookUrl}"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.devtestlab.NotificationChannel;
import com.pulumi.azurenative.devtestlab.NotificationChannelArgs;
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 notificationChannel = new NotificationChannel("notificationChannel", NotificationChannelArgs.builder()
.description("Integration configured for auto-shutdown")
.emailRecipient("{email}")
.events(Map.of("eventName", "AutoShutdown"))
.labName("{labName}")
.name("{notificationChannelName}")
.notificationLocale("en")
.resourceGroupName("resourceGroupName")
.webHookUrl("{webhookUrl}")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:devtestlab:NotificationChannel {notificationChannelName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}
Content copied to clipboard