Notification Channel Args
data class NotificationChannelArgs(val description: Output<String>? = null, val emailRecipient: Output<String>? = null, val events: Output<List<EventArgs>>? = null, val labName: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val notificationLocale: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val webHookUrl: Output<String>? = null) : ConvertibleToJava<NotificationChannelArgs>
A notification. Uses Azure REST API version 2018-09-15. In version 2.x of the Azure Native provider, it used API version 2018-09-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 = AzureNative.DevTestLab.NotificationChannelEventType.AutoShutdown,
},
},
LabName = "{labName}",
Name = "{notificationChannelName}",
NotificationLocale = "en",
ResourceGroupName = "resourceGroupName",
WebHookUrl = "{webhookUrl}",
});
});
Content copied to clipboard
package main
import (
devtestlab "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.EventArray{
&devtestlab.EventArgs{
EventName: pulumi.String(devtestlab.NotificationChannelEventTypeAutoShutdown),
},
},
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 com.pulumi.azurenative.devtestlab.inputs.EventArgs;
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(EventArgs.builder()
.eventName("AutoShutdown")
.build())
.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
Constructors
Link copied to clipboard
constructor(description: Output<String>? = null, emailRecipient: Output<String>? = null, events: Output<List<EventArgs>>? = null, labName: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, notificationLocale: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, webHookUrl: Output<String>? = null)
Properties
Link copied to clipboard
Description of notification.
Link copied to clipboard
The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
Link copied to clipboard
The locale to use when sending a notification (fallback for unsupported languages is EN).
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
The webhook URL to send notifications to.