az nginx deployment configuration

Note

This reference is part of the nginx extension for the Azure CLI (version 2.40.0 or higher). The extension will automatically install the first time you run an az nginx deployment configuration command. Learn more about extensions.

Manage NGINX configuration resources.

Commands

az nginx deployment configuration create

Create a configuration for an NGINX deployment.

az nginx deployment configuration delete

Delete an Nginx configuration.

az nginx deployment configuration list

List all configurations under the specified deployment and resource group.

az nginx deployment configuration show

Get the properties of a specific Nginx configuration.

az nginx deployment configuration update

Update an Nginx configuration.

az nginx deployment configuration wait

Place the CLI in a waiting state until a condition is met.

az nginx deployment configuration create

Create a configuration for an NGINX deployment.

az nginx deployment configuration create --configuration-name
                                         --deployment-name
                                         --resource-group
                                         [--files]
                                         [--location]
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--package]
                                         [--protected-files]
                                         [--provisioning-state {Accepted, Canceled, Creating, Deleted, Deleting, Failed, NotSpecified, Succeeded, Updating}]
                                         [--root-file]
                                         [--tags]

Examples

Single file Configuration Create

az nginx deployment configuration create --name default --deployment-name myDeployment --resource-group myResourceGroup --root-file /etc/nginx/nginx.conf --files "[{content:'aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBwcm94eV9zZXRfaGVhZGVyIEhvc3QgJGhvc3Q7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1SZWFsLUlQICRyZW1vdGVfYWRkcjsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVByb3h5LUFwcCBhcHA7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgR2l0aHViLVJ1bi1JZCAwMDAwMDA7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcmluZyBvbjsKICAgICAgICAgICAgcHJveHlfYnVmZmVyX3NpemUgNGs7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcnMgOCA4azsKICAgICAgICAgICAgcHJveHlfcmVhZF90aW1lb3V0IDYwczsKICAgICAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vYXBwOwogICAgICAgICAgICBoZWFsdGhfY2hlY2s7CiAgICAgICAgfQogICAgICAgIAogICAgfQp9',virtual-path:'/etc/nginx/nginx.conf'}]"

Multi-file Configuration Create

az nginx deployment configuration create --name default --deployment-name myDeployment --resource-group myResourceGroup --root-file /etc/nginx/nginx.conf --files "[{'content':'aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBpbmNsdWRlIC9ldGMvbmdpbngvY29uZi5kL3Byb3h5LmNvbmY7CiAgICAgICAgICAgIHByb3h5X3Bhc3MgaHR0cDovL2FwcDsKICAgICAgICAgICAgaGVhbHRoX2NoZWNrOwogICAgICAgIH0KICAgICAgICAKICAgIH0KfQ==','virtual-path':'/etc/nginx/nginx.conf'},{'content':'cHJveHlfc2V0X2hlYWRlciBIb3N0ICRob3N0Owpwcm94eV9zZXRfaGVhZGVyIFgtUmVhbC1JUCAkcmVtb3RlX2FkZHI7CnByb3h5X3NldF9oZWFkZXIgWC1Qcm94eS1BcHAgYXBwOwpwcm94eV9zZXRfaGVhZGVyIEdpdGh1Yi1SdW4tSWQgMDAwMDAwOwpwcm94eV9idWZmZXJpbmcgb247CnByb3h5X2J1ZmZlcl9zaXplIDRrOwpwcm94eV9idWZmZXJzIDggOGs7CnByb3h5X3JlYWRfdGltZW91dCA2MHM7','virtual-path':'/etc/nginx/conf.d/proxy.conf'}]"

Required Parameters

--configuration-name --name -n

The name of configuration, only 'default' is supported value due to the singleton of Nginx conf.

--deployment-name

The name of targeted Nginx deployment.

--resource-group -g

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

Optional Parameters

--files

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

--location -l

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

--no-wait

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

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--package

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

--protected-files

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

--provisioning-state

State of the configuration deployment.

accepted values: Accepted, Canceled, Creating, Deleted, Deleting, Failed, NotSpecified, Succeeded, Updating
--root-file

Aligns with your Nginx configuration structure.

--tags

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

az nginx deployment configuration delete

Delete an Nginx configuration.

az nginx deployment configuration delete [--configuration-name]
                                         [--deployment-name]
                                         [--ids]
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--resource-group]
                                         [--subscription]
                                         [--yes]

Examples

Configuration Delete

az nginx deployment configuration delete --name default --deployment-name myDeployment --resource-group myResourceGroup

Optional Parameters

--configuration-name --name -n

The name of configuration, only 'default' is supported value due to the singleton of Nginx conf.

--deployment-name

The name of targeted Nginx deployment.

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

--no-wait

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

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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.

--yes -y

Do not prompt for confirmation.

default value: False

az nginx deployment configuration list

List all configurations under the specified deployment and resource group.

az nginx deployment configuration list --deployment-name
                                       --resource-group

Examples

Configuration ListByDeployment

az nginx deployment configuration list --deployment-name myDeployment --resource-group myResourceGroup

Required Parameters

--deployment-name

The name of targeted Nginx deployment.

--resource-group -g

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

az nginx deployment configuration show

Get the properties of a specific Nginx configuration.

az nginx deployment configuration show [--configuration-name]
                                       [--deployment-name]
                                       [--ids]
                                       [--resource-group]
                                       [--subscription]

Examples

Configuration Get

az nginx deployment configuration show --name default --deployment-name myDeployment --resource-group myResourceGroup

Optional Parameters

--configuration-name --name -n

The name of configuration, only 'default' is supported value due to the singleton of Nginx conf.

--deployment-name

The name of targeted Nginx deployment.

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

--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 nginx deployment configuration update

Update an Nginx configuration.

az nginx deployment configuration update [--add]
                                         [--configuration-name]
                                         [--deployment-name]
                                         [--files]
                                         [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--ids]
                                         [--location]
                                         [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                         [--package]
                                         [--protected-files]
                                         [--provisioning-state {Accepted, Canceled, Creating, Deleted, Deleting, Failed, NotSpecified, Succeeded, Updating}]
                                         [--remove]
                                         [--resource-group]
                                         [--root-file]
                                         [--set]
                                         [--subscription]
                                         [--tags]

Examples

Update content of the first file in a configuration

az nginx deployment configuration update --name default --deployment-name myDeployment --resource-group myResourceGroup --files [0].content="aHR0cCB7CiAgICB1cHN0cmVhbSBhcHAgewogICAgICAgIHpvbmUgYXBwIDY0azsKICAgICAgICBsZWFzdF9jb25uOwogICAgICAgIHNlcnZlciAxMC4wLjEuNDo4MDAwOwogICAgfQoKICAgIHNlcnZlciB7CiAgICAgICAgbGlzdGVuIDgwOwogICAgICAgIHNlcnZlcl9uYW1lICouZXhhbXBsZS5jb207CgogICAgICAgIGxvY2F0aW9uIC8gewogICAgICAgICAgICBwcm94eV9zZXRfaGVhZGVyIEhvc3QgJGhvc3Q7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgWC1SZWFsLUlQICRyZW1vdGVfYWRkcjsKICAgICAgICAgICAgcHJveHlfc2V0X2hlYWRlciBYLVByb3h5LUFwcCBhcHA7CiAgICAgICAgICAgIHByb3h5X3NldF9oZWFkZXIgR2l0aHViLVJ1bi1JZCAwMDAwMDA7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcmluZyBvbjsKICAgICAgICAgICAgcHJveHlfYnVmZmVyX3NpemUgNGs7CiAgICAgICAgICAgIHByb3h5X2J1ZmZlcnMgOCA4azsKICAgICAgICAgICAgcHJveHlfcmVhZF90aW1lb3V0IDYwczsKICAgICAgICAgICAgcHJveHlfcGFzcyBodHRwOi8vYXBwOwogICAgICAgICAgICBoZWFsdGhfY2hlY2s7CiAgICAgICAgfQogICAgICAgIAogICAgfQp9"

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

--configuration-name --name -n

The name of configuration, only 'default' is supported value due to the singleton of Nginx conf.

--deployment-name

The name of targeted Nginx deployment.

--files

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

--force-string

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

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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.

--location -l

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

--no-wait

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

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--package

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

--protected-files

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

--provisioning-state

State of the configuration deployment.

accepted values: Accepted, Canceled, Creating, Deleted, Deleting, Failed, NotSpecified, Succeeded, Updating
--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>.

--root-file

Aligns with your Nginx configuration structure.

--set

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

--subscription

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

--tags

Support shorthand-syntax, json-file and yaml-file. Try ?? to show more.

az nginx deployment configuration wait

Place the CLI in a waiting state until a condition is met.

az nginx deployment configuration wait [--configuration-name]
                                       [--created]
                                       [--custom]
                                       [--deleted]
                                       [--deployment-name]
                                       [--exists]
                                       [--ids]
                                       [--interval]
                                       [--resource-group]
                                       [--subscription]
                                       [--timeout]
                                       [--updated]

Optional Parameters

--configuration-name --name -n

The name of configuration, only 'default' is supported value due to the singleton of Nginx conf.

--created

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

default value: False
--custom

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

--deleted

Wait until deleted.

default value: False
--deployment-name

The name of targeted Nginx deployment.

--exists

Wait until the resource exists.

default value: False
--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.

--interval

Polling interval in seconds.

default value: 30
--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'.

default value: False