azure-native.devtestlab.NotificationChannel
Explore with Pulumi AI
A notification. 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 = "AutoShutdown",
            },
        },
        LabName = "{labName}",
        Name = "{notificationChannelName}",
        NotificationLocale = "en",
        ResourceGroupName = "resourceGroupName",
        WebHookUrl = "{webhookUrl}",
    });
});
package main
import (
	devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab"
	"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
	})
}
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());
    }
}
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: "AutoShutdown",
    }],
    labName: "{labName}",
    name: "{notificationChannelName}",
    notificationLocale: "en",
    resourceGroupName: "resourceGroupName",
    webHookUrl: "{webhookUrl}",
});
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="AutoShutdown",
    )],
    lab_name="{labName}",
    name="{notificationChannelName}",
    notification_locale="en",
    resource_group_name="resourceGroupName",
    web_hook_url="{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[]
    {
        
        {
            { "eventName", "string" },
        },
    },
    Location = "string",
    Name = "string",
    NotificationLocale = "string",
    Tags = 
    {
        { "string", "string" },
    },
    WebHookUrl = "string",
});
example, err := devtestlab.NewNotificationChannel(ctx, "notificationChannelResource", &devtestlab.NotificationChannelArgs{
	LabName:           "string",
	ResourceGroupName: "string",
	Description:       "string",
	EmailRecipient:    "string",
	Events: []map[string]interface{}{
		map[string]interface{}{
			"eventName": "string",
		},
	},
	Location:           "string",
	Name:               "string",
	NotificationLocale: "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
	WebHookUrl: "string",
})
var notificationChannelResource = new NotificationChannel("notificationChannelResource", NotificationChannelArgs.builder()
    .labName("string")
    .resourceGroupName("string")
    .description("string")
    .emailRecipient("string")
    .events(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .location("string")
    .name("string")
    .notificationLocale("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .webHookUrl("string")
    .build());
notification_channel_resource = azure_native.devtestlab.NotificationChannel("notificationChannelResource",
    lab_name=string,
    resource_group_name=string,
    description=string,
    email_recipient=string,
    events=[{
        eventName: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The NotificationChannel resource accepts the following input properties:
- LabName string
- The name of the lab.
- ResourceGroup stringName 
- The name of the resource group.
- Description string
- Description of notification.
- EmailRecipient 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.
- NotificationLocale string
- The locale to use when sending a notification (fallback for unsupported languages is EN).
- Dictionary<string, string>
- The tags of the resource.
- WebHook stringUrl 
- The webhook URL to send notifications to.
- LabName string
- The name of the lab.
- ResourceGroup stringName 
- The name of the resource group.
- Description string
- Description of notification.
- EmailRecipient string
- The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
- Events
[]EventArgs 
- 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.
- NotificationLocale string
- The locale to use when sending a notification (fallback for unsupported languages is EN).
- map[string]string
- The tags of the resource.
- WebHook stringUrl 
- The webhook URL to send notifications to.
- labName String
- The name of the lab.
- resourceGroup StringName 
- The name of the resource group.
- description String
- Description of notification.
- emailRecipient 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.
- notificationLocale String
- The locale to use when sending a notification (fallback for unsupported languages is EN).
- Map<String,String>
- The tags of the resource.
- webHook StringUrl 
- The webhook URL to send notifications to.
- labName string
- The name of the lab.
- resourceGroup stringName 
- The name of the resource group.
- description string
- Description of notification.
- emailRecipient 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.
- notificationLocale string
- The locale to use when sending a notification (fallback for unsupported languages is EN).
- {[key: string]: string}
- The tags of the resource.
- webHook 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[EventArgs] 
- 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.
- labName String
- The name of the lab.
- resourceGroup StringName 
- The name of the resource group.
- description String
- Description of notification.
- emailRecipient 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.
- notificationLocale String
- The locale to use when sending a notification (fallback for unsupported languages is EN).
- Map<String>
- The tags of the resource.
- webHook 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:
- CreatedDate string
- The creation date of the notification channel.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProvisioningState string
- The provisioning status of the resource.
- Type string
- The type of the resource.
- UniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- CreatedDate string
- The creation date of the notification channel.
- Id string
- The provider-assigned unique ID for this managed resource.
- ProvisioningState string
- The provisioning status of the resource.
- Type string
- The type of the resource.
- UniqueIdentifier string
- The unique immutable identifier of a resource (Guid).
- createdDate String
- The creation date of the notification channel.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioningState String
- The provisioning status of the resource.
- type String
- The type of the resource.
- uniqueIdentifier String
- The unique immutable identifier of a resource (Guid).
- createdDate string
- The creation date of the notification channel.
- id string
- The provider-assigned unique ID for this managed resource.
- provisioningState string
- The provisioning status of the resource.
- type string
- The type of the resource.
- uniqueIdentifier 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).
- createdDate String
- The creation date of the notification channel.
- id String
- The provider-assigned unique ID for this managed resource.
- provisioningState String
- The provisioning status of the resource.
- type String
- The type of the resource.
- uniqueIdentifier String
- The unique immutable identifier of a resource (Guid).
Supporting Types
Event, EventArgs  
- EventName string | Pulumi.Azure Native. Dev Test Lab. Notification Channel Event Type 
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- EventName string | NotificationChannel Event Type 
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- eventName String | NotificationChannel Event Type 
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- eventName 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)
- eventName String | "AutoShutdown" | "Cost" 
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
EventResponse, EventResponseArgs    
- EventName string
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- EventName string
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- eventName String
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
- eventName 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)
- eventName String
- The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
NotificationChannelEventType, NotificationChannelEventTypeArgs        
- AutoShutdown 
- AutoShutdown
- Cost
- Cost
- NotificationChannel Event Type Auto Shutdown 
- AutoShutdown
- NotificationChannel Event Type Cost 
- Cost
- AutoShutdown 
- AutoShutdown
- Cost
- Cost
- AutoShutdown 
- AutoShutdown
- Cost
- Cost
- AUTO_SHUTDOWN
- AutoShutdown
- COST
- Cost
- "AutoShutdown" 
- 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/{notificationChannelName} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v1 pulumi/pulumi-azure-native
- License
- Apache-2.0