az deployment group

Manage Azure Resource Manager template deployment at resource group.

Commands

Name Description Type Status
az deployment group cancel

Cancel a deployment at resource group.

Core GA
az deployment group create

Start a deployment at resource group.

Core GA
az deployment group delete

Delete a deployment at resource group.

Core GA
az deployment group export

Export the template used for a deployment.

Core GA
az deployment group list

List deployments at resource group.

Core GA
az deployment group show

Show a deployment at resource group.

Core GA
az deployment group validate

Validate whether a template is valid at resource group.

Core GA
az deployment group wait

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

Core GA

az deployment group cancel

Cancel a deployment at resource group.

az deployment group cancel --name
                           --resource-group

Examples

Cancel a deployment at resource group.

az deployment group cancel -g testrg -n deployment01

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group create

Start a deployment at resource group.

Please specify only one of --template-file FILE | --template-uri URI | --template-spec to input the ARM template.

az deployment group create --resource-group
                           [--aux-subs]
                           [--aux-tenants]
                           [--handle-extended-json-format]
                           [--mode {Complete, Incremental}]
                           [--name]
                           [--no-prompt {false, true}]
                           [--no-wait]
                           [--parameters]
                           [--query-string]
                           [--rollback-on-error]
                           [--template-file]
                           [--template-uri]

Examples

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

az deployment group create --resource-group testrg --name rollout01 \
    --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json

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

az deployment group create --resource-group testrg --name rollout01 \
    --template-file azuredeploy.json  \
    --parameters '{ \"policyName\": { \"value\": \"policy2\" } }'

Create a deployment at resource group from a local template file, using parameters from an array string.

az deployment group create --resource-group testgroup --template-file demotemplate.json --parameters exampleString='inline string' exampleArray='("value1", "value2")'

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

az deployment group create --resource-group testrg --name rollout01 \
    --template-file azuredeploy.json  --parameters @params.json \
    --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json

Create a deployment at resource group scope from a template-spec

az deployment group create --resource-group testrg --template-spec "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Resources/templateSpecs/myTemplateSpec/versions/1.0"

Create a deployment at resource group scope from a bicepparam parameter file

az deployment group create --resource-group testrg --parameters parameters.bicepparam

Create a deployment at resource group across tenants

az deployment group create --resource-group testrg --name rollout01 \
    --template-file azuredeploy.json --parameters @myparameters.json --aux-tenants auxiliary_tenant01 auxiliary_tenant02

Required Parameters

--resource-group -g

The resource group to create deployment at.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--aux-subs
Deprecated

Option '--aux-subs' has been deprecated and will be removed in a future release. Use '--aux-tenants' instead.

Auxiliary subscriptions which will be used during deployment across tenants.

--aux-tenants

Auxiliary tenants which will be used during deployment across tenants.

--handle-extended-json-format -j
Deprecated

Option '--handle-extended-json-format/-j' has been deprecated and will be removed in a future release.

Support to handle extended template content including multiline and comments in deployment.

--mode

The deployment mode.

Property Value
Default value: Incremental
Accepted values: Complete, Incremental
--name -n

The deployment name.

--no-prompt

The option to disable the prompt of missing parameters for ARM template. When the value is true, the prompt requiring users to provide missing parameter will be ignored. The default value is false.

Property Value
Default value: False
Accepted values: false, true
--no-wait

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

Property Value
Default value: False
--parameters -p

Supply deployment parameter values.

Parameters may be supplied from a file using the @{path} syntax, a JSON string, or as <KEY=VALUE> pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. Also note if you are providing a bicepparam file then you can use this argument only once.

--query-string -q

The query string (a SAS token) to be used with the template-uri in the case of linked templates.

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

The path to the template file or Bicep file.

--template-uri -u

The URI to the template file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group delete

Delete a deployment at resource group.

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

Examples

Delete a deployment at resource group.

az deployment group delete -g testrg -n deployment01

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

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

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group export

Export the template used for a deployment.

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

Examples

Export the template used for a deployment at resource group.

az deployment group export --resource-group testrg --name MyDeployment

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group list

List deployments at resource group.

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

Examples

List deployments at resource group.

az deployment group list -g testrg

Required Parameters

--resource-group -g

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--filter
Preview

Filter expression using OData notation. You can use --filter "provisioningState eq '{state}'" to filter provisioningState. To get more information, please visit https://docs.microsoft.com/rest/api/resources/deployments/listatsubscriptionscope#uri-parameters.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group show

Show a deployment at resource group.

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

Examples

Show a deployment at resource group.

az deployment group show -g testrg -n deployment01

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group validate

Validate whether a template is valid at resource group.

Please specify only one of --template-file FILE | --template-uri URI | --template-spec to input the ARM template.

az deployment group validate --resource-group
                             [--handle-extended-json-format]
                             [--mode {Complete, Incremental}]
                             [--name]
                             [--no-prompt {false, true}]
                             [--parameters]
                             [--query-string]
                             [--rollback-on-error]
                             [--template-file]
                             [--template-uri]

Examples

Validate whether a template is valid at resource group.

az deployment group validate --resource-group testrg --template-file {template-file}

Validate whether a template is valid at resource group. (autogenerated)

az deployment group validate --parameters MyValue=This MyArray=@array.json --resource-group testrg --template-file azuredeploy.json

Required Parameters

--resource-group -g

The resource group to create deployment at.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--handle-extended-json-format -j
Deprecated

Option '--handle-extended-json-format/-j' has been deprecated and will be removed in a future release.

Support to handle extended template content including multiline and comments in deployment.

--mode

The deployment mode.

Property Value
Default value: Incremental
Accepted values: Complete, Incremental
--name -n

The deployment name.

--no-prompt

The option to disable the prompt of missing parameters for ARM template. When the value is true, the prompt requiring users to provide missing parameter will be ignored. The default value is false.

Property Value
Default value: False
Accepted values: false, true
--parameters -p

Supply deployment parameter values.

Parameters may be supplied from a file using the @{path} syntax, a JSON string, or as <KEY=VALUE> pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax.

--query-string -q

The query string (a SAS token) to be used with the template-uri in the case of linked templates.

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

The path to the template file or Bicep file.

--template-uri -u

The URI to the template file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az deployment group wait

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

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

Examples

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

az deployment group wait --created --name MyDeployment --resource-group MyResourceGroup

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

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

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False