1. Packages
  2. Azure Native
  3. API Docs
  4. devtestlab
  5. NotificationChannel
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.devtestlab.NotificationChannel

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    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:

    LabName string
    The name of the lab.
    ResourceGroupName string
    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.AzureNative.DevTestLab.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).
    Tags Dictionary<string, string>
    The tags of the resource.
    WebHookUrl string
    The webhook URL to send notifications to.
    LabName string
    The name of the lab.
    ResourceGroupName string
    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).
    Tags map[string]string
    The tags of the resource.
    WebHookUrl string
    The webhook URL to send notifications to.
    labName String
    The name of the lab.
    resourceGroupName String
    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).
    tags Map<String,String>
    The tags of the resource.
    webHookUrl String
    The webhook URL to send notifications to.
    labName string
    The name of the lab.
    resourceGroupName string
    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).
    tags {[key: string]: string}
    The tags of the resource.
    webHookUrl string
    The webhook URL to send notifications to.
    lab_name str
    The name of the lab.
    resource_group_name str
    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).
    tags Mapping[str, str]
    The tags of the resource.
    web_hook_url str
    The webhook URL to send notifications to.
    labName String
    The name of the lab.
    resourceGroupName String
    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).
    tags Map<String>
    The tags of the resource.
    webHookUrl String
    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.AzureNative.DevTestLab.NotificationChannelEventType
    The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
    EventName string | NotificationChannelEventType
    The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
    eventName String | NotificationChannelEventType
    The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
    eventName string | NotificationChannelEventType
    The event type for which this notification is enabled (i.e. AutoShutdown, Cost)
    event_name str | NotificationChannelEventType
    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
    NotificationChannelEventTypeAutoShutdown
    AutoShutdown
    NotificationChannelEventTypeCost
    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/{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
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi