az deployment

Manage Azure Resource Manager template deployment at subscription scope.

Commands

az deployment cancel

Cancel a deployment at subscription scope.

az deployment create

Start a deployment at subscription scope.

az deployment delete

Delete a deployment at subscription scope.

az deployment export

Export the template used for a deployment.

az deployment group

Manage Azure Resource Manager template deployment at resource group.

az deployment group cancel

Cancel a deployment at resource group.

az deployment group create

Start a deployment at resource group.

az deployment group delete

Delete a deployment at resource group.

az deployment group export

Export the template used for a deployment.

az deployment group list

List deployments at resource group.

az deployment group show

Show a deployment at resource group.

az deployment group validate

Validate whether a template is valid at resource group.

az deployment group wait

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

az deployment group what-if

Execute a deployment What-If operation at resource group scope.

az deployment list

List deployments at subscription scope.

az deployment mg

Manage Azure Resource Manager template deployment at management group.

az deployment mg cancel

Cancel a deployment at management group.

az deployment mg create

Start a deployment at management group.

az deployment mg delete

Delete a deployment at management group.

az deployment mg export

Export the template used for a deployment.

az deployment mg list

List deployments at management group.

az deployment mg show

Show a deployment at management group.

az deployment mg validate

Validate whether a template is valid at management group.

az deployment mg wait

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

az deployment operation

Manage deployment operations at subscription scope.

az deployment operation group

Manage deployment operations at resource group.

az deployment operation group list

List deployment operations at resource group.

az deployment operation group show

Show a deployment operation at resource group.

az deployment operation list

List deployment operations at subscription scope.

az deployment operation mg

Manage deployment operations at management group.

az deployment operation mg list

List deployment operations at management group.

az deployment operation mg show

Show a deployment operation at management group.

az deployment operation show

Show a deployment operation at subscription scope.

az deployment operation sub

Manage deployment operations at subscription scope.

az deployment operation sub list

List deployment operations at subscription scope.

az deployment operation sub show

Show a deployment operation at subscription scope.

az deployment operation tenant

Manage deployment operations at tenant scope.

az deployment operation tenant list

List deployment operations at tenant scope.

az deployment operation tenant show

Show a deployment operation at tenant scope.

az deployment show

Show a deployment at subscription scope.

az deployment sub

Manage Azure Resource Manager template deployment at subscription scope.

az deployment sub cancel

Cancel a deployment at subscription scope.

az deployment sub create

Start a deployment at subscription scope.

az deployment sub delete

Delete a deployment at subscription scope.

az deployment sub export

Export the template used for a deployment.

az deployment sub list

List deployments at subscription scope.

az deployment sub show

Show a deployment at subscription scope.

az deployment sub validate

Validate whether a template is valid at subscription scope.

az deployment sub wait

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

az deployment sub what-if

Execute a deployment What-If operation at subscription scope.

az deployment tenant

Manage Azure Resource Manager template deployment at tenant scope.

az deployment tenant cancel

Cancel a deployment at tenant scope.

az deployment tenant create

Start a deployment at tenant scope.

az deployment tenant delete

Delete a deployment at tenant scope.

az deployment tenant export

Export the template used for a deployment.

az deployment tenant list

List deployments at tenant scope.

az deployment tenant show

Show a deployment at tenant scope.

az deployment tenant validate

Validate whether a template is valid at tenant scope.

az deployment tenant wait

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

az deployment validate

Validate whether a template is valid at subscription scope.

az deployment wait

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

az deployment cancel

Cancel a deployment at subscription scope.

az deployment cancel --name
                     [--subscription]

Examples

Cancel a deployment at subscription scope.

az deployment cancel -n deployment01

Required Parameters

--name -n

The deployment name.

Optional Parameters

--subscription

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

az deployment create

Start a deployment at subscription scope.

az deployment create --location
                     [--confirm-with-what-if]
                     [--handle-extended-json-format]
                     [--name]
                     [--no-prompt {false, true}]
                     [--no-wait]
                     [--parameters]
                     [--subscription]
                     [--template-file]
                     [--template-uri]
                     [--what-if-exclude-change-types {Create, Delete, Deploy, Ignore, Modify, NoChange}]
                     [--what-if-result-format {FullResourcePayloads, ResourceIdOnly}]

Examples

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

az deployment create --location WestUS --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json

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

az deployment create --location WestUS --template-file azuredeploy.json  \
    --parameters "{ \"policyName\": { \"value\": \"policy2\" }}"

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

az deployment create --location WestUS --template-file azuredeploy.json  \
    --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json

Required Parameters

--location -l

The location to store the deployment metadata.

Optional Parameters

--confirm-with-what-if -c

Instruct the command to run deployment What-If before executing the deployment. It then prompts you to acknowledge resource changes before it continues.

--handle-extended-json-format -j

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

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

accepted values: false, true
--no-wait

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

--parameters -p

Supply deployment parameter values.

--subscription

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

--template-file -f

The path to the template file.

--template-uri -u

The URI to the template file.

--what-if-exclude-change-types -x

Space-separated list of resource change types to be excluded from What-If results. Applicable when --confirm-with-what-if is set.

accepted values: Create, Delete, Deploy, Ignore, Modify, NoChange
--what-if-result-format -r

The format of What-If results. Applicable when --confirm-with-what-if is set.

accepted values: FullResourcePayloads, ResourceIdOnly
default value: FullResourcePayloads

az deployment delete

Delete a deployment at subscription scope.

az deployment delete --name
                     [--no-wait]
                     [--subscription]

Examples

Delete a deployment at subscription scope.

az deployment delete -n deployment01

Required Parameters

--name -n

The deployment name.

Optional Parameters

--no-wait

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

--subscription

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

az deployment export

Export the template used for a deployment.

az deployment export --name
                     [--subscription]

Examples

Export the template used for a deployment at subscription scope.

az deployment export --name MyDeployment

Required Parameters

--name -n

The deployment name.

Optional Parameters

--subscription

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

az deployment list

List deployments at subscription scope.

az deployment list [--filter]
                   [--subscription]

Examples

List deployments at subscription scope.

az deployment list

Optional Parameters

--filter

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/en-us/rest/api/resources/deployments/listatsubscriptionscope#uri-parameters.

--subscription

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

az deployment show

Show a deployment at subscription scope.

az deployment show --name
                   [--subscription]

Examples

Show a deployment at subscription scope.

az deployment show -n deployment01

Required Parameters

--name -n

The deployment name.

Optional Parameters

--subscription

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

az deployment validate

Validate whether a template is valid at subscription scope.

az deployment validate --location
                       [--handle-extended-json-format]
                       [--name]
                       [--no-prompt {false, true}]
                       [--parameters]
                       [--subscription]
                       [--template-file]
                       [--template-uri]

Examples

Validate whether a template is valid at subscription scope.

az deployment validate --location westus2 --parameters MyValue=This MyArray=@array.json --template-file azuredeploy.json

Required Parameters

--location -l

The location to store the deployment metadata.

Optional Parameters

--handle-extended-json-format -j

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

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

accepted values: false, true
--parameters -p

Supply deployment parameter values.

--subscription

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

--template-file -f

The path to the template file.

--template-uri -u

The URI to the template file.

az deployment wait

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

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

Examples

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

az deployment wait --deleted --name MyDeployment --subscription MySubscription

Required Parameters

--name -n

The deployment 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
--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'.