Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
az webapp config connection-string
Manage a web app's connection strings.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az webapp config connection-string delete |
Delete a web app's connection strings. |
Core | GA |
| az webapp config connection-string list |
Get a web app's connection strings. |
Core | GA |
| az webapp config connection-string set |
Update a web app's connection strings. |
Core | GA |
az webapp config connection-string delete
Delete a web app's connection strings.
Note that connection string values are now redacted in the result. Please use the az webapp config connection-string list command to view the values.
az webapp config connection-string delete --setting-names
[--acquire-policy-token]
[--change-reference]
[--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
Space-separated connection-string names.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
The name of the slot. Default to the productions slot if not specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
az webapp config connection-string list
Get a web app's connection strings.
az webapp config connection-string list --name
--resource-group
[--slot]
Examples
Get a web app's connection strings. (autogenerated)
az webapp config connection-string list --name MyWebapp --resource-group MyResourceGroup
Required Parameters
Name of the web app. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the slot. Default to the productions slot if not specified.
az webapp config connection-string set
Update a web app's connection strings.
Note that connection string values are now redacted in the result. Please use the az webapp config connection-string list command to view the values.
az webapp config connection-string set [--acquire-policy-token]
[--change-reference]
[--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;'
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Connection string type.
| Property | Value |
|---|---|
| Accepted values: | ApiHub, Custom, DocDb, EventHub, MySql, NotificationHub, PostgreSQL, RedisCache, SQLAzure, SQLServer, ServiceBus |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Space-separated connection-string in a format of <name>=<value>.
The name of the slot. Default to the productions slot if not specified.
Space-separated slot connection-string in a format of either <name>=<value> or @<json_file>.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Feedback
Was this page helpful?
