Del via


az group deployment

This command group has been deprecated and will be removed in a future release. Use 'deployment group' instead.

Manage Azure Resource Manager deployments.

Commands

Name Description Type Status
az group deployment cancel

Cancels a currently running template deployment.

Core Deprecated
az group deployment create

Start a deployment.

Core Deprecated
az group deployment delete

Deletes a deployment from the deployment history.

Core Deprecated
az group deployment export

Export the template used for a deployment.

Core Deprecated
az group deployment list

Get all the deployments for a resource group.

Core Deprecated
az group deployment operation

Manage deployment operations.

Core Deprecated
az group deployment operation list

Gets all deployments operations for a deployment.

Core Deprecated
az group deployment operation show

Get a deployment's operation.

Core Deprecated
az group deployment show

Gets a deployment.

Core Deprecated
az group deployment validate

Validate whether a template is syntactically correct.

Core Deprecated
az group deployment wait

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

Core Deprecated

az group deployment cancel

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

Cancels a currently running template deployment.

You can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running template deployment and leaves the resource group partially deployed.

az group deployment cancel --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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment create

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

Start a deployment.

az group deployment create --resource-group
                           [--aux-subs]
                           [--aux-tenants]
                           [--handle-extended-json-format]
                           [--mode {Complete, Incremental}]
                           [--name]
                           [--no-prompt {false, true}]
                           [--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 local parameter file, a remote parameter file, and selectively overriding key/value pairs.

az group deployment create -g MyResourceGroup --template-file azuredeploy.json \
    --parameters @params.json --parameters https://mysite/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

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

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

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

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

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.

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

A path to a template file or Bicep file in the file system.

--template-uri -u

A uri to a remote template file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment delete

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

Deletes a deployment from the deployment history.

A template deployment that is currently running cannot be deleted. Deleting a template deployment removes the associated deployment operations. Deleting a template deployment does not affect the state of the resource group. This is an asynchronous operation that returns a status of 202 until the template deployment is successfully deleted. The Location response header contains the URI that is used to obtain the status of the process. While the process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the Location header returns an error-level status code.

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment export

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

Export the template used for a deployment.

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

Examples

Export the template used for a deployment. (autogenerated)

az group deployment export --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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment list

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

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}'. Default value is None.

--top

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment show

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment validate

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

Validate whether a template is syntactically correct.

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

Examples

Validate whether a template is syntactically correct. (autogenerated)

az group deployment validate --parameters "{ \"location\": { \"value\": \"westus\" } }" \
    --resource-group MyResourceGroup --template-file storage.json

Required Parameters

--resource-group -g

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

Optional Parameters

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

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

Accepted values: Complete, Incremental
Default value: Incremental
--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.

Accepted values: false, true
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.

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

A path to a template file or Bicep file in the file system.

--template-uri -u

A uri to a remote template file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az group deployment wait

Deprecated

This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.

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]

Examples

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

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

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

az group deployment 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

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

Wait until the resource exists.

Default value: False
--interval

Polling interval in seconds.

Default value: 30
--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.