az network application-gateway
Manage application-level routing and load balancing services.
To learn more about Application Gateway, visit https://docs.microsoft.com/azure/application-gateway/application-gateway-create-gateway-cli.
Commands
az network application-gateway create
Create an application gateway.
az network application-gateway create --name
--resource-group
[--capacity]
[--cert-file]
[--cert-password]
[--connection-draining-timeout]
[--custom-error-pages]
[--enable-private-link]
[--frontend-port]
[--http-settings-cookie-based-affinity {Disabled, Enabled}]
[--http-settings-port]
[--http-settings-protocol {Http, Https}]
[--http2 {Disabled, Enabled}]
[--identity]
[--key-vault-secret-id]
[--location]
[--max-capacity]
[--min-capacity]
[--no-wait]
[--private-ip-address]
[--private-link-ip-address]
[--private-link-primary {false, true}]
[--private-link-subnet]
[--private-link-subnet-prefix]
[--public-ip-address]
[--public-ip-address-allocation]
[--routing-rule-type {Basic, PathBasedRouting}]
[--servers]
[--sku {Standard_Large, Standard_Medium, Standard_Small, Standard_v2, WAF_Large, WAF_Medium, WAF_v2}]
[--subnet]
[--subnet-address-prefix]
[--subscription]
[--tags]
[--validate]
[--vnet-address-prefix]
[--vnet-name]
[--waf-policy]
[--zones {1, 2, 3}]
Examples
Create an application gateway with VMs as backend servers.
az network application-gateway create -g MyResourceGroup -n MyAppGateway --capacity 2 --sku Standard_Medium \
--vnet-name MyVNet --subnet MySubnet --http-settings-cookie-based-affinity Enabled \
--public-ip-address MyAppGatewayPublicIp --servers 10.0.0.4 10.0.0.5
Create an application gateway. (autogenerated)
az network application-gateway create --capacity 2 --frontend-port MyFrontendPort --http-settings-cookie-based-affinity Enabled --http-settings-port 80 --http-settings-protocol Http --location westus2 --name MyAppGateway --public-ip-address MyAppGatewayPublicIp --resource-group MyResourceGroup --sku Standard_Small --subnet MySubnet --vnet-name MyVNet
Required Parameters
Name of the application gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The number of instances to use with the application gateway.
The path to the PFX certificate file.
The certificate password.
The time in seconds after a backend server is removed during which on open connection remains active. Range: 0 (disabled) to 3600.
Space-separated list of custom error pages in STATUS_CODE=URL
format.
Enable Private Link feature for this application gateway. If both public IP and private IP are enbaled, taking effect only in public frontend IP.
The front end port number.
Enable or disable HTTP settings cookie-based affinity.
The HTTP settings port.
The HTTP settings protocol.
Use HTTP2 for the application gateway.
Name or ID of the ManagedIdentity Resource.
Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in Azure KeyVault. You need enable soft delete for keyvault to use this feature.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Upper bound on the number of application gateway instances.
Lower bound on the number of application gateway instances.
Do not wait for the long-running operation to finish.
Static private IP address to use.
The static private IP address of a subnet for Private Link. If omitting, a dynamic one will be created.
Whether the IP configuration is primary or not.
The name of the subnet within the same vnet of an application gateway.
The CIDR prefix to use when creating a new subnet.
Name or ID of a public IP address. Uses existing resource or creates new if specified, or none if omitted.
The kind of IP allocation to use when creating a new public IP.
The request routing rule type.
Space-separated list of IP addresses or DNS names corresponding to backend servers.
The name of the SKU.
Name or ID of the subnet. Will create resource if it does not exist. If name specified, also specify --vnet-name. If you want to use an existing subnet in other resource group or subscription, please provide the ID instead of the name of the subnet.
The CIDR prefix to use when creating a new subnet.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Generate and validate the ARM template without creating any resources.
The CIDR prefix to use when creating a new VNet.
The virtual network (VNet) name.
Name or ID of a web application firewall (WAF) policy.
Space-separated list of availability zones into which to provision the resource.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway delete
Delete an application gateway.
az network application-gateway delete [--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Delete an application gateway.
az network application-gateway delete -g MyResourceGroup -n MyAppGateway
Optional Parameters
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 of the application gateway.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway list
List application gateways.
az network application-gateway list [--query-examples]
[--resource-group]
[--subscription]
Examples
List application gateways.
az network application-gateway list -g MyResourceGroup
Optional Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway show
Get the details of an application gateway.
az network application-gateway show [--ids]
[--name]
[--query-examples]
[--resource-group]
[--subscription]
Examples
Get the details of an application gateway.
az network application-gateway show -g MyResourceGroup -n MyAppGateway
Optional Parameters
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 of the application gateway.
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway show-backend-health
Get information on the backend health of an application gateway.
az network application-gateway show-backend-health [--expand]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Show backend health of an application gateway.
az network application-gateway show-backend-health -g MyResourceGroup -n MyAppGateway
Optional Parameters
Expands BackendAddressPool and BackendHttpSettings referenced in backend health.
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 of the application gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway start
Start an application gateway.
az network application-gateway start [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Start an application gateway.
az network application-gateway start -g MyResourceGroup -n MyAppGateway
Optional Parameters
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 of the application gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway stop
Stop an application gateway.
az network application-gateway stop [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Stop an application gateway.
az network application-gateway stop -g MyResourceGroup -n MyAppGateway
Optional Parameters
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 of the application gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway update
Update an application gateway.
az network application-gateway update [--add]
[--capacity]
[--custom-error-pages]
[--force-string]
[--http2 {Disabled, Enabled}]
[--ids]
[--max-capacity]
[--min-capacity]
[--name]
[--no-wait]
[--remove]
[--resource-group]
[--set]
[--sku {Standard_Large, Standard_Medium, Standard_Small, Standard_v2, WAF_Large, WAF_Medium, WAF_v2}]
[--subscription]
[--tags]
Examples
Update an application gateway. (autogenerated)
az network application-gateway update --name MyApplicationGateway --resource-group MyResourceGroup --set useRemoteGateways=true
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
The number of instances to use with the application gateway.
Space-separated list of custom error pages in STATUS_CODE=URL
format.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Use HTTP2 for the application gateway.
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.
Upper bound on the number of application gateway instances.
Lower bound on the number of application gateway instances.
Name of the application gateway.
Do not wait for the long-running operation to finish.
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
The name of the SKU.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
az network application-gateway wait
Place the CLI in a waiting state until a condition of the application gateway is met.
az network application-gateway wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Examples
Place the CLI in a waiting state until the application gateway is created.
az network application-gateway wait -g MyResourceGroup -n MyAppGateway --created
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
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.
Polling interval in seconds.
Name of the application gateway.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.