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.botservice.kotlin.ChannelArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.botservice.kotlin
import com.pulumi.azurenative.botservice.ChannelArgs.builder
import com.pulumi.azurenative.botservice.kotlin.enums.Kind
import com.pulumi.azurenative.botservice.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.botservice.kotlin.inputs.SkuArgsBuilder
import com.pulumi.core.Either
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.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Bot channel resource definition
* Azure REST API version: 2022-09-15. Prior API version in Azure Native 1.x: 2021-03-01.
* Other available API versions: 2023-09-15-preview.
* ## Example Usage
* ### Create Alexa Channel
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var channel = new AzureNative.BotService.Channel("channel", new()
* {
* ChannelName = "AlexaChannel",
* Location = "global",
* Properties = new AzureNative.BotService.Inputs.AlexaChannelArgs
* {
* ChannelName = "AlexaChannel",
* Properties = new AzureNative.BotService.Inputs.AlexaChannelPropertiesArgs
* {
* AlexaSkillId = "XAlexaSkillIdX",
* IsEnabled = true,
* },
* },
* ResourceGroupName = "OneResourceGroupName",
* ResourceName = "samplebotname",
* });
* });
* ```
* ```go
* package main
* import (
* botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
* ChannelName: pulumi.String("AlexaChannel"),
* Location: pulumi.String("global"),
* Properties: &botservice.AlexaChannelArgs{
* ChannelName: pulumi.String("AlexaChannel"),
* Properties: &botservice.AlexaChannelPropertiesArgs{
* AlexaSkillId: pulumi.String("XAlexaSkillIdX"),
* IsEnabled: pulumi.Bool(true),
* },
* },
* ResourceGroupName: pulumi.String("OneResourceGroupName"),
* ResourceName: pulumi.String("samplebotname"),
* })
* 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.botservice.Channel;
* import com.pulumi.azurenative.botservice.ChannelArgs;
* 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 channel = new Channel("channel", ChannelArgs.builder()
* .channelName("AlexaChannel")
* .location("global")
* .properties(AlexaChannelArgs.builder()
* .channelName("AlexaChannel")
* .properties(AlexaChannelPropertiesArgs.builder()
* .alexaSkillId("XAlexaSkillIdX")
* .isEnabled(true)
* .build())
* .build())
* .resourceGroupName("OneResourceGroupName")
* .resourceName("samplebotname")
* .build());
* }
* }
* ```
* ### Create Channel
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var channel = new AzureNative.BotService.Channel("channel", new()
* {
* ChannelName = "EmailChannel",
* Location = "global",
* Properties = new AzureNative.BotService.Inputs.EmailChannelArgs
* {
* ChannelName = "EmailChannel",
* Properties = new AzureNative.BotService.Inputs.EmailChannelPropertiesArgs
* {
* EmailAddress = "[email protected] ",
* IsEnabled = true,
* Password = "pwd",
* },
* },
* ResourceGroupName = "OneResourceGroupName",
* ResourceName = "samplebotname",
* });
* });
* ```
* ```go
* package main
* import (
* botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
* ChannelName: pulumi.String("EmailChannel"),
* Location: pulumi.String("global"),
* Properties: &botservice.EmailChannelArgs{
* ChannelName: pulumi.String("EmailChannel"),
* Properties: &botservice.EmailChannelPropertiesArgs{
* EmailAddress: pulumi.String("[email protected] "),
* IsEnabled: pulumi.Bool(true),
* Password: pulumi.String("pwd"),
* },
* },
* ResourceGroupName: pulumi.String("OneResourceGroupName"),
* ResourceName: pulumi.String("samplebotname"),
* })
* 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.botservice.Channel;
* import com.pulumi.azurenative.botservice.ChannelArgs;
* 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 channel = new Channel("channel", ChannelArgs.builder()
* .channelName("EmailChannel")
* .location("global")
* .properties(EmailChannelArgs.builder()
* .channelName("EmailChannel")
* .properties(EmailChannelPropertiesArgs.builder()
* .emailAddress("[email protected] ")
* .isEnabled(true)
* .password("pwd")
* .build())
* .build())
* .resourceGroupName("OneResourceGroupName")
* .resourceName("samplebotname")
* .build());
* }
* }
* ```
* ### Create DirectLine Speech Channel
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var channel = new AzureNative.BotService.Channel("channel", new()
* {
* ChannelName = "DirectLineSpeechChannel",
* Location = "global",
* Properties = new AzureNative.BotService.Inputs.DirectLineSpeechChannelArgs
* {
* ChannelName = "DirectLineSpeechChannel",
* Properties = new AzureNative.BotService.Inputs.DirectLineSpeechChannelPropertiesArgs
* {
* CognitiveServiceRegion = "XcognitiveServiceRegionX",
* CognitiveServiceSubscriptionKey = "XcognitiveServiceSubscriptionKeyX",
* IsEnabled = true,
* },
* },
* ResourceGroupName = "OneResourceGroupName",
* ResourceName = "samplebotname",
* });
* });
* ```
* ```go
* package main
* import (
* botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
* ChannelName: pulumi.String("DirectLineSpeechChannel"),
* Location: pulumi.String("global"),
* Properties: &botservice.DirectLineSpeechChannelArgs{
* ChannelName: pulumi.String("DirectLineSpeechChannel"),
* Properties: &botservice.DirectLineSpeechChannelPropertiesArgs{
* CognitiveServiceRegion: pulumi.String("XcognitiveServiceRegionX"),
* CognitiveServiceSubscriptionKey: pulumi.String("XcognitiveServiceSubscriptionKeyX"),
* IsEnabled: pulumi.Bool(true),
* },
* },
* ResourceGroupName: pulumi.String("OneResourceGroupName"),
* ResourceName: pulumi.String("samplebotname"),
* })
* 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.botservice.Channel;
* import com.pulumi.azurenative.botservice.ChannelArgs;
* 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 channel = new Channel("channel", ChannelArgs.builder()
* .channelName("DirectLineSpeechChannel")
* .location("global")
* .properties(DirectLineSpeechChannelArgs.builder()
* .channelName("DirectLineSpeechChannel")
* .properties(DirectLineSpeechChannelPropertiesArgs.builder()
* .cognitiveServiceRegion("XcognitiveServiceRegionX")
* .cognitiveServiceSubscriptionKey("XcognitiveServiceSubscriptionKeyX")
* .isEnabled(true)
* .build())
* .build())
* .resourceGroupName("OneResourceGroupName")
* .resourceName("samplebotname")
* .build());
* }
* }
* ```
* ### Create Email Channel
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var channel = new AzureNative.BotService.Channel("channel", new()
* {
* ChannelName = "EmailChannel",
* Location = "global",
* Properties = new AzureNative.BotService.Inputs.EmailChannelArgs
* {
* ChannelName = "EmailChannel",
* Properties = new AzureNative.BotService.Inputs.EmailChannelPropertiesArgs
* {
* AuthMethod = 1,
* EmailAddress = "[email protected] ",
* IsEnabled = true,
* MagicCode = "000000",
* },
* },
* ResourceGroupName = "OneResourceGroupName",
* ResourceName = "samplebotname",
* });
* });
* ```
* ```go
* package main
* import (
* botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
* ChannelName: pulumi.String("EmailChannel"),
* Location: pulumi.String("global"),
* Properties: &botservice.EmailChannelArgs{
* ChannelName: pulumi.String("EmailChannel"),
* Properties: &botservice.EmailChannelPropertiesArgs{
* AuthMethod: pulumi.Float64(1),
* EmailAddress: pulumi.String("[email protected] "),
* IsEnabled: pulumi.Bool(true),
* MagicCode: pulumi.String("000000"),
* },
* },
* ResourceGroupName: pulumi.String("OneResourceGroupName"),
* ResourceName: pulumi.String("samplebotname"),
* })
* 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.botservice.Channel;
* import com.pulumi.azurenative.botservice.ChannelArgs;
* 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 channel = new Channel("channel", ChannelArgs.builder()
* .channelName("EmailChannel")
* .location("global")
* .properties(EmailChannelArgs.builder()
* .channelName("EmailChannel")
* .properties(EmailChannelPropertiesArgs.builder()
* .authMethod(1)
* .emailAddress("[email protected] ")
* .isEnabled(true)
* .magicCode("000000")
* .build())
* .build())
* .resourceGroupName("OneResourceGroupName")
* .resourceName("samplebotname")
* .build());
* }
* }
* ```
* ### Create Line Channel
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var channel = new AzureNative.BotService.Channel("channel", new()
* {
* ChannelName = "LineChannel",
* Location = "global",
* Properties = new AzureNative.BotService.Inputs.LineChannelArgs
* {
* ChannelName = "LineChannel",
* Properties = new AzureNative.BotService.Inputs.LineChannelPropertiesArgs
* {
* LineRegistrations = new[]
* {
* new AzureNative.BotService.Inputs.LineRegistrationArgs
* {
* ChannelAccessToken = "channelAccessToken",
* ChannelSecret = "channelSecret",
* },
* },
* },
* },
* ResourceGroupName = "OneResourceGroupName",
* ResourceName = "samplebotname",
* });
* });
* ```
* ```go
* package main
* import (
* botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := botservice.NewChannel(ctx, "channel", &botservice.ChannelArgs{
* ChannelName: pulumi.String("LineChannel"),
* Location: pulumi.String("global"),
* Properties: &botservice.LineChannelArgs{
* ChannelName: pulumi.String("LineChannel"),
* Properties: &botservice.LineChannelPropertiesArgs{
* LineRegistrations: botservice.LineRegistrationArray{
* &botservice.LineRegistrationArgs{
* ChannelAccessToken: pulumi.String("channelAccessToken"),
* ChannelSecret: pulumi.String("channelSecret"),
* },
* },
* },
* },
* ResourceGroupName: pulumi.String("OneResourceGroupName"),
* ResourceName: pulumi.String("samplebotname"),
* })
* 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.botservice.Channel;
* import com.pulumi.azurenative.botservice.ChannelArgs;
* 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 channel = new Channel("channel", ChannelArgs.builder()
* .channelName("LineChannel")
* .location("global")
* .properties(DirectLineChannelArgs.builder()
* .channelName("LineChannel")
* .properties(DirectLineChannelPropertiesArgs.builder()
* .lineRegistrations(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
* .build())
* .build())
* .resourceGroupName("OneResourceGroupName")
* .resourceName("samplebotname")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:botservice:Channel myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}
* ```
* @property channelName The name of the Channel resource.
* @property kind Required. Gets or sets the Kind of the resource.
* @property location Specifies the location of the resource.
* @property properties The set of properties specific to bot channel resource
* @property resourceGroupName The name of the Bot resource group in the user subscription.
* @property resourceName The name of the Bot resource.
* @property sku Gets or sets the SKU of the resource.
* @property tags Contains resource tags defined as key/value pairs.
*/
public data class ChannelArgs(
public val channelName: Output? = null,
public val kind: Output>? = null,
public val location: Output? = null,
public val properties: Output? = null,
public val resourceGroupName: Output? = null,
public val resourceName: Output? = null,
public val sku: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.botservice.ChannelArgs =
com.pulumi.azurenative.botservice.ChannelArgs.builder()
.channelName(channelName?.applyValue({ args0 -> args0 }))
.kind(
kind?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.properties(properties?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.resourceName(resourceName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [ChannelArgs].
*/
@PulumiTagMarker
public class ChannelArgsBuilder internal constructor() {
private var channelName: Output? = null
private var kind: Output>? = null
private var location: Output? = null
private var properties: Output? = null
private var resourceGroupName: Output? = null
private var resourceName: Output? = null
private var sku: Output? = null
private var tags: Output>? = null
/**
* @param value The name of the Channel resource.
*/
@JvmName("lxiwhndcsbeunhje")
public suspend fun channelName(`value`: Output) {
this.channelName = value
}
/**
* @param value Required. Gets or sets the Kind of the resource.
*/
@JvmName("ekprhxxrksimyilh")
public suspend fun kind(`value`: Output>) {
this.kind = value
}
/**
* @param value Specifies the location of the resource.
*/
@JvmName("mtxrovcpajqyswjb")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The set of properties specific to bot channel resource
*/
@JvmName("diwgwwcqofhjoall")
public suspend fun properties(`value`: Output) {
this.properties = value
}
/**
* @param value The name of the Bot resource group in the user subscription.
*/
@JvmName("nbsicouqxvheaunf")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name of the Bot resource.
*/
@JvmName("jjfvbxsminwxjmqv")
public suspend fun resourceName(`value`: Output) {
this.resourceName = value
}
/**
* @param value Gets or sets the SKU of the resource.
*/
@JvmName("xefjgdenbmchauao")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value Contains resource tags defined as key/value pairs.
*/
@JvmName("uqmqxpbpstqgsanv")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the Channel resource.
*/
@JvmName("jeuajhwqoyxgxjbo")
public suspend fun channelName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.channelName = mapped
}
/**
* @param value Required. Gets or sets the Kind of the resource.
*/
@JvmName("biphmtcvatyxsper")
public suspend fun kind(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Required. Gets or sets the Kind of the resource.
*/
@JvmName("ydqpmjtlsafggrun")
public fun kind(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Required. Gets or sets the Kind of the resource.
*/
@JvmName("bgattaoubukbqrad")
public fun kind(`value`: Kind) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value Specifies the location of the resource.
*/
@JvmName("xyhldilpnxfkiwmw")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The set of properties specific to bot channel resource
*/
@JvmName("allicbgvtngvwqip")
public suspend fun properties(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.properties = mapped
}
/**
* @param value The name of the Bot resource group in the user subscription.
*/
@JvmName("wrhagkpubhvmlekl")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name of the Bot resource.
*/
@JvmName("jwvjutyakstefkep")
public suspend fun resourceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceName = mapped
}
/**
* @param value Gets or sets the SKU of the resource.
*/
@JvmName("wdpelfovwijqwqpo")
public suspend fun sku(`value`: SkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument Gets or sets the SKU of the resource.
*/
@JvmName("hbsermppsvopjeyd")
public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value Contains resource tags defined as key/value pairs.
*/
@JvmName("fcsdgumnnswjjbpt")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Contains resource tags defined as key/value pairs.
*/
@JvmName("sgtjjcdmiugqetuf")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): ChannelArgs = ChannelArgs(
channelName = channelName,
kind = kind,
location = location,
properties = properties,
resourceGroupName = resourceGroupName,
resourceName = resourceName,
sku = sku,
tags = tags,
)
}