az webapp connection create

Note

This command group has commands that are defined in both Azure CLI and at least one extension. Install each extension to benefit from its extended capabilities. Learn more about extensions.

Create a connection between a webapp and a target resource.

Commands

Name Description Type Status
az webapp connection create app-insights

Create a webapp connection to app-insights.

Core GA
az webapp connection create appconfig

Create a webapp connection to appconfig.

Core GA
az webapp connection create cognitiveservices

Create a webapp connection to cognitiveservices.

Core GA
az webapp connection create confluent-cloud

Create a webapp connection to confluent-cloud.

Core GA
az webapp connection create cosmos-cassandra

Create a webapp connection to cosmos-cassandra.

Core GA
az webapp connection create cosmos-gremlin

Create a webapp connection to cosmos-gremlin.

Core GA
az webapp connection create cosmos-mongo

Create a webapp connection to cosmos-mongo.

Core GA
az webapp connection create cosmos-sql

Create a webapp connection to cosmos-sql.

Core GA
az webapp connection create cosmos-table

Create a webapp connection to cosmos-table.

Core GA
az webapp connection create eventhub

Create a webapp connection to eventhub.

Core GA
az webapp connection create fabric-sql

Create a webapp connection to fabric-sql.

Core GA
az webapp connection create fabric-sql (serviceconnector-passwordless extension)

Create a webapp connection to fabric-sql.

Extension GA
az webapp connection create keyvault

Create a webapp connection to keyvault.

Core GA
az webapp connection create mongodb-atlas

Create a webapp connection to mongodb-atlas.

Core GA
az webapp connection create mysql

Create a webapp connection to mysql.

Core Deprecated
az webapp connection create mysql-flexible

Create a webapp connection to mysql-flexible.

Core GA
az webapp connection create mysql-flexible (serviceconnector-passwordless extension)

Create a webapp connection to mysql-flexible.

Extension GA
az webapp connection create neon-postgres

Create a webapp connection to neon-postgres.

Core GA
az webapp connection create postgres

Create a webapp connection to postgres.

Core Deprecated
az webapp connection create postgres-flexible

Create a webapp connection to postgres-flexible.

Core GA
az webapp connection create postgres-flexible (serviceconnector-passwordless extension)

Create a webapp connection to postgres-flexible.

Extension GA
az webapp connection create redis

Create a webapp connection to redis.

Core GA
az webapp connection create redis-enterprise

Create a webapp connection to redis-enterprise.

Core GA
az webapp connection create servicebus

Create a webapp connection to servicebus.

Core GA
az webapp connection create signalr

Create a webapp connection to signalr.

Core GA
az webapp connection create sql

Create a webapp connection to sql.

Core GA
az webapp connection create sql (serviceconnector-passwordless extension)

Create a webapp connection to sql.

Extension GA
az webapp connection create storage-blob

Create a webapp connection to storage-blob.

Core GA
az webapp connection create storage-file

Create a webapp connection to storage-file.

Core GA
az webapp connection create storage-queue

Create a webapp connection to storage-queue.

Core GA
az webapp connection create storage-table

Create a webapp connection to storage-table.

Core GA
az webapp connection create webpubsub

Create a webapp connection to webpubsub.

Core GA

az webapp connection create app-insights

Create a webapp connection to app-insights.

az webapp connection create app-insights [--acquire-policy-token]
                                         [--app-insights]
                                         [--appconfig-id]
                                         [--change-reference]
                                         [--client-type {dotnet, dotnet-internal, go, java, nodejs, none, python}]
                                         [--connection]
                                         [--connstr-props]
                                         [--customized-keys]
                                         [--name]
                                         [--no-recreate {false, true}]
                                         [--no-wait]
                                         [--opt-out {auth, configinfo, publicnetwork}]
                                         [--resource-group]
                                         [--secret]
                                         [--slot]
                                         [--source-id]
                                         [--target-id]
                                         [--target-resource-group --tg]
                                         [--vault-id]

Examples

Create a connection between webapp and app-insights interactively

az webapp connection create app-insights

Create a connection between webapp and app-insights with resource name

az webapp connection create app-insights -g WebAppRG -n MyWebApp --tg AppInsightsRG --app-insights MyAppInsights --secret

Create a connection between webapp slot and app-insights with resource name

az webapp connection create app-insights -g WebAppRG -n MyWebApp --slot MySlot --tg AppInsightsRG --app-insights MyAppInsights --secret

Create a connection between webapp and app-insights with resource id

az webapp connection create app-insights --source-id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site} --target-id /subscriptions/{subscription}/resourceGroups/{target_resource_group}/providers/microsoft.insights/components/{appinsights} --secret

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--app-insights

Name of the app insights. Required if '--target-id' is not specified.

--appconfig-id

The app configuration id to store configuration.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--client-type

The client type used on the webapp.

Property Value
Accepted values: dotnet, dotnet-internal, go, java, nodejs, none, python
--connection

Name of the webapp connection.

--connstr-props

The additional connection string properties used to build connection string.

--customized-keys

The customized keys used to change default configuration names. Key is the original name, value is the customized name.

--name -n

Name of the webapp. Required if '--source-id' is not specified.None.

--no-recreate

Skip executing creation operation when no updates to an existing connection.

Property Value
Default value: False
Accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--opt-out

Whether to disable some configuration steps. Use configinfo to disbale configuration information changes on source. Use publicnetwork to disable public network access configuration.Use auth to skip auth configuration such as enabling managed identity and granting RBAC roles.

Property Value
Accepted values: auth, configinfo, publicnetwork
--resource-group -g

The resource group which contains the webapp. Required if '--source-id' is not specified.None.

--secret

The secret auth info.

Usage: --secret.

Property Value
Parameter group: AuthType Arguments
--slot

The name of the slot. Default to the production slot if not specified.

--source-id

The resource id of a webapp. Required if ['--resource-group', '--name'] are not specified.

--target-id

The resource id of target service. Required if ['--target-resource-group', '--app-insights'] are not specified.

--target-resource-group --tg

The resource group which contains the app insights. Required if '--target-id' is not specified.

--vault-id

The id of key vault to store secret value.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az webapp connection create appconfig

Create a webapp connection to appconfig.

az webapp connection create appconfig [--acquire-policy-token]
                                      [--app-config]
                                      [--appconfig-id]
                                      [--change-reference]
                                      [--client-type {dotnet, dotnet-internal, java, nodejs, none, python}]
                                      [--connection]
                                      [--connstr-props]
                                      [--customized-keys]
                                      [--name]
                                      [--no-recreate {false, true}]
                                      [--no-wait]
                                      [--opt-out {auth, configinfo, publicnetwork}]
                                      [--private-endpoint {false, true}]
                                      [--resource-group]
                                      [--secret]
                                      [--service-principal]
                                      [--slot]
                                      [--source-id]
                                      [--system-identity]
                                      [--target-id]
                                      [--target-resource-group --tg]
                                      [--user-identity]
                                      [--vault-id]

Examples

Create a connection between webapp and appconfig interactively

az webapp connection create appconfig

Create a connection between webapp and appconfig with resource name

az webapp connection create appconfig -g WebAppRG -n MyWebApp --tg AppconfigRG --app-config MyConfigStore --system-identity

Create a connection between webapp slot and appconfig with resource name

az webapp connection create appconfig -g WebAppRG -n MyWebApp --slot MySlot --tg AppconfigRG --app-config MyConfigStore --system-identity

Create a connection between webapp and appconfig with resource id

az webapp connection create appconfig --source-id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site} --target-id /subscriptions/{subscription}/resourceGroups/{target_resource_group}/providers/Microsoft.AppConfiguration/configurationStores/{config_store} --system-identity

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--app-config

Name of the app configuration. Required if '--target-id' is not specified.

--appconfig-id

The app configuration id to store configuration.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--client-type

The client type used on the webapp.

Property Value
Accepted values: dotnet, dotnet-internal, java, nodejs, none, python
--connection

Name of the webapp connection.

--connstr-props

The additional connection string properties used to build connection string.

--customized-keys

The customized keys used to change default configuration names. Key is the original name, value is the customized name.

--name -n

Name of the webapp. Required if '--source-id' is not specified.None.

--no-recreate

Skip executing creation operation when no updates to an existing connection.

Property Value
Default value: False
Accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--opt-out

Whether to disable some configuration steps. Use configinfo to disbale configuration information changes on source. Use publicnetwork to disable public network access configuration.Use auth to skip auth configuration such as enabling managed identity and granting RBAC roles.

Property Value
Accepted values: auth, configinfo, publicnetwork
--private-endpoint

Connect target service by private endpoint. The private endpoint in source virtual network must be created ahead.

Property Value
Parameter group: NetworkSolution Arguments
Accepted values: false, true
--resource-group -g

The resource group which contains the webapp. Required if '--source-id' is not specified.None.

--secret

The secret auth info.

Usage: --secret.

Property Value
Parameter group: AuthType Arguments
--service-principal

The service principal auth info.

Usage: --service-principal client-id=XX secret=XX

client-id : Required. Client id of the service principal. object-id : Optional. Object id of the service principal (Enterprise Application). secret : Required. Secret of the service principal.

Property Value
Parameter group: AuthType Arguments
--slot

The name of the slot. Default to the production slot if not specified.

--source-id

The resource id of a webapp. Required if ['--resource-group', '--name'] are not specified.

--system-identity

The flag to use system assigned identity auth info. No additional parameters are needed.

Usage: --system-identity.

Property Value
Parameter group: AuthType Arguments
--target-id

The resource id of target service. Required if ['--target-resource-group', '--app-config'] are not specified.

--target-resource-group --tg

The resource group which contains the app configuration. Required if '--target-id' is not specified.

--user-identity

The user assigned identity auth info.

Usage: --user-identity client-id=XX subs-id=XX

client-id : Required. Client id of the user assigned identity. subs-id : Required. Subscription id of the user assigned identity.

Property Value
Parameter group: AuthType Arguments
--vault-id

The id of key vault to store secret value.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az webapp connection create cognitiveservices

Create a webapp connection to cognitiveservices.

az webapp connection create cognitiveservices [--account]
                                              [--acquire-policy-token]
                                              [--appconfig-id]
                                              [--change-reference]
                                              [--client-type {dotnet, none, python}]
                                              [--connection]
                                              [--connstr-props]
                                              [--customized-keys]
                                              [--name]
                                              [--no-recreate {false, true}]
                                              [--no-wait]
                                              [--opt-out {auth, configinfo, publicnetwork}]
                                              [--resource-group]
                                              [--secret]
                                              [--service-principal]
                                              [--slot]
                                              [--source-id]
                                              [--system-identity]
                                              [--target-id]
                                              [--target-resource-group --tg]
                                              [--user-identity]
                                              [--vault-id]

Examples

Create a connection between webapp and cognitiveservices interactively

az webapp connection create cognitiveservices

Create a connection between webapp and cognitiveservices with resource name

az webapp connection create cognitiveservices -g WebAppRG -n MyWebApp --tg CognitiveServicesRG --account MyAccount --system-identity

Create a connection between webapp slot and cognitiveservices with resource name

az webapp connection create cognitiveservices -g WebAppRG -n MyWebApp --slot MySlot --tg CognitiveServicesRG --account MyAccount --system-identity

Create a connection between webapp and cognitiveservices with resource id

az webapp connection create cognitiveservices --source-id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site} --target-id /subscriptions/{subscription}/resourceGroups/{target_resource_group}/providers/Microsoft.CognitiveServices/accounts/{account} --system-identity

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account

Name of the cognitive services account. Required if '--target-id' is not specified.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--appconfig-id

The app configuration id to store configuration.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--client-type

The client type used on the webapp.

Property Value
Accepted values: dotnet, none, python
--connection

Name of the webapp connection.

--connstr-props

The additional connection string properties used to build connection string.

--customized-keys

The customized keys used to change default configuration names. Key is the original name, value is the customized name.

--name -n

Name of the webapp. Required if '--source-id' is not specified.None.

--no-recreate

Skip executing creation operation when no updates to an existing connection.

Property Value
Default value: False
Accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--opt-out

Whether to disable some configuration steps. Use configinfo to disbale configuration information changes on source. Use publicnetwork to disable public network access configuration.Use auth to skip auth configuration such as enabling managed identity and granting RBAC roles.

Property Value
Accepted values: auth, configinfo, publicnetwork
--resource-group -g

The resource group which contains the webapp. Required if '--source-id' is not specified.None.

--secret

The secret auth info.

Usage: --secret.

Property Value
Parameter group: AuthType Arguments
--service-principal

The service principal auth info.

Usage: --service-principal client-id=XX secret=XX

client-id : Required. Client id of the service principal. object-id : Optional. Object id of the service principal (Enterprise Application). secret : Required. Secret of the service principal.

Property Value
Parameter group: AuthType Arguments
--slot

The name of the slot. Default to the production slot if not specified.

--source-id

The resource id of a webapp. Required if ['--resource-group', '--name'] are not specified.

--system-identity

The flag to use system assigned identity auth info. No additional parameters are needed.

Usage: --system-identity.

Property Value
Parameter group: AuthType Arguments
--target-id

The resource id of target service. Required if ['--target-resource-group', '--account'] are not specified.

--target-resource-group --tg

The resource group which contains the cognitive services. Required if '--target-id' is not specified.

--user-identity

The user assigned identity auth info.

Usage: --user-identity client-id=XX subs-id=XX

client-id : Required. Client id of the user assigned identity. subs-id : Required. Subscription id of the user assigned identity.

Property Value
Parameter group: AuthType Arguments
--vault-id

The id of key vault to store secret value.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az webapp connection create confluent-cloud

Create a webapp connection to confluent-cloud.

az webapp connection create confluent-cloud --bootstrap-server
                                            --kafka-key
                                            --kafka-secret
                                            --schema-key
                                            --schema-registry
                                            --schema-secret
                                            [--acquire-policy-token]
                                            [--appconfig-id]
                                            [--change-reference]
                                            [--client-type {dotnet, dotnet-internal, go, java, none, python, springBoot}]
                                            [--connection]
                                            [--customized-keys]
                                            [--name]
                                            [--no-wait]
                                            [--opt-out {auth, configinfo, publicnetwork}]
                                            [--resource-group]
                                            [--slot]
                                            [--source-id]
                                            [--vault-id]

Examples

Create a connection between webapp and confluent-cloud

az webapp connection create confluent-cloud -g WebAppRG -n MyWebApp --bootstrap-server xxx.eastus.azure.confluent.cloud:9092 --kafka-key Name --kafka-secret Secret --schema-registry https://xxx.eastus.azure.confluent.cloud --schema-key Name --schema-secret Secret

Required Parameters

--bootstrap-server

Kafka bootstrap server url.

--kafka-key

Kafka API-Key (key).

--kafka-secret

Kafka API-Key (secret).

--schema-key

Schema registry API-Key (key).

--schema-registry

Schema registry url.

--schema-secret

Schema registry API-Key (secret).

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--appconfig-id

The app configuration id to store configuration.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--client-type

The client type used on the webapp.

Property Value
Accepted values: dotnet, dotnet-internal, go, java, none, python, springBoot
--connection

Name of the connection.

--customized-keys

The customized keys used to change default configuration names. Key is the original name, value is the customized name.

--name -n

Name of the webapp. Required if '--source-id' is not specified.None.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--opt-out

Whether to disable some configuration steps. Use configinfo to disbale configuration information changes on source. Use publicnetwork to disable public network access configuration.Use auth to skip auth configuration such as enabling managed identity and granting RBAC roles.

Property Value
Accepted values: auth, configinfo, publicnetwork
--resource-group -g

The resource group which contains the webapp. Required if '--source-id' is not specified.None.

--slot

The name of the slot. Default to the production slot if not specified.

--source-id

The resource id of a webapp. Required if ['--resource-group', '--name'] are not specified.

--vault-id

The id of key vault to store secret value.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az webapp connection create cosmos-cassandra

Create a webapp connection to cosmos-cassandra.

az webapp connection create cosmos-cassandra [--account]
                                             [--acquire-policy-token]
                                             [--appconfig-id]
                                             [--change-reference]
                                             [--client-type {dotnet, dotnet-internal, go, java, nodejs, none, python, springBoot}]
                                             [--connection]
                                             [--connstr-props]
                                             [--customized-keys]
                                             [--key-space]
                                             [--name]
                                             [--no-recreate {false, true}]
                                             [--no-wait]
                                             [--opt-out {auth, configinfo, publicnetwork}]
                                             [--private-endpoint {false, true}]
                                             [--resource-group]
                                             [--secret]
                                             [--service-endpoint {false, true}]
                                             [--service-principal]
                                             [--slot]
                                             [--source-id]
                                             [--system-identity]
                                             [--target-id]
                                             [--target-resource-group --tg]
                                             [--user-identity]
                                             [--vault-id]

Examples

Create a connection between webapp and cosmos-cassandra interactively

az webapp connection create cosmos-cassandra

Create a connection between webapp and cosmos-cassandra with resource name

az webapp connection create cosmos-cassandra -g WebAppRG -n MyWebApp --tg CosmosRG --account MyAccount --key-space MyKeySpace --system-identity

Create a connection between webapp slot and cosmos-cassandra with resource name

az webapp connection create cosmos-cassandra -g WebAppRG -n MyWebApp --slot MySlot --tg CosmosRG --account MyAccount --key-space MyKeySpace --system-identity

Create a connection between webapp and cosmos-cassandra with resource id

az webapp connection create cosmos-cassandra --source-id /subscriptions/{subscription}/resourceGroups/{source_resource_group}/providers/Microsoft.Web/sites/{site} --target-id /subscriptions/{subscription}/resourceGroups/{target_resource_group}/providers/Microsoft.DocumentDB/databaseAccounts/{account}/cassandraKeyspaces/{key_space} --system-identity

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account

Name of the cosmos database account. Required if '--target-id' is not specified.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--appconfig-id

The app configuration id to store configuration.

--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--client-type

The client type used on the webapp.

Property Value
Accepted values: dotnet, dotnet-internal, go, java, nodejs, none, python, springBoot
--connection

Name of the webapp connection.

--connstr-props

The additional connection string properties used to build connection string.

--customized-keys

The customized keys used to change default configuration names. Key is the original name, value is the customized name.

--key-space

Name of the keyspace. Required if '--target-id' is not specified.

--name -n

Name of the webapp. Required if '--source-id' is not specified.None.

--no-recreate

Skip executing creation operation when no updates to an existing connection.

Property Value
Default value: False
Accepted values: false, true
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--opt-out

Whether to disable some configuration steps. Use configinfo to disbale configuration information changes on source. Use publicnetwork to disable public network access configuration.Use auth to skip auth configuration such as enabling managed identity and granting RBAC roles.

Property Value
Accepted values: auth, configinfo, publicnetwork
--private-endpoint

Connect target service by private endpoint. The private endpoint in source virtual network must be created ahead.

Property Value
Parameter group: NetworkSolution Arguments
Accepted values: false, true
--resource-group -g

The resource group which contains the webapp. Required if '--source-id' is not specified.None.

--secret

The secret auth info.

Usage: --secret.

Property Value
Parameter group: AuthType Arguments
--service-endpoint

Connect target service by service endpoint. Source resource must be in the VNet and target SKU must support service endpoint feature.

Property Value
Parameter group: NetworkSolution Arguments
Accepted values: false, true
--service-principal