-
Notifications
You must be signed in to change notification settings - Fork 496
/
Copy pathresource.yml
736 lines (736 loc) · 32.7 KB
/
resource.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
### YamlMime:AzureCLIGroup
uid: az_resource
name: az resource
summary: |-
Manage Azure resources.
status: GA
sourceType: Core
directCommands:
- uid: az_resource_create
name: az resource create
summary: |-
Create a resource.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource create --properties
[--api-version]
[--id]
[--is-full-object]
[--latest-include-preview]
[--location]
[--name]
[--namespace]
[--parent]
[--resource-group]
[--resource-type]
examples:
- summary: |-
Create an API app by providing a full JSON configuration.
syntax: >-
az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites \
--is-full-object --properties "{ \"kind\": \"api\", \"location\": \
\"West US\", \"properties\": { \"serverFarmId\": \
\"/subscriptions/{SubID}/resourcegroups/{ResourceGroup} \
/providers/Microsoft.Web/serverfarms/{ServicePlan}\" } }"
- summary: |-
Create a resource by loading JSON configuration from a file.
syntax: az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites --is-full-object --properties @jsonConfigFile
- summary: |-
Create a web app with the minimum required configuration information.
syntax: >-
az resource create -g myRG -n myWeb --resource-type Microsoft.web/sites \
--properties "{ \"serverFarmId\":\"/subscriptions/{SubID}/resourcegroups/ \
{ResourceGroup}/providers/Microsoft.Web/serverfarms/{ServicePlan}\" }"
- summary: |-
Create a resource by using the latest api-version whether this version is a preview version.
syntax: az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites --is-full-object --properties @jsonConfigFile --latest-include-preview
- summary: |-
Create a site extension to a web app
syntax: >-
az resource create -g myRG --api-version "2018-02-01" \
--name "{sitename+slot}/siteextensions/Contrast.NetCore.Azure.SiteExtension" \
--resource-type Microsoft.Web/sites/siteextensions --is-full-object \
--properties "{ \"id\": \"Contrast.NetCore.Azure.SiteExtension\", \
\"location\": \"West US\", \"version\": \"1.9.0\" }"
requiredParameters:
- isRequired: true
name: --properties -p
summary: |-
A JSON-formatted string containing resource properties.
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --id
summary: |-
Resource ID.
- name: --is-full-object
defaultValue: "False"
summary: |-
Indicate that the properties object includes other options such as location, tags, sku, and/or plan.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --location -l
summary: |-
Location. Values from: `az account list-locations`. You can configure the default location using `az configure --defaults location=<location>`.
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- uid: az_resource_delete
name: az resource delete
summary: |-
Delete a resource.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource delete [--api-version]
[--ids]
[--latest-include-preview]
[--name]
[--namespace]
[--no-wait]
[--parent]
[--resource-group]
[--resource-type]
examples:
- summary: |-
Delete a virtual machine named 'MyVm'.
syntax: az resource delete -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines"
- summary: |-
Delete a web app using a resource identifier.
syntax: az resource delete --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/MyWebapp
- summary: |-
Delete a subnet using a resource identifier.
syntax: az resource delete --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet
- summary: |-
Delete a virtual machine named 'MyVm' by using the latest api-version whether this version is a preview version.
syntax: az resource delete -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" --latest-include-preview
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --no-wait
defaultValue: "False"
summary: |-
Do not wait for the long-running operation to finish.
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- uid: az_resource_invoke-action
name: az resource invoke-action
summary: |-
Invoke an action on the resource.
description: |-
A list of possible actions corresponding to a resource can be found at https://learn.microsoft.com/rest/api/. All POST requests are actions that can be invoked and are specified at the end of the URI path. For instance, to stop a VM, the request URI is https://management.azure.com/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VM}/powerOff?api-version={APIVersion} and the corresponding action is `powerOff`. This can be found at https://learn.microsoft.com/rest/api/compute/virtualmachines/virtualmachines-stop.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource invoke-action --action
[--api-version]
[--ids]
[--latest-include-preview]
[--name]
[--namespace]
[--no-wait]
[--parent]
[--request-body]
[--resource-group]
[--resource-type]
examples:
- summary: |-
Power-off a vm, specified by Id.
syntax: >-
az resource invoke-action --action powerOff \
--ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VMName}
- summary: |-
Capture information for a stopped vm.
syntax: >-
az resource invoke-action --action capture \
--ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/ \
Microsoft.Compute/virtualMachines/{VMName} \
--request-body "{ \"vhdPrefix\": \"myPrefix\", \"destinationContainerName\": \
\"myContainer\", \"overwriteVhds\": true }"
- summary: |-
Invoke an action on the resource. (autogenerated)
syntax: az resource invoke-action --action capture --name MyResource --resource-group MyResourceGroup --resource-type Microsoft.web/sites
requiredParameters:
- isRequired: true
name: --action
summary: |-
The action that will be invoked on the specified resource.
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --no-wait
defaultValue: "False"
summary: |-
Do not wait for the long-running operation to finish.
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --request-body
summary: |-
JSON encoded parameter arguments for the action that will be passed along in the post request body. Use @{file} to load from a file.
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- uid: az_resource_list
name: az resource list
summary: |-
List resources.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource list [--location]
[--name]
[--namespace]
[--resource-group]
[--resource-type]
[--tag]
examples:
- summary: |-
List all resources in the West US region.
syntax: az resource list --location westus
- summary: |-
List all resources with the name 'resourceName'.
syntax: az resource list --name 'resourceName'
- summary: |-
List all resources with the tag 'test'.
syntax: az resource list --tag test
- summary: |-
List all resources with a tag that starts with 'test'.
syntax: az resource list --tag 'test*'
- summary: |-
List all resources with the tag 'test' that have the value 'example'.
syntax: az resource list --tag test=example
optionalParameters:
- name: --location -l
summary: |-
Location. Values from: `az account list-locations`. You can configure the default location using `az configure --defaults location=<location>`.
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- name: --tag
summary: |-
A single tag in 'key[=value]' format. Use "" to clear existing tags.
- uid: az_resource_move
name: az resource move
summary: |-
Move resources from one resource group to another (can be under different subscription).
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource move --destination-group
--ids
[--destination-subscription-id]
examples:
- summary: |-
Move multiple resources to the destination resource group under the destination subscription
syntax: az resource move --destination-group ResourceGroup --destination-subscription-id SubscriptionId --ids "ResourceId1" "ResourceId2" "ResourceId3"
requiredParameters:
- isRequired: true
name: --destination-group
summary: |-
The destination resource group name.
- isRequired: true
name: --ids
summary: |-
The space-separated resource ids to be moved.
optionalParameters:
- name: --destination-subscription-id
summary: |-
The destination subscription identifier.
- uid: az_resource_patch
name: az resource patch
summary: |-
Update a resource by PATCH request.
description: |-
It supports updating resources with JSON-formatted string. If the patch operation fails, please try run 'az resource update' instead.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource patch --properties
[--api-version]
[--ids]
[--is-full-object]
[--latest-include-preview]
[--name]
[--namespace]
[--parent]
[--resource-group]
[--resource-type]
examples:
- summary: |-
Update a webapp by using the latest api-version whether this version is a preview version.
syntax: >-
az resource patch --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp} \
--latest-include-preview --is-full-object --properties "{ \"tags\": { \"key\": \"value\" } }"
- summary: |-
Update a resource by using JSON configuration from a file.
syntax: >-
az resource patch --name MyResource --resource-group MyResourceGroup --resource-type Microsoft.web/sites \
--is-full-object --properties @jsonConfigFile
- summary: |-
Update an API app by providing a JSON configuration.
syntax: >-
az resource patch --name MyApiApp --resource-group MyResourceGroup --resource-type Microsoft.web/sites \
--is-full-object --properties "{ \"kind\": \"api\", \"properties\": { \"serverFarmId\": \
\"/subscriptions/{SubID}/resourcegroups/{ResourceGroup} \
/providers/Microsoft.Web/serverfarms/{ServicePlan}\" } }"
requiredParameters:
- isRequired: true
name: --properties -p
summary: |-
A JSON-formatted string containing resource properties.
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --is-full-object
defaultValue: "False"
summary: |-
Indicate that the properties object includes other options such as location, tags, sku, and/or plan.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- uid: az_resource_show
name: az resource show
summary: |-
Get the details of a resource.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource show [--api-version]
[--ids]
[--include-response-body {false, true}]
[--latest-include-preview]
[--name]
[--namespace]
[--parent]
[--resource-group]
[--resource-type]
examples:
- summary: |-
Show a virtual machine resource named 'MyVm'.
syntax: az resource show -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines"
- summary: |-
Show a web app using a resource identifier.
syntax: az resource show --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/MyWebapp
- summary: |-
Show a subnet.
syntax: az resource show -g MyResourceGroup -n MySubnet --namespace Microsoft.Network --parent virtualnetworks/MyVnet --resource-type subnets
- summary: |-
Show a subnet using a resource identifier.
syntax: az resource show --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet
- summary: |-
Show an application gateway path rule.
syntax: az resource show -g MyResourceGroup --namespace Microsoft.Network --parent applicationGateways/ag1/urlPathMaps/map1 --resource-type pathRules -n rule1
- summary: |-
Show a virtual machine resource named 'MyVm' by using the latest api-version whether this version is a preview version.
syntax: az resource show -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" --latest-include-preview
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --include-response-body
defaultValue: "False"
parameterValueGroup: "false, true"
summary: |-
Use if the default command output doesn't capture all of the property data.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- uid: az_resource_tag
name: az resource tag
summary: |-
Tag a resource.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource tag --tags
[--api-version]
[--ids]
[--is-incremental]
[--latest-include-preview]
[--name]
[--namespace]
[--parent]
[--resource-group]
[--resource-type]
examples:
- summary: |-
Tag the virtual machine 'MyVm' with the key 'vmlist' and value 'vm1'.
syntax: az resource tag --tags vmlist=vm1 -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines"
- summary: |-
Tag a web app with the key 'vmlist' and value 'vm1', using a resource identifier.
syntax: az resource tag --tags vmlist=vm1 --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp}
- summary: |-
Tag the virtual machine 'MyVm' with the key 'vmlist' and value 'vm1' incrementally. It doesn't empty the existing tags.
syntax: az resource tag --tags vmlist=vm1 -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" -i
- summary: |-
Tag the virtual machine 'MyVm' with the key 'vmlist' and value 'vm1' by using the latest api-version whether this version is a preview version.
syntax: az resource tag --tags vmlist=vm1 -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" --latest-include-preview
requiredParameters:
- isRequired: true
name: --tags
summary: |-
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --is-incremental -i
summary: |-
The option to add tags incrementally without deleting the original tags. If the key of new tag and original tag are duplicated, the original value will be overwritten.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- uid: az_resource_update
name: az resource update
summary: |-
Update a resource by PUT request.
description: |-
It supports the generic update (using property path) to update resources. If the update operation fails, please try run 'az resource patch' instead.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource update [--add]
[--api-version]
[--force-string]
[--ids]
[--include-response-body {false, true}]
[--latest-include-preview]
[--name]
[--namespace]
[--parent]
[--remove]
[--resource-group]
[--resource-type]
[--set]
examples:
- summary: |-
Update a webapp by using the latest api-version whether this version is a preview version.
syntax: az resource update --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp} --set tags.key=value --latest-include-preview
- summary: |-
Update a resource. (autogenerated)
syntax: az resource update --ids $id --set properties.connectionType=Proxy
- summary: |-
Update a resource. (autogenerated)
syntax: az resource update --name MyResource --resource-group MyResourceGroup --resource-type subnets --set tags.key=value
optionalParameters:
- name: --add
defaultValue: "[]"
summary: |-
Add an object to a list of objects by specifying a path and key value pairs. Example: `--add property.listProperty <key=value, string or JSON string>`.
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --force-string
defaultValue: "False"
summary: |-
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --include-response-body
defaultValue: "False"
parameterValueGroup: "false, true"
summary: |-
Use if the default command output doesn't capture all of the property data.
- name: --latest-include-preview -v
defaultValue: "False"
summary: |-
Indicate that the latest api-version will be used regardless of whether it is preview version (like 2020-01-01-preview) or not. For example, if the supported api-version of resource provider is 2020-01-01-preview and 2019-01-01: when passing in this parameter it will take the latest version 2020-01-01-preview, otherwise it will take the latest stable version 2019-01-01 without passing in this parameter.
isPreview: true
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --remove
defaultValue: "[]"
summary: |-
Remove a property or an element from a list. Example: `--remove property.list <indexToRemove>` OR `--remove propertyToRemove`.
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- name: --set
defaultValue: "[]"
summary: |-
Update an object by specifying a property path and value to set. Example: `--set property1.property2=<value>`.
- uid: az_resource_wait
name: az resource wait
summary: |-
Place the CLI in a waiting state until a condition of a resources is met.
status: GA
sourceType: Core
editLink: https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/azure/cli/command_modules/resource/_help.py
syntax: >-
az resource wait [--api-version]
[--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--include-response-body {false, true}]
[--interval]
[--name]
[--namespace]
[--parent]
[--resource-group]
[--resource-type]
[--timeout]
[--updated]
examples:
- summary: |-
Place the CLI in a waiting state until a condition of a resources is met. (autogenerated)
syntax: az resource wait --exists --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp}
- summary: |-
Place the CLI in a waiting state until a condition of a resources is met. (autogenerated)
syntax: az resource wait --exists --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp} --include-response-body true
- summary: |-
Place the CLI in a waiting state until a condition of a resources is met. (autogenerated)
syntax: az resource wait --exists --name MyResource --resource-group MyResourceGroup --resource-type subnets
optionalParameters:
- name: --api-version
summary: |-
The api version of the resource (omit for the latest stable version).
- name: --created
defaultValue: "False"
summary: |-
Wait until created with 'provisioningState' at 'Succeeded'.
- name: --custom
summary: |-
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
- name: --deleted
defaultValue: "False"
summary: |-
Wait until deleted.
- name: --exists
defaultValue: "False"
summary: |-
Wait until the resource exists.
- name: --ids
summary: |-
One or more resource IDs (space-delimited). If provided, no other "Resource Id" arguments should be specified.
- name: --include-response-body
defaultValue: "False"
parameterValueGroup: "false, true"
summary: |-
Use if the default command output doesn't capture all of the property data.
- name: --interval
defaultValue: "30"
summary: |-
Polling interval in seconds.
- name: --name -n
summary: |-
The resource name. (Ex: myC).
- name: --namespace
summary: |-
Provider namespace (Ex: 'Microsoft.Provider').
- name: --parent
summary: |-
The parent path (Ex: 'resA/myA/resB/myB').
- name: --resource-group -g
summary: |-
Name of resource group. You can configure the default group using `az configure --defaults group=<name>`.
- name: --resource-type
summary: |-
The resource type (Ex: 'resC'). Can also accept namespace/type format (Ex: 'Microsoft.Provider/resC').
- name: --timeout
defaultValue: "3600"
summary: |-
Maximum wait in seconds.
- name: --updated
defaultValue: "False"
summary: |-
Wait until updated with provisioningState at 'Succeeded'.
commands:
- az_resource_create
- az_resource_delete
- az_resource_invoke-action
- az_resource_link
- az_resource_link_create
- az_resource_link_delete
- az_resource_link_list
- az_resource_link_show
- az_resource_link_update
- az_resource_list
- az_resource_lock
- az_resource_lock_create
- az_resource_lock_delete
- az_resource_lock_list
- az_resource_lock_show
- az_resource_lock_update
- az_resource_move
- az_resource_patch
- az_resource_show
- az_resource_tag
- az_resource_update
- az_resource_wait
globalParameters:
- name: --debug
summary: |-
Increase logging verbosity to show all debug logs.
- name: --help -h
summary: |-
Show this help message and exit.
- name: --only-show-errors
summary: |-
Only show errors, suppressing warnings.
- name: --output -o
defaultValue: "json"
parameterValueGroup: "json, jsonc, none, table, tsv, yaml, yamlc"
summary: |-
Output format.
- name: --query
summary: |-
JMESPath query string. See <a href="http://jmespath.org/">http://jmespath.org/</a> for more information and examples.
- name: --subscription
summary: |-
Name or ID of subscription. You can configure the default subscription using `az account set -s NAME_OR_ID`.
- name: --verbose
summary: |-
Increase logging verbosity. Use --debug for full debug logs.
metadata:
ms.date: 01/06/2025
description: Manage Azure resources.