az webapp config egress connection
Command group 'webapp config egress' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage named connections in a web app's egress configuration.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az webapp config egress connection add |
Add or replace a named egress connection. |
Core | Preview |
| az webapp config egress connection remove |
Remove a named egress connection. |
Core | Preview |
| az webapp config egress connection show |
Show a named egress connection. |
Core | Preview |
az webapp config egress connection add
Command group 'webapp config egress connection' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Add or replace a named egress connection.
Preserve other connections and the enabled state. An existing connection with the same name is replaced, regardless of casing. Only the supplied connection is returned. If the enabled state is missing, initialize it to Disabled. Use "az webapp config egress set --enabled true" to enable virtual connections after adding a connection. Setting arguments accept existing setting names, not their values. The platform validates protocol and authentication combinations. Managed identities must already be assigned to the app.
az webapp config egress connection add --auth {Credential, ManagedIdentity}
--connection-name
--protocol {Http, Postgres, Redis, Tds}
[--acquire-policy-token]
[--change-reference]
[--credential-format]
[--credential-header]
[--credential-setting]
[--host-setting]
[--identity-resource-id]
[--identity-scope]
[--ids]
[--name]
[--resource-group]
[--slot]
[--source {AppSettings, ConnectionStrings}]
[--subscription]
[--username-setting]
[--value-setting]
Examples
Add a SQL connection that uses managed identity and an existing connection string.
az webapp config egress connection add --resource-group MyRG --name MyApp --connection-name orders-db --source ConnectionStrings --protocol Tds --auth ManagedIdentity --value-setting OrdersDb
Add a PostgreSQL connection composed of separate app settings.
az webapp config egress connection add --resource-group MyRG --name MyApp --connection-name postgres --source AppSettings --protocol Postgres --auth Credential --host-setting PG_HOST --username-setting PG_USER --credential-setting PG_PASSWORD
Use a user-assigned identity with a custom token scope for a deployment slot.
az webapp config egress connection add --resource-group MyRG --name MyApp --slot staging --connection-name api --protocol Http --auth ManagedIdentity --host-setting API_HOST --identity-resource-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyIdentity --identity-scope https://storage.azure.com/.default
Inject an HTTP credential using a header format.
az webapp config egress connection add --resource-group MyRG --name MyApp --connection-name api --protocol Http --auth Credential --host-setting API_HOST --credential-setting API_TOKEN --credential-header Authorization --credential-format "Bearer {value}"
Required Parameters
Backend authentication strategy.
| Property | Value |
|---|---|
| Accepted values: | Credential, ManagedIdentity |
Name of the egress connection. Names are case-insensitive.
Backend protocol.
| Property | Value |
|---|---|
| Accepted values: | Http, Postgres, Redis, Tds |
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 |
HTTP credential header format, for example "Bearer {value}". Requires --credential-header.
HTTP header used to inject a standalone credential, for example Authorization.
Name of the setting containing the credential, not the credential value.
Name of the setting containing the backend host, not the host value.
Resource ID of a user-assigned identity already assigned to the app. By default, use the system-assigned identity.
Scope used to acquire a managed identity token for the backend connection.
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. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
| 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.
Source of the referenced settings. Defaults to AppSettings.
| Property | Value |
|---|---|
| Default value: | AppSettings |
| Accepted values: | AppSettings, ConnectionStrings |
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 |
Name of the setting containing the username, not the username value.
Name of the setting containing the complete connection string or URL.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az webapp config egress connection remove
Command group 'webapp config egress connection' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Remove a named egress connection.
Preserve other connections and the enabled state unless the last connection is removed. Removing the last connection clears the entire egress configuration, including its enabled state. A warning is shown and confirmation is required only when removing the last connection. Use --yes or -y to skip confirmation for automation; the warning is still shown.
az webapp config egress connection remove --connection-name
[--acquire-policy-token]
[--change-reference]
[--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
[--yes]
Examples
Remove the orders database connection.
az webapp config egress connection remove --resource-group MyRG --name MyApp --connection-name orders-db
Remove a connection from a deployment slot.
az webapp config egress connection remove --resource-group MyRG --name MyApp --slot staging --connection-name cache
Remove the last connection without prompting for confirmation.
az webapp config egress connection remove --resource-group MyRG --name MyApp --connection-name cache --yes
Required Parameters
Name of the egress connection. Names are case-insensitive.
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. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
| 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 |
Do not prompt for confirmation when removing the last connection.
| Property | Value |
|---|---|
| Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az webapp config egress connection show
Command group 'webapp config egress connection' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show a named egress connection.
az webapp config egress connection show --connection-name
[--ids]
[--name]
[--resource-group]
[--slot]
[--subscription]
Examples
Show the orders database connection.
az webapp config egress connection show --resource-group MyRG --name MyApp --connection-name orders-db
Show the setting roles for a connection in a deployment slot.
az webapp config egress connection show --resource-group MyRG --name MyApp --slot staging --connection-name cache --query settings
Required Parameters
Name of the egress connection. Names are case-insensitive.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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. If left unspecified, a name will be randomly generated. You can configure the default using az configure --defaults web=<name>.
| 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 |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |