azure-native.devtestlab.NotificationChannel
Explore with Pulumi AI
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 = AzureNative.DevTestLab.NotificationChannelEventType.AutoShutdown,
},
},
LabName = "{labName}",
Name = "{notificationChannelName}",
NotificationLocale = "en",
ResourceGroupName = "resourceGroupName",
WebHookUrl = "{webhookUrl}",
});
});
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
})
}
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());
}
}
import pulumi
import pulumi_azure_native as azure_native
notification_channel = azure_native.devtestlab.NotificationChannel("notificationChannel",
description="Integration configured for auto-shutdown",
email_recipient="{email}",
events=[azure_native.devtestlab.EventArgs(
event_name=azure_native.devtestlab.NotificationChannelEventType.AUTO_SHUTDOWN,
)],
lab_name="{labName}",
name="{notificationChannelName}",
notification_locale="en",
resource_group_name="resourceGroupName",
web_hook_url="{webhookUrl}")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const notificationChannel = new azure_native.devtestlab.NotificationChannel("notificationChannel", {
description: "Integration configured for auto-shutdown",
emailRecipient: "{email}",
events: [{
eventName: azure_native.devtestlab.NotificationChannelEventType.AutoShutdown,
}],
labName: "{labName}",
name: "{notificationChannelName}",
notificationLocale: "en",
resourceGroupName: "resourceGroupName",
webHookUrl: "{webhookUrl}",
});
resources:
notificationChannel:
type: azure-native:devtestlab:NotificationChannel
properties:
description: Integration configured for auto-shutdown
emailRecipient: '{email}'
events:
- eventName: AutoShutdown
labName: '{labName}'
name: '{notificationChannelName}'
notificationLocale: en
resourceGroupName: resourceGroupName
webHookUrl: '{webhookUrl}'
Create NotificationChannel Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationChannel(name: string, args: NotificationChannelArgs, opts?: CustomResourceOptions);
@overload
def NotificationChannel(resource_name: str,
args: NotificationChannelArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationChannel(resource_name: str,
opts: Optional[ResourceOptions] = None,
lab_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
description: Optional[str] = None,
email_recipient: Optional[str] = None,
events: Optional[Sequence[EventArgs]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
notification_locale: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
web_hook_url: Optional[str] = None)
func NewNotificationChannel(ctx *Context, name string, args NotificationChannelArgs, opts ...ResourceOption) (*NotificationChannel, error)
public NotificationChannel(string name, NotificationChannelArgs args, CustomResourceOptions? opts = null)
public NotificationChannel(String name, NotificationChannelArgs args)
public NotificationChannel(String name, NotificationChannelArgs args, CustomResourceOptions options)
type: azure-native:devtestlab:NotificationChannel
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 NotificationChannelArgs
- 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 NotificationChannelArgs
- 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 NotificationChannelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationChannelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationChannelArgs
- 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 notificationChannelResource = new AzureNative.DevTestLab.NotificationChannel("notificationChannelResource", new()
{
LabName = "string",
ResourceGroupName = "string",
Description = "string",
EmailRecipient = "string",
Events = new[]
{
new AzureNative.DevTestLab.Inputs.EventArgs
{
EventName = "string",
},
},
Location = "string",
Name = "string",
NotificationLocale = "string",
Tags =
{
{ "string", "string" },
},
WebHookUrl = "string",
});
example, err := devtestlab.NewNotificationChannel(ctx, "notificationChannelResource", &devtestlab.NotificationChannelArgs{
LabName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Description: pulumi.String("string"),
EmailRecipient: pulumi.String("string"),
Events: devtestlab.EventArray{
&devtestlab.EventArgs{
EventName: pulumi.String("string"),
},
},
Location: pulumi.String("string"),
Name: pulumi.String("string"),
NotificationLocale: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
WebHookUrl: pulumi.String("string"),
})
var notificationChannelResource = new NotificationChannel("notificationChannelResource", NotificationChannelArgs.builder()
.labName("string")
.resourceGroupName("string")
.description("string")
.emailRecipient("string")
.events(EventArgs.builder()
.eventName("string")
.build())
.location("string")
.name("string")
.notificationLocale("string")
.tags(Map.of("string", "string"))
.webHookUrl("string")
.build());
notification_channel_resource = azure_native.devtestlab.NotificationChannel("notificationChannelResource",
lab_name="string",
resource_group_name="string",
description="string",
email_recipient="string",
events=[azure_native.devtestlab.EventArgs(
event_name="string",
)],
location="string",
name="string",
notification_locale="string",
tags={
"string": "string",
},
web_hook_url="string")
const notificationChannelResource = new azure_native.devtestlab.NotificationChannel("notificationChannelResource", {
labName: "string",
resourceGroupName: "string",
description: "string",
emailRecipient: "string",
events: [{
eventName: "string",
}],
location: "string",
name: "string",
notificationLocale: "string",
tags: {
string: "string",
},
webHookUrl: "string",
});
type: azure-native:devtestlab:NotificationChannel
properties:
description: string
emailRecipient: string
events:
- eventName: string
labName: string
location: string
name: string
notificationLocale: string
resourceGroupName: string
tags:
string: string
webHookUrl: string
NotificationChannel 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 NotificationChannel resource accepts the following input properties:
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- Description string
- Description of notification.
- Email
Recipient string - The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- Events
List<Pulumi.
Azure Native. Dev Test Lab. Inputs. Event> - The list of event for which this notification is enabled.
- Location string
- The location of the resource.
- Name string
- The name of the notification channel.
- Notification
Locale string - The locale to use when sending a notification (fallback for unsupported languages is EN).
- Dictionary<string, string>
- The tags of the resource.
- Web
Hook stringUrl - The webhook URL to send notifications to.
- Lab
Name string - The name of the lab.
- Resource
Group stringName - The name of the resource group.
- Description string
- Description of notification.
- Email
Recipient string - The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- Events
[]Event
Args - The list of event for which this notification is enabled.
- Location string
- The location of the resource.
- Name string
- The name of the notification channel.
- Notification
Locale string - The locale to use when sending a notification (fallback for unsupported languages is EN).
- map[string]string
- The tags of the resource.
- Web
Hook stringUrl - The webhook URL to send notifications to.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- description String
- Description of notification.
- email
Recipient String - The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- events List<Event>
- The list of event for which this notification is enabled.
- location String
- The location of the resource.
- name String
- The name of the notification channel.
- notification
Locale String - The locale to use when sending a notification (fallback for unsupported languages is EN).
- Map<String,String>
- The tags of the resource.
- web
Hook StringUrl - The webhook URL to send notifications to.
- lab
Name string - The name of the lab.
- resource
Group stringName - The name of the resource group.
- description string
- Description of notification.
- email
Recipient string - The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- events Event[]
- The list of event for which this notification is enabled.
- location string
- The location of the resource.
- name string
- The name of the notification channel.
- notification
Locale string - The locale to use when sending a notification (fallback for unsupported languages is EN).
- {[key: string]: string}
- The tags of the resource.
- web
Hook stringUrl - The webhook URL to send notifications to.
- lab_
name str - The name of the lab.
- resource_
group_ strname - The name of the resource group.
- description str
- Description of notification.
- email_
recipient str - The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- events
Sequence[Event
Args] - The list of event for which this notification is enabled.
- location str
- The location of the resource.
- name str
- The name of the notification channel.
- notification_
locale str - The locale to use when sending a notification (fallback for unsupported languages is EN).
- Mapping[str, str]
- The tags of the resource.
- web_
hook_ strurl - The webhook URL to send notifications to.
- lab
Name String - The name of the lab.
- resource
Group StringName - The name of the resource group.
- description String
- Description of notification.
- email
Recipient String - The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- events List<Property Map>
- The list of event for which this notification is enabled.
- location String
- The location of the resource.
- name String
- The name of the notification channel.
- notification
Locale String - The locale to use when sending a notification (fallback for unsupported languages is EN).
- Map<String>
- The tags of the resource.
- web
Hook StringUrl - The webhook URL to send notifications to.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationChannel resource produces the following output properties:
- Created
Date string - The creation date of the notification channel.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- Created
Date string - The creation date of the notification channel.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provisioning
State string - The provisioning status of the resource.
- Type string
- The type of the resource.
- Unique
Identifier string - The unique immutable identifier of a resource (Guid).
- created
Date String - The creation date of the notification channel.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
- created
Date string - The creation date of the notification channel.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioning
State string - The provisioning status of the resource.
- type string
- The type of the resource.
- unique
Identifier string - The unique immutable identifier of a resource (Guid).
- created_
date str - The creation date of the notification channel.
- id str
- The provider-assigned unique ID for this managed resource.
- provisioning_
state str - The provisioning status of the resource.
- type str
- The type of the resource.
- unique_
identifier str - The unique immutable identifier of a resource (Guid).
- created
Date String - The creation date of the notification channel.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioning
State String - The provisioning status of the resource.
- type String
- The type of the resource.
- unique
Identifier String - The unique immutable identifier of a resource (Guid).
Supporting Types
Event, EventArgs
- Event
Name string | Pulumi.Azure Native. Dev Test Lab. Notification Channel Event Type - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- Event
Name string | NotificationChannel Event Type - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event
Name String | NotificationChannel Event Type - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event
Name string | NotificationChannel Event Type - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event_
name str | NotificationChannel Event Type - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event
Name String | "AutoShutdown" | "Cost" - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
EventResponse, EventResponseArgs
- Event
Name string - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- Event
Name string - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event
Name String - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event
Name string - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event_
name str - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- event
Name String - The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
NotificationChannelEventType, NotificationChannelEventTypeArgs
- Auto
Shutdown - AutoShutdown
- Cost
- Cost
- Notification
Channel Event Type Auto Shutdown - AutoShutdown
- Notification
Channel Event Type Cost - Cost
- Auto
Shutdown - AutoShutdown
- Cost
- Cost
- Auto
Shutdown - AutoShutdown
- Cost
- Cost
- AUTO_SHUTDOWN
- AutoShutdown
- COST
- Cost
- "Auto
Shutdown" - AutoShutdown
- "Cost"
- Cost
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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0