az network application-gateway

Manage application-level routing and load balancing services.

To learn more about Application Gateway, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-create-gateway-cli.

Commands

az network application-gateway address-pool Manage address pools of an application gateway.
az network application-gateway address-pool create Create an address pool.
az network application-gateway address-pool delete Delete an address pool.
az network application-gateway address-pool list List address pools.
az network application-gateway address-pool show Get the details of an address pool.
az network application-gateway address-pool update Update an address pool.
az network application-gateway auth-cert Manage authorization certificates of an application gateway.
az network application-gateway auth-cert create Create an authorization certificate.
az network application-gateway auth-cert delete Delete an authorization certificate.
az network application-gateway auth-cert list List authorization certificates.
az network application-gateway auth-cert show Show an authorization certificate.
az network application-gateway auth-cert update Update an authorization certificate.
az network application-gateway create Create an application gateway.
az network application-gateway delete Delete an application gateway.
az network application-gateway frontend-ip Manage frontend IP addresses of an application gateway.
az network application-gateway frontend-ip create Create a frontend IP address.
az network application-gateway frontend-ip delete Delete a frontend IP address.
az network application-gateway frontend-ip list List frontend IP addresses.
az network application-gateway frontend-ip show Get the details of a frontend IP address.
az network application-gateway frontend-ip update Update a frontend IP address.
az network application-gateway frontend-port Manage frontend ports of an application gateway.
az network application-gateway frontend-port create Create a frontend port.
az network application-gateway frontend-port delete Delete a frontend port.
az network application-gateway frontend-port list List frontend ports.
az network application-gateway frontend-port show Get the details of a frontend port.
az network application-gateway frontend-port update Update a frontend port.
az network application-gateway http-listener Manage HTTP listeners of an application gateway.
az network application-gateway http-listener create Create an HTTP listener.
az network application-gateway http-listener delete Delete an HTTP listener.
az network application-gateway http-listener list List HTTP listeners.
az network application-gateway http-listener show Get the details of an HTTP listener.
az network application-gateway http-listener update Update an HTTP listener.
az network application-gateway http-settings Manage HTTP settings of an application gateway.
az network application-gateway http-settings create Create HTTP settings.
az network application-gateway http-settings delete Delete HTTP settings.
az network application-gateway http-settings list List HTTP settings.
az network application-gateway http-settings show Get the details of a gateway's HTTP settings.
az network application-gateway http-settings update Update HTTP settings.
az network application-gateway list List application gateways.
az network application-gateway probe Manage probes to gather and evaluate information on a gateway.
az network application-gateway probe create Create a probe.
az network application-gateway probe delete Delete a probe.
az network application-gateway probe list List probes.
az network application-gateway probe show Get the details of a probe.
az network application-gateway probe update Update a probe.
az network application-gateway redirect-config Manage redirect configurations.
az network application-gateway redirect-config create Create a redirect configuration.
az network application-gateway redirect-config delete Delete a redirect configuration.
az network application-gateway redirect-config list List redirect configurations.
az network application-gateway redirect-config show Get the details of a redirect configuration.
az network application-gateway redirect-config update Update a redirect configuration.
az network application-gateway root-cert Manage trusted root certificates of an application gateway.
az network application-gateway root-cert create Upload a trusted root certificate.
az network application-gateway root-cert delete Delete a trusted root certificate.
az network application-gateway root-cert list List trusted root certificates.
az network application-gateway root-cert show Get the details of a trusted root certificate.
az network application-gateway root-cert update Update a trusted root certificate.
az network application-gateway rule Evaluate probe information and define routing rules.
az network application-gateway rule create Create a rule.
az network application-gateway rule delete Delete a rule.
az network application-gateway rule list List rules.
az network application-gateway rule show Get the details of a rule.
az network application-gateway rule update Update a rule.
az network application-gateway show Get the details of an application gateway.
az network application-gateway show-backend-health Get information on the backend health of an application gateway.
az network application-gateway ssl-cert Manage SSL certificates of an application gateway.
az network application-gateway ssl-cert create Upload an SSL certificate.
az network application-gateway ssl-cert delete Delete an SSL certificate.
az network application-gateway ssl-cert list List SSL certificates.
az network application-gateway ssl-cert show Get the details of an SSL certificate.
az network application-gateway ssl-cert update Update an SSL certificate.
az network application-gateway ssl-policy Manage the SSL policy of an application gateway.
az network application-gateway ssl-policy list-options Lists available SSL options for configuring SSL policy.
az network application-gateway ssl-policy predefined Get information on predefined SSL policies.
az network application-gateway ssl-policy predefined list Lists all SSL predefined policies for configuring SSL policy.
az network application-gateway ssl-policy predefined show Gets SSL predefined policy with the specified policy name.
az network application-gateway ssl-policy set Update or clear SSL policy settings.
az network application-gateway ssl-policy show Get the details of gateway's SSL policy settings.
az network application-gateway start Start an application gateway.
az network application-gateway stop Stop an application gateway.
az network application-gateway update Update an application gateway.
az network application-gateway url-path-map Manage URL path maps of an application gateway.
az network application-gateway url-path-map create Create a URL path map.
az network application-gateway url-path-map delete Delete a URL path map.
az network application-gateway url-path-map list List URL path maps.
az network application-gateway url-path-map rule Manage the rules of a URL path map.
az network application-gateway url-path-map rule create Create a rule for a URL path map.
az network application-gateway url-path-map rule delete Delete a rule of a URL path map.
az network application-gateway url-path-map show Get the details of a URL path map.
az network application-gateway url-path-map update Update a URL path map.
az network application-gateway waf-config Configure the settings of a web application firewall.
az network application-gateway waf-config list-rule-sets Get information on available WAF rule sets, rule groups, and rule IDs.
az network application-gateway waf-config set Update the firewall configuration of a web application.
az network application-gateway waf-config show Get the firewall configuration of a web application.
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 create

Create an application gateway.

az network application-gateway create --name
--resource-group
[--capacity]
[--cert-file]
[--cert-password]
[--connection-draining-timeout]
[--custom-error-pages]
[--frontend-port]
[--http-settings-cookie-based-affinity {Disabled, Enabled}]
[--http-settings-port]
[--http-settings-protocol {Http, Https}]
[--http2 {Disabled, Enabled}]
[--location]
[--min-capacity]
[--no-wait]
[--private-ip-address]
[--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]
[--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

Required Parameters

--name -n

The name of the application gateway.

--resource-group -g

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

Optional Parameters

--capacity

The number of instances to use with the application gateway.

default value: 2
--cert-file

The path to the PFX certificate file.

--cert-password

The certificate password.

--connection-draining-timeout

The time in seconds after a backend server is removed during which on open connection remains active. Range: 0 (disabled) to 3600.

--custom-error-pages

Space-separated list of custom error pages in STATUS_CODE=URL format.

--frontend-port

The front end port number.

--http-settings-cookie-based-affinity

Enable or disable HTTP settings cookie-based affinity.

accepted values: Disabled, Enabled
default value: disabled
--http-settings-port

The HTTP settings port.

default value: 80
--http-settings-protocol

The HTTP settings protocol.

accepted values: Http, Https
default value: Http
--http2

Use HTTP2 for the application gateway.

accepted values: Disabled, Enabled
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--min-capacity

Lower bound on the number of application gateway instances.

--no-wait

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

--private-ip-address

Static private IP address to use.

--public-ip-address

Name or ID of a public IP address. Uses existing resource or creates new if specified, or none if omitted.

--public-ip-address-allocation

The kind of IP allocation to use when creating a new public IP.

default value: Dynamic
--routing-rule-type

The request routing rule type.

accepted values: Basic, PathBasedRouting
default value: Basic
--servers

Space-separated list of IP addresses or DNS names corresponding to backend servers.

--sku

The name of the SKU.

accepted values: Standard_Large, Standard_Medium, Standard_Small, Standard_v2, WAF_Large, WAF_Medium, WAF_v2
default value: Standard_Medium
--subnet

Name or ID of the subnet. Will create resource if it does not exist. If name specified, also specify --vnet-name.

default value: default
--subnet-address-prefix

The CIDR prefix to use when creating a new subnet.

default value: 10.0.0.0/24
--subscription

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

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

--validate

Generate and validate the ARM template without creating any resources.

--vnet-address-prefix

The CIDR prefix to use when creating a new VNet.

default value: 10.0.0.0/16
--vnet-name

The virtual network (VNet) name.

--zones -z

Space-separated list of availability zones into which to provision the resource.

accepted values: 1, 2, 3

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

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the application gateway.

--no-wait

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

--resource-group -g

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

--subscription

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

az network application-gateway list

List application gateways.

az network application-gateway list [--resource-group]
[--subscription]

Examples

List application gateways.

az network application-gateway list -g MyResourceGroup

Optional Parameters

--resource-group -g

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

--subscription

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

az network application-gateway show

Get the details of an application gateway.

az network application-gateway show [--ids]
[--name]
[--resource-group]
[--subscription]

Examples

Get the details of an application gateway.

az network application-gateway show -g MyResourceGroup -n MyAppGateway

Optional Parameters

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the application gateway.

--resource-group -g

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

--subscription

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

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

--expand

Expands BackendAddressPool and BackendHttpSettings referenced in backend health.

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the application gateway.

--resource-group -g

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

--subscription

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

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

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the application gateway.

--resource-group -g

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

--subscription

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

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

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--name -n

The name of the application gateway.

--resource-group -g

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

--subscription

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

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]
[--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]

Optional Parameters

--add

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>.

--capacity

The number of instances to use with the application gateway.

--custom-error-pages

Space-separated list of custom error pages in STATUS_CODE=URL format.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--http2

Use HTTP2 for the application gateway.

accepted values: Disabled, Enabled
--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--min-capacity

Lower bound on the number of application gateway instances.

--name -n

The name of the application gateway.

--no-wait

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

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

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

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--sku

The name of the SKU.

accepted values: Standard_Large, Standard_Medium, Standard_Small, Standard_v2, WAF_Large, WAF_Medium, WAF_v2
--subscription

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

--tags

Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.

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

--created

Wait until created with 'provisioningState' at 'Succeeded'.

--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

--ids

One or more resource IDs (space-delimited). If provided, no other 'Resource Id' arguments should be specified.

--interval

Polling interval in seconds.

default value: 30
--name -n

The name of the application gateway.

--resource-group -g

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

--subscription

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

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.