Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.devtestlab.kotlin.NotificationChannelArgs.kt Maven / Gradle / Ivy
Go to download
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.devtestlab.kotlin
import com.pulumi.azurenative.devtestlab.NotificationChannelArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.EventArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.EventArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* 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
* ```csharp
* 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}",
* });
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:devtestlab:NotificationChannel {notificationChannelName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/notificationchannels/{name}
* ```
* @property description Description of notification.
* @property emailRecipient The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
* @property events The list of event for which this notification is enabled.
* @property labName The name of the lab.
* @property location The location of the resource.
* @property name The name of the notification channel.
* @property notificationLocale The locale to use when sending a notification (fallback for unsupported languages is EN).
* @property resourceGroupName The name of the resource group.
* @property tags The tags of the resource.
* @property webHookUrl The webhook URL to send notifications to.
*/
public data class NotificationChannelArgs(
public val description: Output? = null,
public val emailRecipient: Output? = null,
public val events: Output>? = null,
public val labName: Output? = null,
public val location: Output? = null,
public val name: Output? = null,
public val notificationLocale: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output>? = null,
public val webHookUrl: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.devtestlab.NotificationChannelArgs =
com.pulumi.azurenative.devtestlab.NotificationChannelArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.emailRecipient(emailRecipient?.applyValue({ args0 -> args0 }))
.events(events?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.labName(labName?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.notificationLocale(notificationLocale?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.webHookUrl(webHookUrl?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [NotificationChannelArgs].
*/
@PulumiTagMarker
public class NotificationChannelArgsBuilder internal constructor() {
private var description: Output? = null
private var emailRecipient: Output? = null
private var events: Output>? = null
private var labName: Output? = null
private var location: Output? = null
private var name: Output? = null
private var notificationLocale: Output? = null
private var resourceGroupName: Output? = null
private var tags: Output>? = null
private var webHookUrl: Output? = null
/**
* @param value Description of notification.
*/
@JvmName("peebbvfqvbodhtai")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
*/
@JvmName("eltauqhcoifjdbgc")
public suspend fun emailRecipient(`value`: Output) {
this.emailRecipient = value
}
/**
* @param value The list of event for which this notification is enabled.
*/
@JvmName("slqtdnrulwdxiaqj")
public suspend fun events(`value`: Output>) {
this.events = value
}
@JvmName("hvgalbcyjhebpnev")
public suspend fun events(vararg values: Output) {
this.events = Output.all(values.asList())
}
/**
* @param values The list of event for which this notification is enabled.
*/
@JvmName("vpqmraequsvdoxrl")
public suspend fun events(values: List>) {
this.events = Output.all(values)
}
/**
* @param value The name of the lab.
*/
@JvmName("dnqtvvovdgtusppk")
public suspend fun labName(`value`: Output) {
this.labName = value
}
/**
* @param value The location of the resource.
*/
@JvmName("biwfemotewmcpvcs")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the notification channel.
*/
@JvmName("vbylefjhbbksbidy")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The locale to use when sending a notification (fallback for unsupported languages is EN).
*/
@JvmName("vgsvbqmgxyylewnb")
public suspend fun notificationLocale(`value`: Output) {
this.notificationLocale = value
}
/**
* @param value The name of the resource group.
*/
@JvmName("pfumyojnctctuwqk")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The tags of the resource.
*/
@JvmName("vjnbhbsfodhiosde")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The webhook URL to send notifications to.
*/
@JvmName("iqaoqekxnwgedytp")
public suspend fun webHookUrl(`value`: Output) {
this.webHookUrl = value
}
/**
* @param value Description of notification.
*/
@JvmName("iccumxeptbdudwgm")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The email recipient to send notifications to (can be a list of semi-colon separated email addresses).
*/
@JvmName("fjbkimvvwfjbdufa")
public suspend fun emailRecipient(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.emailRecipient = mapped
}
/**
* @param value The list of event for which this notification is enabled.
*/
@JvmName("jynjoeforyeiehsa")
public suspend fun events(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.events = mapped
}
/**
* @param argument The list of event for which this notification is enabled.
*/
@JvmName("lnvwdrquafinqsbl")
public suspend fun events(argument: List Unit>) {
val toBeMapped = argument.toList().map { EventArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.events = mapped
}
/**
* @param argument The list of event for which this notification is enabled.
*/
@JvmName("dopgnheinsiiuckv")
public suspend fun events(vararg argument: suspend EventArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map { EventArgsBuilder().applySuspend { it() }.build() }
val mapped = of(toBeMapped)
this.events = mapped
}
/**
* @param argument The list of event for which this notification is enabled.
*/
@JvmName("mqguuufvubcddgsm")
public suspend fun events(argument: suspend EventArgsBuilder.() -> Unit) {
val toBeMapped = listOf(EventArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.events = mapped
}
/**
* @param values The list of event for which this notification is enabled.
*/
@JvmName("vultdeftlklvslka")
public suspend fun events(vararg values: EventArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.events = mapped
}
/**
* @param value The name of the lab.
*/
@JvmName("blnvoxmhqlwlyucc")
public suspend fun labName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.labName = mapped
}
/**
* @param value The location of the resource.
*/
@JvmName("ctqogondbbmvqqtt")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the notification channel.
*/
@JvmName("orcunydkhjkiouvt")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The locale to use when sending a notification (fallback for unsupported languages is EN).
*/
@JvmName("emcmhcbshivwtbag")
public suspend fun notificationLocale(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.notificationLocale = mapped
}
/**
* @param value The name of the resource group.
*/
@JvmName("kuksjvtpjdqhdahe")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The tags of the resource.
*/
@JvmName("xycytxgsaaubboxp")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values The tags of the resource.
*/
@JvmName("ixebxhsvkppvowwu")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The webhook URL to send notifications to.
*/
@JvmName("pvpnrgojgeldkonr")
public suspend fun webHookUrl(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.webHookUrl = mapped
}
internal fun build(): NotificationChannelArgs = NotificationChannelArgs(
description = description,
emailRecipient = emailRecipient,
events = events,
labName = labName,
location = location,
name = name,
notificationLocale = notificationLocale,
resourceGroupName = resourceGroupName,
tags = tags,
webHookUrl = webHookUrl,
)
}