az webapp config connection-string

Manage a web app's connection strings.

Commands

az webapp config connection-string delete

Delete a web app's connection strings.

az webapp config connection-string list

Get a web app's connection strings.

az webapp config connection-string set

Update a web app's connection strings.

az webapp config connection-string delete

Delete a web app's connection strings.

az webapp config connection-string delete --setting-names
                                          [--ids]
                                          [--name]
                                          [--resource-group]
                                          [--slot]
                                          [--subscription]

Examples

Delete a web app's connection strings. (autogenerated)

az webapp config connection-string delete --name MyWebApp --resource-group MyResourceGroup --setting-names {setting-names}

Required Parameters

--setting-names

Space-separated connection-string names.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>. If --ids is provided this should NOT be specified.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--slot -s

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

--subscription

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

az webapp config connection-string list

Get a web app's connection strings.

az webapp config connection-string list --name
                                        --resource-group
                                        [--query-examples]
                                        [--slot]
                                        [--subscription]

Examples

Get a web app's connection strings. (autogenerated)

az webapp config connection-string list --name MyWebapp --resource-group MyResourceGroup

Required Parameters

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--slot -s

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

--subscription

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

az webapp config connection-string set

Update a web app's connection strings.

az webapp config connection-string set --connection-string-type {ApiHub, Custom, DocDb, EventHub, MySql, NotificationHub, PostgreSQL, RedisCache, SQLAzure, SQLServer, ServiceBus}
                                       [--ids]
                                       [--name]
                                       [--resource-group]
                                       [--settings]
                                       [--slot]
                                       [--slot-settings]
                                       [--subscription]

Examples

Add a mysql connection string.

az webapp config connection-string set -g MyResourceGroup -n MyUniqueApp -t mysql \
    --settings mysql1='Server=myServer;Database=myDB;Uid=myUser;Pwd=myPwd;'

Required Parameters

--connection-string-type -t

Connection string type.

accepted values: ApiHub, Custom, DocDb, EventHub, MySql, NotificationHub, PostgreSQL, RedisCache, SQLAzure, SQLServer, ServiceBus

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the web app. You can configure the default using az configure --defaults web=<name>. If --ids is provided this should NOT be specified.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--settings

Space-separated connection-string in a format of <name>=<value>.

--slot -s

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

--slot-settings

Space-separated slot connection-string in a format of either <name>=<value> or @<json_file>.

--subscription

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