Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The botServices/connections resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.BotService/botServices/connections resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.BotService/botServices/connections@2023-09-15-preview' = {
parent: resourceSymbolicName
etag: 'string'
kind: 'string'
location: 'string'
name: 'string'
properties: {
clientId: 'string'
clientSecret: 'string'
id: 'string'
name: 'string'
parameters: [
{
key: 'string'
value: 'string'
}
]
provisioningState: 'string'
scopes: 'string'
serviceProviderDisplayName: 'string'
serviceProviderId: 'string'
}
sku: {
name: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.BotService/botServices/connections
| Name | Description | Value |
|---|---|---|
| etag | Entity Tag. | string |
| kind | Required. Gets or sets the Kind of the resource. | 'azurebot' 'bot' 'designer' 'function' 'sdk' |
| location | Specifies the location of the resource. | string |
| name | The resource name | string Constraints: Min length = 2 Max length = 64 Pattern = ^[a-zA-Z0-9][\sa-zA-Z0-9_.-]*$ (required) |
| parent | In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource. For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: botServices |
| properties | The set of properties specific to bot channel resource | ConnectionSettingProperties |
| sku | Gets or sets the SKU of the resource. | Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ConnectionSettingParameter
| Name | Description | Value |
|---|---|---|
| key | Key for the Connection Setting Parameter. | string |
| value | Value associated with the Connection Setting Parameter. | string |
ConnectionSettingProperties
| Name | Description | Value |
|---|---|---|
| clientId | Client Id associated with the Connection Setting. | string |
| clientSecret | Client Secret associated with the Connection Setting | string Constraints: Sensitive value. Pass in as a secure parameter. |
| id | Id of the Connection Setting. | string |
| name | Name of the Connection Setting. | string |
| parameters | Service Provider Parameters associated with the Connection Setting | ConnectionSettingParameter[] |
| provisioningState | Provisioning state of the resource | string |
| scopes | Scopes associated with the Connection Setting | string |
| serviceProviderDisplayName | Service Provider Display Name associated with the Connection Setting | string |
| serviceProviderId | Service Provider Id associated with the Connection Setting | string |
ConnectionSettingTags
| Name | Description | Value |
|---|
Sku
| Name | Description | Value |
|---|---|---|
| name | The sku name | 'F0' 'S1' (required) |
ARM template resource definition
The botServices/connections resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.BotService/botServices/connections resource, add the following JSON to your template.
{
"type": "Microsoft.BotService/botServices/connections",
"apiVersion": "2023-09-15-preview",
"name": "string",
"etag": "string",
"kind": "string",
"location": "string",
"properties": {
"clientId": "string",
"clientSecret": "string",
"id": "string",
"name": "string",
"parameters": [
{
"key": "string",
"value": "string"
}
],
"provisioningState": "string",
"scopes": "string",
"serviceProviderDisplayName": "string",
"serviceProviderId": "string"
},
"sku": {
"name": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.BotService/botServices/connections
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2023-09-15-preview' |
| etag | Entity Tag. | string |
| kind | Required. Gets or sets the Kind of the resource. | 'azurebot' 'bot' 'designer' 'function' 'sdk' |
| location | Specifies the location of the resource. | string |
| name | The resource name | string Constraints: Min length = 2 Max length = 64 Pattern = ^[a-zA-Z0-9][\sa-zA-Z0-9_.-]*$ (required) |
| properties | The set of properties specific to bot channel resource | ConnectionSettingProperties |
| sku | Gets or sets the SKU of the resource. | Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.BotService/botServices/connections' |
ConnectionSettingParameter
| Name | Description | Value |
|---|---|---|
| key | Key for the Connection Setting Parameter. | string |
| value | Value associated with the Connection Setting Parameter. | string |
ConnectionSettingProperties
| Name | Description | Value |
|---|---|---|
| clientId | Client Id associated with the Connection Setting. | string |
| clientSecret | Client Secret associated with the Connection Setting | string Constraints: Sensitive value. Pass in as a secure parameter. |
| id | Id of the Connection Setting. | string |
| name | Name of the Connection Setting. | string |
| parameters | Service Provider Parameters associated with the Connection Setting | ConnectionSettingParameter[] |
| provisioningState | Provisioning state of the resource | string |
| scopes | Scopes associated with the Connection Setting | string |
| serviceProviderDisplayName | Service Provider Display Name associated with the Connection Setting | string |
| serviceProviderId | Service Provider Id associated with the Connection Setting | string |
ConnectionSettingTags
| Name | Description | Value |
|---|
Sku
| Name | Description | Value |
|---|---|---|
| name | The sku name | 'F0' 'S1' (required) |
Usage Examples
Terraform (AzAPI provider) resource definition
The botServices/connections resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.BotService/botServices/connections resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.BotService/botServices/connections@2023-09-15-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
etag = "string"
kind = "string"
properties = {
clientId = "string"
clientSecret = "string"
id = "string"
name = "string"
parameters = [
{
key = "string"
value = "string"
}
]
provisioningState = "string"
scopes = "string"
serviceProviderDisplayName = "string"
serviceProviderId = "string"
}
sku = {
name = "string"
}
}
}
Property Values
Microsoft.BotService/botServices/connections
| Name | Description | Value |
|---|---|---|
| etag | Entity Tag. | string |
| kind | Required. Gets or sets the Kind of the resource. | 'azurebot' 'bot' 'designer' 'function' 'sdk' |
| location | Specifies the location of the resource. | string |
| name | The resource name | string Constraints: Min length = 2 Max length = 64 Pattern = ^[a-zA-Z0-9][\sa-zA-Z0-9_.-]*$ (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: botServices |
| properties | The set of properties specific to bot channel resource | ConnectionSettingProperties |
| sku | Gets or sets the SKU of the resource. | Sku |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.BotService/botServices/connections@2023-09-15-preview" |
ConnectionSettingParameter
| Name | Description | Value |
|---|---|---|
| key | Key for the Connection Setting Parameter. | string |
| value | Value associated with the Connection Setting Parameter. | string |
ConnectionSettingProperties
| Name | Description | Value |
|---|---|---|
| clientId | Client Id associated with the Connection Setting. | string |
| clientSecret | Client Secret associated with the Connection Setting | string Constraints: Sensitive value. Pass in as a secure parameter. |
| id | Id of the Connection Setting. | string |
| name | Name of the Connection Setting. | string |
| parameters | Service Provider Parameters associated with the Connection Setting | ConnectionSettingParameter[] |
| provisioningState | Provisioning state of the resource | string |
| scopes | Scopes associated with the Connection Setting | string |
| serviceProviderDisplayName | Service Provider Display Name associated with the Connection Setting | string |
| serviceProviderId | Service Provider Id associated with the Connection Setting | string |
ConnectionSettingTags
| Name | Description | Value |
|---|
Sku
| Name | Description | Value |
|---|---|---|
| name | The sku name | 'F0' 'S1' (required) |
Usage Examples
Terraform Samples
A basic example of deploying Bot Connection.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
azurerm = {
source = "hashicorp/azurerm"
}
}
}
provider "azurerm" {
features {
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
variable "client_secret" {
type = string
description = "The client secret for the bot service connection."
sensitive = true
}
data "azurerm_client_config" "current" {
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "botService" {
type = "Microsoft.BotService/botServices@2021-05-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = "global"
body = {
kind = "bot"
properties = {
displayName = var.resource_name
isCmekEnabled = false
isStreamingSupported = false
msaAppId = data.azurerm_client_config.current.tenant_id
}
sku = {
name = "F0"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
data "azapi_resource_action" "listAuthServiceProviders" {
type = "Microsoft.BotService@2021-05-01-preview"
resource_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}/providers/Microsoft.BotService"
action = "listAuthServiceProviders"
response_export_values = ["*"]
}
resource "azapi_resource" "connection" {
type = "Microsoft.BotService/botServices/connections@2021-05-01-preview"
parent_id = azapi_resource.botService.id
name = var.resource_name
location = "global"
body = {
kind = "bot"
properties = {
clientId = azapi_resource.botService.output.properties.msaAppId
clientSecret = var.client_secret
scopes = ""
serviceProviderId = data.azapi_resource_action.listAuthServiceProviders.output.value[36].properties.id
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}