Channel Args
data class ChannelArgs(val channelName: Output<String>? = null, val kind: Output<Either<String, Kind>>? = null, val location: Output<String>? = null, val properties: Output<Any>? = null, val resourceGroupName: Output<String>? = null, val resourceName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ChannelArgs>
Bot channel resource definition Uses Azure REST API version 2023-09-15-preview. In version 2.x of the Azure Native provider, it used API version 2022-09-15. Other available API versions: 2022-09-15. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native botservice [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create Alexa Channel
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Create Channel
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 = "a@b.com",
IsEnabled = true,
Password = "pwd",
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
Content copied to clipboard
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("a@b.com"),
IsEnabled: pulumi.Bool(true),
Password: pulumi.String("pwd"),
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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("a@b.com")
.isEnabled(true)
.password("pwd")
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
Content copied to clipboard
Create DirectLine Speech Channel
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Create Email Channel
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 = "a@b.com",
IsEnabled = true,
MagicCode = "000000",
},
},
ResourceGroupName = "OneResourceGroupName",
ResourceName = "samplebotname",
});
});
Content copied to clipboard
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("a@b.com"),
IsEnabled: pulumi.Bool(true),
MagicCode: pulumi.String("000000"),
},
},
ResourceGroupName: pulumi.String("OneResourceGroupName"),
ResourceName: pulumi.String("samplebotname"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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("a@b.com")
.isEnabled(true)
.magicCode("000000")
.build())
.build())
.resourceGroupName("OneResourceGroupName")
.resourceName("samplebotname")
.build());
}
}
Content copied to clipboard
Create Line Channel
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:botservice:Channel myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(channelName: Output<String>? = null, kind: Output<Either<String, Kind>>? = null, location: Output<String>? = null, properties: Output<Any>? = null, resourceGroupName: Output<String>? = null, resourceName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null)