az group deployment

Manage Azure Resource Manager deployments.

Commands

az group deployment create Start a deployment.
az group deployment delete Deletes a deployment from the deployment history.
az group deployment export Export the template used for a deployment.
az group deployment list Get all the deployments for a resource group.
az group deployment operation Manage deployment operations.
az group deployment operation list Gets all deployments operations for a deployment.
az group deployment operation show Get a deployment's operation.
az group deployment show Gets a deployment.
az group deployment validate Validate whether a template is syntactically correct.
az group deployment wait Place the CLI in a waiting state until a deployment condition is met.

az group deployment create

Start a deployment.

az group deployment create --resource-group
[--mode {Complete, Incremental}]
[--name]
[--no-wait]
[--parameters]
[--rollback-on-error]
[--template-file]
[--template-uri]

Examples

Create a deployment from a remote template file, using parameters from a local JSON file.

az group deployment create -g MyResourceGroup --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json

Create a deployment from a local template file, using parameters from a JSON string.

az group deployment create -g MyResourceGroup --template-file azuredeploy.json --parameters '{
                                "location": {
                                    "value": "westus"
                                }
                            }'

Create a deployment from a local template, using a parameter file and selectively overriding key/value pairs.

az group deployment create -g MyResourceGroup --template-file azuredeploy.json \
                            --parameters @params.json --parameters MyValue=This MyArray=@array.json

Required Parameters

--resource-group -g

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

Optional Parameters

--mode

Incremental (only add resources to resource group) or Complete (remove extra resources from resource group).

accepted values: Complete, Incremental
default value: Incremental
--name -n

The deployment name. Default to template file base name.

--no-wait

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

--parameters

Supply deployment parameter values.

--rollback-on-error

The name of a deployment to roll back to on error, or use as a flag to roll back to the last successful deployment.

--template-file

A template file path in the file system.

--template-uri

A uri to a remote template file.

az group deployment delete

Deletes a deployment from the deployment history.

az group deployment delete --name
--resource-group
[--no-wait]

Required Parameters

--name -n

The deployment name.

--resource-group -g

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

Optional Parameters

--no-wait

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

az group deployment export

Export the template used for a deployment.

az group deployment export --name
--resource-group

Required Parameters

--name -n

The deployment name.

--resource-group -g

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

az group deployment list

Get all the deployments for a resource group.

az group deployment list --resource-group
[--filter]
[--top]

Required Parameters

--resource-group -g

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

Optional Parameters

--filter

The filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'.

--top

The number of results to get. If null is passed, returns all deployments.

az group deployment show

Gets a deployment.

az group deployment show --name
--resource-group

Required Parameters

--name -n

The deployment name.

--resource-group -g

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

az group deployment validate

Validate whether a template is syntactically correct.

az group deployment validate --resource-group
[--mode {Complete, Incremental}]
[--parameters]
[--rollback-on-error]
[--template-file]
[--template-uri]

Required Parameters

--resource-group -g

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

Optional Parameters

--mode

Incremental (only add resources to resource group) or Complete (remove extra resources from resource group).

accepted values: Complete, Incremental
default value: Incremental
--parameters

Supply deployment parameter values.

--rollback-on-error

The name of a deployment to roll back to on error, or use as a flag to roll back to the last successful deployment.

--template-file

A template file path in the file system.

--template-uri

A uri to a remote template file.

az group deployment wait

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

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

Required Parameters

--name -n

The deployment name.

--resource-group -g

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

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.

--interval

Polling interval in seconds.

default value: 30
--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.