1. Packages
  2. Azure Classic
  3. API Docs
  4. bot
  5. ChannelDirectLine

We recommend using Azure Native.

Azure Classic v5.57.0 published on Tuesday, Nov 28, 2023 by Pulumi

azure.bot.ChannelDirectLine

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.57.0 published on Tuesday, Nov 28, 2023 by Pulumi

    Manages a Directline integration for a Bot Channel

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Azure.Core.GetClientConfig.Invoke();
    
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleChannelsRegistration = new Azure.Bot.ChannelsRegistration("exampleChannelsRegistration", new()
        {
            Location = "global",
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = "F0",
            MicrosoftAppId = current.Apply(getClientConfigResult => getClientConfigResult.ClientId),
        });
    
        var exampleChannelDirectLine = new Azure.Bot.ChannelDirectLine("exampleChannelDirectLine", new()
        {
            BotName = exampleChannelsRegistration.Name,
            Location = exampleChannelsRegistration.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sites = new[]
            {
                new Azure.Bot.Inputs.ChannelDirectLineSiteArgs
                {
                    Name = "default",
                    Enabled = true,
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/bot"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.bot.ChannelsRegistration;
    import com.pulumi.azure.bot.ChannelsRegistrationArgs;
    import com.pulumi.azure.bot.ChannelDirectLine;
    import com.pulumi.azure.bot.ChannelDirectLineArgs;
    import com.pulumi.azure.bot.inputs.ChannelDirectLineSiteArgs;
    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) {
            final var current = CoreFunctions.getClientConfig();
    
            var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleChannelsRegistration = new ChannelsRegistration("exampleChannelsRegistration", ChannelsRegistrationArgs.builder()        
                .location("global")
                .resourceGroupName(exampleResourceGroup.name())
                .sku("F0")
                .microsoftAppId(current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()))
                .build());
    
            var exampleChannelDirectLine = new ChannelDirectLine("exampleChannelDirectLine", ChannelDirectLineArgs.builder()        
                .botName(exampleChannelsRegistration.name())
                .location(exampleChannelsRegistration.location())
                .resourceGroupName(exampleResourceGroup.name())
                .sites(ChannelDirectLineSiteArgs.builder()
                    .name("default")
                    .enabled(true)
                    .build())
                .build());
    
        }
    }
    
    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,
        )])
    
    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,
        }],
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleChannelsRegistration:
        type: azure:bot:ChannelsRegistration
        properties:
          location: global
          resourceGroupName: ${exampleResourceGroup.name}
          sku: F0
          microsoftAppId: ${current.clientId}
      exampleChannelDirectLine:
        type: azure:bot:ChannelDirectLine
        properties:
          botName: ${exampleChannelsRegistration.name}
          location: ${exampleChannelsRegistration.location}
          resourceGroupName: ${exampleResourceGroup.name}
          sites:
            - name: default
              enabled: true
    variables:
      current:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
    

    Create ChannelDirectLine Resource

    new ChannelDirectLine(name: string, args: ChannelDirectLineArgs, opts?: CustomResourceOptions);
    @overload
    def ChannelDirectLine(resource_name: 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)
    @overload
    def ChannelDirectLine(resource_name: str,
                          args: ChannelDirectLineArgs,
                          opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    The ChannelDirectLine resource accepts the following input properties:

    BotName string

    The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.

    ResourceGroupName string

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    Sites List<ChannelDirectLineSite>

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    Location string

    The supported Azure location where the resource exists. Changing this forces a new resource to be created.

    BotName string

    The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.

    ResourceGroupName string

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    Sites []ChannelDirectLineSiteArgs

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    Location string

    The supported Azure location where the resource exists. Changing this forces a new resource to be created.

    botName String

    The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.

    resourceGroupName String

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    sites List<ChannelDirectLineSite>

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    location String

    The supported Azure location where the resource exists. Changing this forces a new resource to be created.

    botName string

    The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.

    resourceGroupName string

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    sites ChannelDirectLineSite[]

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined 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_name str

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    sites Sequence[ChannelDirectLineSiteArgs]

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    location str

    The supported Azure location where the resource exists. Changing this forces a new resource to be created.

    botName String

    The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created.

    resourceGroupName String

    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. One or more site blocks as defined 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) -> ChannelDirectLine
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    BotName 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.

    ResourceGroupName string

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    Sites List<ChannelDirectLineSite>

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    BotName 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.

    ResourceGroupName string

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    Sites []ChannelDirectLineSiteArgs

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    botName 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.

    resourceGroupName String

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    sites List<ChannelDirectLineSite>

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    botName 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.

    resourceGroupName string

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    sites ChannelDirectLineSite[]

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined 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_name str

    The name of the resource group in which to create the Bot Channel. Changing this forces a new resource to be created.

    sites Sequence[ChannelDirectLineSiteArgs]

    A site represents a client application that you want to connect to your bot. One or more site blocks as defined below.

    botName 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.

    resourceGroupName String

    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. One or more site blocks as defined below.

    Supporting Types

    ChannelDirectLineSite, ChannelDirectLineSiteArgs

    Name string

    The name of the site

    Enabled bool

    Enables/Disables this site. Defaults to true.

    EndpointParametersEnabled bool

    Is the endpoint parameters enabled for this site?

    EnhancedAuthenticationEnabled bool

    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

    StorageEnabled bool

    Is the storage site enabled for detailed logging? Defaults to true.

    TrustedOrigins List<string>

    This field is required when is_secure_site_enabled is enabled. Determines which origins can establish a Directline conversation for this site.

    UserUploadEnabled bool

    Is the user upload enabled for this site? Defaults to true.

    V1Allowed bool

    Enables v1 of the Directline protocol for this site. Defaults to true.

    V3Allowed bool

    Enables v3 of the Directline protocol for this site. Defaults to true.

    Name string

    The name of the site

    Enabled bool

    Enables/Disables this site. Defaults to true.

    EndpointParametersEnabled bool

    Is the endpoint parameters enabled for this site?

    EnhancedAuthenticationEnabled bool

    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

    StorageEnabled bool

    Is the storage site enabled for detailed logging? Defaults to true.

    TrustedOrigins []string

    This field is required when is_secure_site_enabled is enabled. Determines which origins can establish a Directline conversation for this site.

    UserUploadEnabled bool

    Is the user upload enabled for this site? Defaults to true.

    V1Allowed bool

    Enables v1 of the Directline protocol for this site. Defaults to true.

    V3Allowed bool

    Enables v3 of the Directline protocol for this site. Defaults to true.

    name String

    The name of the site

    enabled Boolean

    Enables/Disables this site. Defaults to true.

    endpointParametersEnabled Boolean

    Is the endpoint parameters enabled for this site?

    enhancedAuthenticationEnabled Boolean

    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

    storageEnabled Boolean

    Is the storage site enabled for detailed logging? Defaults to true.

    trustedOrigins List<String>

    This field is required when is_secure_site_enabled is enabled. Determines which origins can establish a Directline conversation for this site.

    userUploadEnabled Boolean

    Is the user upload enabled for this site? Defaults to true.

    v1Allowed Boolean

    Enables v1 of the Directline protocol for this site. Defaults to true.

    v3Allowed Boolean

    Enables v3 of the Directline protocol for this site. Defaults to true.

    name string

    The name of the site

    enabled boolean

    Enables/Disables this site. Defaults to true.

    endpointParametersEnabled boolean

    Is the endpoint parameters enabled for this site?

    enhancedAuthenticationEnabled boolean

    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

    storageEnabled boolean

    Is the storage site enabled for detailed logging? Defaults to true.

    trustedOrigins string[]

    This field is required when is_secure_site_enabled is enabled. Determines which origins can establish a Directline conversation for this site.

    userUploadEnabled boolean

    Is the user upload enabled for this site? Defaults to true.

    v1Allowed boolean

    Enables v1 of the Directline protocol for this site. Defaults to true.

    v3Allowed boolean

    Enables v3 of the Directline protocol for this site. Defaults to true.

    name str

    The name of the site

    enabled bool

    Enables/Disables this site. Defaults to true.

    endpoint_parameters_enabled bool

    Is the endpoint parameters enabled for this site?

    enhanced_authentication_enabled bool

    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

    storage_enabled bool

    Is the storage site enabled for detailed logging? Defaults to true.

    trusted_origins Sequence[str]

    This field is required when is_secure_site_enabled is enabled. Determines which origins can establish a Directline conversation for this site.

    user_upload_enabled bool

    Is the user upload enabled for this site? Defaults to true.

    v1_allowed bool

    Enables v1 of the Directline protocol for this site. Defaults to true.

    v3_allowed bool

    Enables v3 of the Directline protocol for this site. Defaults to true.

    name String

    The name of the site

    enabled Boolean

    Enables/Disables this site. Defaults to true.

    endpointParametersEnabled Boolean

    Is the endpoint parameters enabled for this site?

    enhancedAuthenticationEnabled Boolean

    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

    storageEnabled Boolean

    Is the storage site enabled for detailed logging? Defaults to true.

    trustedOrigins List<String>

    This field is required when is_secure_site_enabled is enabled. Determines which origins can establish a Directline conversation for this site.

    userUploadEnabled Boolean

    Is the user upload enabled for this site? Defaults to true.

    v1Allowed Boolean

    Enables v1 of the Directline protocol for this site. Defaults to true.

    v3Allowed Boolean

    Enables v3 of the Directline protocol for this site. Defaults to true.

    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
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.57.0 published on Tuesday, Nov 28, 2023 by Pulumi