We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a Directline integration for a Bot Channel
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleChannelsRegistration = new Azure.Bot.ChannelsRegistration("exampleChannelsRegistration", new Azure.Bot.ChannelsRegistrationArgs
{
Location = "global",
ResourceGroupName = exampleResourceGroup.Name,
Sku = "F0",
MicrosoftAppId = current.Apply(current => current.ClientId),
});
var exampleChannelDirectLine = new Azure.Bot.ChannelDirectLine("exampleChannelDirectLine", new Azure.Bot.ChannelDirectLineArgs
{
BotName = exampleChannelsRegistration.Name,
Location = exampleChannelsRegistration.Location,
ResourceGroupName = exampleResourceGroup.Name,
Sites =
{
new Azure.Bot.Inputs.ChannelDirectLineSiteArgs
{
Name = "default",
Enabled = true,
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/bot"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleChannelsRegistration, err := bot.NewChannelsRegistration(ctx, "exampleChannelsRegistration", &bot.ChannelsRegistrationArgs{
Location: pulumi.String("global"),
ResourceGroupName: exampleResourceGroup.Name,
Sku: pulumi.String("F0"),
MicrosoftAppId: pulumi.String(current.ClientId),
})
if err != nil {
return err
}
_, err = bot.NewChannelDirectLine(ctx, "exampleChannelDirectLine", &bot.ChannelDirectLineArgs{
BotName: exampleChannelsRegistration.Name,
Location: exampleChannelsRegistration.Location,
ResourceGroupName: exampleResourceGroup.Name,
Sites: bot.ChannelDirectLineSiteArray{
&bot.ChannelDirectLineSiteArgs{
Name: pulumi.String("default"),
Enabled: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getClientConfig({});
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleChannelsRegistration = new azure.bot.ChannelsRegistration("exampleChannelsRegistration", {
location: "global",
resourceGroupName: exampleResourceGroup.name,
sku: "F0",
microsoftAppId: current.then(current => current.clientId),
});
const exampleChannelDirectLine = new azure.bot.ChannelDirectLine("exampleChannelDirectLine", {
botName: exampleChannelsRegistration.name,
location: exampleChannelsRegistration.location,
resourceGroupName: exampleResourceGroup.name,
sites: [{
name: "default",
enabled: true,
}],
});
import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_channels_registration = azure.bot.ChannelsRegistration("exampleChannelsRegistration",
location="global",
resource_group_name=example_resource_group.name,
sku="F0",
microsoft_app_id=current.client_id)
example_channel_direct_line = azure.bot.ChannelDirectLine("exampleChannelDirectLine",
bot_name=example_channels_registration.name,
location=example_channels_registration.location,
resource_group_name=example_resource_group.name,
sites=[azure.bot.ChannelDirectLineSiteArgs(
name="default",
enabled=True,
)])
Example coming soon!
Create ChannelDirectLine Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ChannelDirectLine(name: string, args: ChannelDirectLineArgs, opts?: CustomResourceOptions);@overload
def ChannelDirectLine(resource_name: str,
args: ChannelDirectLineArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ChannelDirectLine(resource_name: str,
opts: Optional[ResourceOptions] = None,
bot_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
sites: Optional[Sequence[ChannelDirectLineSiteArgs]] = None,
location: Optional[str] = None)func NewChannelDirectLine(ctx *Context, name string, args ChannelDirectLineArgs, opts ...ResourceOption) (*ChannelDirectLine, error)public ChannelDirectLine(string name, ChannelDirectLineArgs args, CustomResourceOptions? opts = null)
public ChannelDirectLine(String name, ChannelDirectLineArgs args)
public ChannelDirectLine(String name, ChannelDirectLineArgs args, CustomResourceOptions options)
type: azure:bot:ChannelDirectLine
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 ChannelDirectLineArgs
- 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 ChannelDirectLineArgs
- 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 ChannelDirectLineArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ChannelDirectLineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ChannelDirectLineArgs
- 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 channelDirectLineResource = new Azure.Bot.ChannelDirectLine("channelDirectLineResource", new()
{
BotName = "string",
ResourceGroupName = "string",
Sites = new[]
{
new Azure.Bot.Inputs.ChannelDirectLineSiteArgs
{
Name = "string",
Enabled = false,
EnhancedAuthenticationEnabled = false,
Id = "string",
Key = "string",
Key2 = "string",
TrustedOrigins = new[]
{
"string",
},
V1Allowed = false,
V3Allowed = false,
},
},
Location = "string",
});
example, err := bot.NewChannelDirectLine(ctx, "channelDirectLineResource", &bot.ChannelDirectLineArgs{
BotName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Sites: bot.ChannelDirectLineSiteArray{
&bot.ChannelDirectLineSiteArgs{
Name: pulumi.String("string"),
Enabled: pulumi.Bool(false),
EnhancedAuthenticationEnabled: pulumi.Bool(false),
Id: pulumi.String("string"),
Key: pulumi.String("string"),
Key2: pulumi.String("string"),
TrustedOrigins: pulumi.StringArray{
pulumi.String("string"),
},
V1Allowed: pulumi.Bool(false),
V3Allowed: pulumi.Bool(false),
},
},
Location: pulumi.String("string"),
})
var channelDirectLineResource = new ChannelDirectLine("channelDirectLineResource", ChannelDirectLineArgs.builder()
.botName("string")
.resourceGroupName("string")
.sites(ChannelDirectLineSiteArgs.builder()
.name("string")
.enabled(false)
.enhancedAuthenticationEnabled(false)
.id("string")
.key("string")
.key2("string")
.trustedOrigins("string")
.v1Allowed(false)
.v3Allowed(false)
.build())
.location("string")
.build());
channel_direct_line_resource = azure.bot.ChannelDirectLine("channelDirectLineResource",
bot_name="string",
resource_group_name="string",
sites=[{
"name": "string",
"enabled": False,
"enhanced_authentication_enabled": False,
"id": "string",
"key": "string",
"key2": "string",
"trusted_origins": ["string"],
"v1_allowed": False,
"v3_allowed": False,
}],
location="string")
const channelDirectLineResource = new azure.bot.ChannelDirectLine("channelDirectLineResource", {
botName: "string",
resourceGroupName: "string",
sites: [{
name: "string",
enabled: false,
enhancedAuthenticationEnabled: false,
id: "string",
key: "string",
key2: "string",
trustedOrigins: ["string"],
v1Allowed: false,
v3Allowed: false,
}],
location: "string",
});
type: azure:bot:ChannelDirectLine
properties:
botName: string
location: string
resourceGroupName: string
sites:
- enabled: false
enhancedAuthenticationEnabled: false
id: string
key: string
key2: string
name: string
trustedOrigins:
- string
v1Allowed: false
v3Allowed: false
ChannelDirectLine 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 ChannelDirectLine resource accepts the following input properties:
- Bot
Name string - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- Sites
List<Channel
Direct Line Site> - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below - Location string
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Bot
Name string - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- Sites
[]Channel
Direct Line Site Args - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below - Location string
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- bot
Name String - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites
List<Channel
Direct Line Site> - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below - location String
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- bot
Name string - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites
Channel
Direct Line Site[] - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below - location string
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- bot_
name str - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites
Sequence[Channel
Direct Line Site Args] - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below - location str
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- bot
Name String - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites List<Property Map>
- A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below - location String
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ChannelDirectLine resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ChannelDirectLine Resource
Get an existing ChannelDirectLine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ChannelDirectLineState, opts?: CustomResourceOptions): ChannelDirectLine@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bot_name: Optional[str] = None,
location: Optional[str] = None,
resource_group_name: Optional[str] = None,
sites: Optional[Sequence[ChannelDirectLineSiteArgs]] = None) -> ChannelDirectLinefunc GetChannelDirectLine(ctx *Context, name string, id IDInput, state *ChannelDirectLineState, opts ...ResourceOption) (*ChannelDirectLine, error)public static ChannelDirectLine Get(string name, Input<string> id, ChannelDirectLineState? state, CustomResourceOptions? opts = null)public static ChannelDirectLine get(String name, Output<String> id, ChannelDirectLineState state, CustomResourceOptions options)resources: _: type: azure:bot:ChannelDirectLine get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bot
Name string - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- Location string
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- Sites
List<Channel
Direct Line Site> - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below
- Bot
Name string - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- Location string
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- Sites
[]Channel
Direct Line Site Args - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below
- bot
Name String - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- location String
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites
List<Channel
Direct Line Site> - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below
- bot
Name string - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- location string
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites
Channel
Direct Line Site[] - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below
- bot_
name str - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- location str
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites
Sequence[Channel
Direct Line Site Args] - A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below
- bot
Name String - The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.
- location String
- The supported Azure location where the resource exists. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.
- sites List<Property Map>
- A site represents a client application that you want to connect to your bot. Multiple
siteblocks may be defined as below
Supporting Types
ChannelDirectLineSite, ChannelDirectLineSiteArgs
- Name string
- The name of the site
- Enabled bool
- Enables/Disables this site. Enabled by default
- Enhanced
Authentication boolEnabled - Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
- Id string
- Id for the site
- Key string
- Primary key for accessing this site
- Key2 string
- Secondary key for accessing this site
- Trusted
Origins List<string> - This field is required when
is_secure_site_enabledis enabled. Determines which origins can establish a Directline conversation for this site. - V1Allowed bool
- Enables v1 of the Directline protocol for this site. Enabled by default
- V3Allowed bool
- Enables v3 of the Directline protocol for this site. Enabled by default
- Name string
- The name of the site
- Enabled bool
- Enables/Disables this site. Enabled by default
- Enhanced
Authentication boolEnabled - Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
- Id string
- Id for the site
- Key string
- Primary key for accessing this site
- Key2 string
- Secondary key for accessing this site
- Trusted
Origins []string - This field is required when
is_secure_site_enabledis enabled. Determines which origins can establish a Directline conversation for this site. - V1Allowed bool
- Enables v1 of the Directline protocol for this site. Enabled by default
- V3Allowed bool
- Enables v3 of the Directline protocol for this site. Enabled by default
- name String
- The name of the site
- enabled Boolean
- Enables/Disables this site. Enabled by default
- enhanced
Authentication BooleanEnabled - Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
- id String
- Id for the site
- key String
- Primary key for accessing this site
- key2 String
- Secondary key for accessing this site
- trusted
Origins List<String> - This field is required when
is_secure_site_enabledis enabled. Determines which origins can establish a Directline conversation for this site. - v1Allowed Boolean
- Enables v1 of the Directline protocol for this site. Enabled by default
- v3Allowed Boolean
- Enables v3 of the Directline protocol for this site. Enabled by default
- name string
- The name of the site
- enabled boolean
- Enables/Disables this site. Enabled by default
- enhanced
Authentication booleanEnabled - Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
- id string
- Id for the site
- key string
- Primary key for accessing this site
- key2 string
- Secondary key for accessing this site
- trusted
Origins string[] - This field is required when
is_secure_site_enabledis enabled. Determines which origins can establish a Directline conversation for this site. - v1Allowed boolean
- Enables v1 of the Directline protocol for this site. Enabled by default
- v3Allowed boolean
- Enables v3 of the Directline protocol for this site. Enabled by default
- name str
- The name of the site
- enabled bool
- Enables/Disables this site. Enabled by default
- enhanced_
authentication_ boolenabled - Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
- id str
- Id for the site
- key str
- Primary key for accessing this site
- key2 str
- Secondary key for accessing this site
- trusted_
origins Sequence[str] - This field is required when
is_secure_site_enabledis enabled. Determines which origins can establish a Directline conversation for this site. - v1_
allowed bool - Enables v1 of the Directline protocol for this site. Enabled by default
- v3_
allowed bool - Enables v3 of the Directline protocol for this site. Enabled by default
- name String
- The name of the site
- enabled Boolean
- Enables/Disables this site. Enabled by default
- enhanced
Authentication BooleanEnabled - Enables additional security measures for this site, see Enhanced Directline Authentication Features. Disabled by default.
- id String
- Id for the site
- key String
- Primary key for accessing this site
- key2 String
- Secondary key for accessing this site
- trusted
Origins List<String> - This field is required when
is_secure_site_enabledis enabled. Determines which origins can establish a Directline conversation for this site. - v1Allowed Boolean
- Enables v1 of the Directline protocol for this site. Enabled by default
- v3Allowed Boolean
- Enables v3 of the Directline protocol for this site. Enabled by default
Import
The Directline Channel for a Bot can be imported using the resource id, e.g.
$ pulumi import azure:bot/channelDirectLine:ChannelDirectLine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.BotService/botServices/example/channels/DirectlineChannel
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
