Skip to content

Commit 372e79f

Browse files
Merge pull request #107875 from mumian/0316-cli
update the deprecate cli cmd
2 parents b13beba + 5e8139a commit 372e79f

15 files changed

+114
-114
lines changed

articles/azure-resource-manager/templates/common-deployment-errors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ To see deployment error codes and messages with PowerShell, use:
108108
To see deployment error codes and messages with Azure CLI, use:
109109

110110
```azurecli-interactive
111-
az group deployment operation list --name exampledeployment -g examplegroup --query "[*].properties.statusMessage"
111+
az deployment group operation list --name exampledeployment -g examplegroup --query "[*].properties.statusMessage"
112112
```
113113

114114
In the portal, select the notification.
@@ -166,15 +166,15 @@ Currently, Azure CLI doesn't support turning on debug logging, but you can retri
166166
Examine the deployment operations with the following command:
167167

168168
```azurecli
169-
az group deployment operation list \
169+
az deployment group operation list \
170170
--resource-group examplegroup \
171171
--name exampledeployment
172172
```
173173

174174
Examine the request content with the following command:
175175

176176
```azurecli
177-
az group deployment operation list \
177+
az deployment group operation list \
178178
--name exampledeployment \
179179
-g examplegroup \
180180
--query [].properties.request
@@ -183,7 +183,7 @@ az group deployment operation list \
183183
Examine the response content with the following command:
184184

185185
```azurecli
186-
az group deployment operation list \
186+
az deployment group operation list \
187187
--name exampledeployment \
188188
-g examplegroup \
189189
--query [].properties.response

articles/azure-resource-manager/templates/cross-resource-group-deployment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ secondRG="secondarygroup"
167167
168168
az group create --name $firstRG --location southcentralus
169169
az group create --name $secondRG --location eastus
170-
az group deployment create \
170+
az deployment group create \
171171
--name ExampleDeployment \
172172
--resource-group $firstRG \
173173
--template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/crosssubscription.json \
@@ -189,7 +189,7 @@ az group create --name $secondRG --location eastus
189189
az account set --subscription $firstSub
190190
az group create --name $firstRG --location southcentralus
191191
192-
az group deployment create \
192+
az deployment group create \
193193
--name ExampleDeployment \
194194
--resource-group $firstRG \
195195
--template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/crosssubscription.json \
@@ -342,7 +342,7 @@ az group create --name parentGroup --location southcentralus
342342
az group create --name inlineGroup --location southcentralus
343343
az group create --name linkedGroup --location southcentralus
344344
345-
az group deployment create \
345+
az deployment group create \
346346
--name ExampleDeployment \
347347
--resource-group parentGroup \
348348
--template-uri https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/crossresourcegroupproperties.json

articles/azure-resource-manager/templates/deploy-cli.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The following example creates a resource group, and deploys a template from your
6464

6565
```azurecli-interactive
6666
az group create --name ExampleGroup --location "Central US"
67-
az group deployment create \
67+
az deployment group create \
6868
--name ExampleDeployment \
6969
--resource-group ExampleGroup \
7070
--template-file storage.json \
@@ -85,7 +85,7 @@ To deploy an external template, use the **template-uri** parameter. Use the URI
8585

8686
```azurecli-interactive
8787
az group create --name ExampleGroup --location "Central US"
88-
az group deployment create \
88+
az deployment group create \
8989
--name ExampleDeployment \
9090
--resource-group ExampleGroup \
9191
--template-uri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json" \
@@ -100,7 +100,7 @@ In the Cloud Shell, use the following commands:
100100

101101
```azurecli-interactive
102102
az group create --name examplegroup --location "South Central US"
103-
az group deployment create --resource-group examplegroup \
103+
az deployment group create --resource-group examplegroup \
104104
--template-uri <copied URL> \
105105
--parameters storageAccountType=Standard_GRS
106106
```
@@ -114,7 +114,7 @@ To pass parameter values, you can use either inline parameters or a parameter fi
114114
To pass inline parameters, provide the values in `parameters`. For example, to pass a string and array to a template is a Bash shell, use:
115115

116116
```azurecli-interactive
117-
az group deployment create \
117+
az deployment group create \
118118
--resource-group testgroup \
119119
--template-file demotemplate.json \
120120
--parameters exampleString='inline string' exampleArray='("value1", "value2")'
@@ -125,7 +125,7 @@ If you're using Azure CLI with Windows Command Prompt (CMD) or PowerShell, pass
125125
You can also get the contents of file and provide that content as an inline parameter.
126126

127127
```azurecli-interactive
128-
az group deployment create \
128+
az deployment group create \
129129
--resource-group testgroup \
130130
--template-file demotemplate.json \
131131
@@ -151,7 +151,7 @@ For more information about the parameter file, see [Create Resource Manager para
151151
To pass a local parameter file, use `@` to specify a local file named storage.parameters.json.
152152

153153
```azurecli-interactive
154-
az group deployment create \
154+
az deployment group create \
155155
--name ExampleDeployment \
156156
--resource-group ExampleGroup \
157157
--template-file storage.json \
@@ -182,10 +182,10 @@ To deploy a template with multi-line strings or comments, you must use the `--ha
182182

183183
## Test a template deployment
184184

185-
To test your template and parameter values without actually deploying any resources, use [az group deployment validate](/cli/azure/group/deployment#az-group-deployment-validate).
185+
To test your template and parameter values without actually deploying any resources, use [az deployment group validate](/cli/azure/group/deployment#az-deployment-group-validate).
186186

187187
```azurecli-interactive
188-
az group deployment validate \
188+
az deployment group validate \
189189
--resource-group ExampleGroup \
190190
--template-file storage.json \
191191
--parameters @storage.parameters.json

articles/azure-resource-manager/templates/deployment-history.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ You can view details about a deployment through the Azure portal, PowerShell, Az
2727

2828
![Select deployment](./media/deployment-history/select-details.png)
2929

30-
1. A summary of the deployment is displayed, including the correlation ID.
30+
1. A summary of the deployment is displayed, including the correlation ID.
3131

3232
![Deployment summary](./media/deployment-history/show-correlation-id.png)
3333

@@ -53,27 +53,27 @@ To get the correlation ID, use:
5353

5454
# [Azure CLI](#tab/azure-cli)
5555

56-
To list the deployment for a resource group, use [az group deployment list](/cli/azure/group/deployment?view=azure-cli-latest#az-group-deployment-list).
56+
To list the deployment for a resource group, use [az deployment group list](/cli/azure/group/deployment?view=azure-cli-latest#az-deployment-group-list).
5757

5858
```azurecli-interactive
59-
az group deployment list --resource-group ExampleGroup
59+
az deployment group list --resource-group ExampleGroup
6060
```
6161

62-
To get a specific deployment, use the [az group deployment show](/cli/azure/group/deployment?view=azure-cli-latest#az-group-deployment-show).
62+
To get a specific deployment, use the [az deployment group show](/cli/azure/group/deployment?view=azure-cli-latest#az-deployment-group-show).
6363

6464
```azurecli-interactive
65-
az group deployment show --resource-group ExampleGroup --name ExampleDeployment
65+
az deployment group show --resource-group ExampleGroup --name ExampleDeployment
6666
```
67-
67+
6868
To get the correlation ID, use:
6969

7070
```azurecli-interactive
71-
az group deployment show --resource-group ExampleGroup --name ExampleDeployment --query properties.correlationId
71+
az deployment group show --resource-group ExampleGroup --name ExampleDeployment --query properties.correlationId
7272
```
7373

7474
# [HTTP](#tab/http)
7575

76-
To list the deployments for a resource group, use the following operation. For the latest API version number to use in the request, see [Deployments - List By Resource Group](/rest/api/resources/deployments/listbyresourcegroup).
76+
To list the deployments for a resource group, use the following operation. For the latest API version number to use in the request, see [Deployments - List By Resource Group](/rest/api/resources/deployments/listbyresourcegroup).
7777

7878
```
7979
GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deployments/?api-version={api-version}
@@ -139,22 +139,22 @@ To get the status message of failed operations, use the following command:
139139

140140
# [Azure CLI](#tab/azure-cli)
141141

142-
To view the deployment operations for deployment to a resource group, use the [az group deployment operation list](/cli/azure/group/deployment/operation?view=azure-cli-latest#az-group-deployment-operation-list) command.
142+
To view the deployment operations for deployment to a resource group, use the [az deployment group operation list](/cli/azure/group/deployment/operation?view=azure-cli-latest#az-deployment-group-operation-list) command.
143143

144144
```azurecli-interactive
145-
az group deployment operation list --resource-group ExampleGroup --name ExampleDeployment
145+
az deployment group operation list --resource-group ExampleGroup --name ExampleDeployment
146146
```
147147

148148
To view failed operations, filter operations with **Failed** state.
149149

150150
```azurecli-interactive
151-
az group deployment operation list --resource-group ExampleGroup --name ExampleDeploy --query "[?properties.provisioningState=='Failed']"
151+
az deployment group operation list --resource-group ExampleGroup --name ExampleDeploy --query "[?properties.provisioningState=='Failed']"
152152
```
153153

154154
To get the status message of failed operations, use the following command:
155155

156156
```azurecli-interactive
157-
az group deployment operation list --resource-group ExampleGroup --name ExampleDeploy --query "[?properties.provisioningState=='Failed'].properties.statusMessage.error"
157+
az deployment group operation list --resource-group ExampleGroup --name ExampleDeploy --query "[?properties.provisioningState=='Failed'].properties.statusMessage.error"
158158
```
159159

160160
# [HTTP](#tab/http)

articles/azure-resource-manager/templates/deployment-modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ New-AzResourceGroupDeployment `
8989
To set the deployment mode when deploying with Azure CLI, use the `mode` parameter.
9090

9191
```azurecli-interactive
92-
az group deployment create \
92+
az deployment group create \
9393
--name ExampleDeployment \
9494
--mode Complete \
9595
--resource-group ExampleGroup \

articles/azure-resource-manager/templates/deployment-quota-exceeded.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ During deployment, you receive an error stating that the current deployment will
1717

1818
### Azure CLI
1919

20-
Use the [az group deployment delete](/cli/azure/group/deployment#az-group-deployment-delete) command to delete deployments from the history.
20+
Use the [az deployment group delete](/cli/azure/group/deployment#az-deployment-group-delete) command to delete deployments from the history.
2121

2222
```azurecli-interactive
23-
az group deployment delete --resource-group exampleGroup --name deploymentName
23+
az deployment group delete --resource-group exampleGroup --name deploymentName
2424
```
2525

2626
To delete all deployments older than five days, use:
2727

2828
```azurecli-interactive
2929
startdate=$(date +%F -d "-5days")
30-
deployments=$(az group deployment list --resource-group exampleGroup --query "[?properties.timestamp<'$startdate'].name" --output tsv)
30+
deployments=$(az deployment group list --resource-group exampleGroup --query "[?properties.timestamp<'$startdate'].name" --output tsv)
3131
3232
for deployment in $deployments
3333
do
34-
az group deployment delete --resource-group exampleGroup --name $deployment
34+
az deployment group delete --resource-group exampleGroup --name $deployment
3535
done
3636
```
3737

3838
You can get the current count in the deployment history with the following command:
3939

4040
```azurecli-interactive
41-
az group deployment list --resource-group exampleGroup --query "length(@)"
41+
az deployment group list --resource-group exampleGroup --query "length(@)"
4242
```
4343

4444
### Azure PowerShell

articles/azure-resource-manager/templates/key-vault-parameter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ Deploy the template and pass in the parameter file:
229229

230230
```azurecli-interactive
231231
az group create --name SqlGroup --location westus2
232-
az group deployment create \
232+
az deployment group create \
233233
--resource-group SqlGroup \
234234
--template-uri <template-file-URI> \
235235
--parameters <parameter-file>

articles/azure-resource-manager/templates/linked-templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ Or, Azure CLI script in a Bash shell:
680680
for i in 0 1 2;
681681
do
682682
name="linkedTemplate$i";
683-
deployment=$(az group deployment show -g examplegroup -n $name);
683+
deployment=$(az deployment group show -g examplegroup -n $name);
684684
ip=$(echo $deployment | jq .properties.outputs.returnedIPAddress.value);
685685
echo "deployment $name returned $ip";
686686
done
@@ -753,7 +753,7 @@ url=$(az storage blob url \
753753
--output tsv \
754754
--connection-string $connection)
755755
parameter='{"containerSasToken":{"value":"?'$token'"}}'
756-
az group deployment create --resource-group ExampleGroup --template-uri $url?$token --parameters $parameter
756+
az deployment group create --resource-group ExampleGroup --template-uri $url?$token --parameters $parameter
757757
```
758758

759759
## Example templates

articles/azure-resource-manager/templates/quickstart-create-templates-use-visual-studio-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ There are many methods for deploying templates. Azure Cloud shell is used in thi
136136
echo "Enter the location (i.e. centralus):" &&
137137
read location &&
138138
az group create --name $resourceGroupName --location "$location" &&
139-
az group deployment create --resource-group $resourceGroupName --template-file "$HOME/azuredeploy.json"
139+
az deployment group create --resource-group $resourceGroupName --template-file "$HOME/azuredeploy.json"
140140
```
141141

142142
# [PowerShell](#tab/PowerShell)

articles/azure-resource-manager/templates/rollback-on-error.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Roll back on error to successful deployment
2+
title: Roll back on error to successful deployment
33
description: Specify that a failed deployment should roll back to a successful deployment.
44
ms.topic: conceptual
55
ms.date: 10/04/2019
@@ -41,7 +41,7 @@ New-AzResourceGroupDeployment -Name ExampleDeployment02 `
4141
To redeploy the last successful deployment, add the `--rollback-on-error` parameter as a flag.
4242

4343
```azurecli-interactive
44-
az group deployment create \
44+
az deployment group create \
4545
--name ExampleDeployment \
4646
--resource-group ExampleGroup \
4747
--template-file storage.json \
@@ -52,7 +52,7 @@ az group deployment create \
5252
To redeploy a specific deployment, use the `--rollback-on-error` parameter and provide the name of the deployment. The specified deployment must have succeeded.
5353

5454
```azurecli-interactive
55-
az group deployment create \
55+
az deployment group create \
5656
--name ExampleDeployment02 \
5757
--resource-group ExampleGroup \
5858
--template-file storage.json \

0 commit comments

Comments
 (0)