forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_help.py
More file actions
2359 lines (2154 loc) · 100 KB
/
_help.py
File metadata and controls
2359 lines (2154 loc) · 100 KB
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
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from knack.help_files import helps # pylint: disable=unused-import
helps['containerapp'] = """
type: group
short-summary: Manage Azure Container Apps.
"""
helps['containerapp env dapr-component resiliency'] = """
type: group
short-summary: Commands to manage resiliency policies for a dapr component.
"""
helps['containerapp env dapr-component resiliency create'] = """
type: command
short-summary: Create resiliency policies for a dapr component.
examples:
- name: Create timeout resiliency policy for a dapr component.
text: |
az containerapp env dapr-component resiliency create -g MyResourceGroup \\
-n MyDaprResiliency --dapr-component-name MyDaprComponentName \\
--environment MyEnvironment --out-timeout 45
- name: Create resiliency policies for a dapr component using a yaml configuration.
text: |
az containerapp env dapr-component resiliency create -g MyResourceGroup \\
-n MyDaprResiliency --dapr-component-name MyDaprComponentName \\
--environment MyEnvironment --yaml "path/to/yaml/file.yml"
"""
helps['containerapp env dapr-component resiliency update'] = """
type: command
short-summary: Update resiliency policies for a dapr component.
examples:
- name: Update timeout resiliency policy for a dapr component.
text: |
az containerapp env dapr-component resiliency update -g MyResourceGroup \\
-n MyDaprResiliency --dapr-component-name MyDaprComponentName \\
--environment MyEnvironment --in-timeout 45
- name: Update resiliency policies for a dapr component using a yaml configuration.
text: |
az containerapp env dapr-component resiliency update -g MyResourceGroup \\
-n MyDaprResiliency --dapr-component-name MyDaprComponentName \\
--environment MyEnvironment --yaml "path/to/yaml/file.yml"
"""
helps['containerapp env dapr-component resiliency show'] = """
type: command
short-summary: Show resiliency policies for a dapr component.
examples:
- name: Show resiliency policies for a dapr component.
text: |
az containerapp env dapr-component resiliency show -g MyResourceGroup \\
-n MyDaprResiliency --dapr-component-name MyDaprComponentName \\
--environment MyEnvironment
"""
helps['containerapp env dapr-component resiliency delete'] = """
type: command
short-summary: Delete resiliency policies for a dapr component.
examples:
- name: Delete resiliency policies for a dapr component.
text: |
az containerapp env dapr-component resiliency delete -g MyResourceGroup \\
-n MyDaprResiliency --dapr-component-name MyDaprComponentName \\
--environment MyEnvironment
"""
helps['containerapp env dapr-component resiliency list'] = """
type: command
short-summary: List resiliency policies for a dapr component.
examples:
- name: List resiliency policies for a dapr component.
text: |
az containerapp env dapr-component resiliency list -g MyResourceGroup \\
--dapr-component-name MyDaprComponentName --environment MyEnvironment
"""
# Identity Commands
helps['containerapp env identity'] = """
type: group
short-summary: Commands to manage environment managed identities.
"""
helps['containerapp env identity assign'] = """
type: command
short-summary: Assign managed identity to a managed environment.
long-summary: Managed identities can be user-assigned or system-assigned.
examples:
- name: Assign system identity.
text: |
az containerapp env identity assign -n my-env -g MyResourceGroup --system-assigned
- name: Assign user identity.
text: |
az containerapp env identity assign -n my-env -g MyResourceGroup --user-assigned myUserIdentityName
- name: Assign user identity (from a different resource group than the managed environment).
text: |
az containerapp env identity assign -n my-env -g MyResourceGroup --user-assigned myUserIdentityResourceId
- name: Assign system and user identity.
text: |
az containerapp env identity assign -n my-env -g MyResourceGroup --system-assigned --user-assigned myUserIdentityResourceId
"""
helps['containerapp env identity remove'] = """
type: command
short-summary: Remove a managed identity from a managed environment.
examples:
- name: Remove system identity.
text: |
az containerapp env identity remove -n my-env -g MyResourceGroup --system-assigned
- name: Remove user identity.
text: |
az containerapp env identity remove -n my-env -g MyResourceGroup --user-assigned myUserIdentityName
- name: Remove system and user identity (from a different resource group than the containerapp).
text: |
az containerapp env identity remove -n my-env -g MyResourceGroup --system-assigned --user-assigned myUserIdentityResourceId
- name: Remove all user identities.
text: |
az containerapp env identity remove -n my-env -g MyResourceGroup --user-assigned
- name: Remove system identity and all user identities.
text: |
az containerapp env identity remove -n my-env -g MyResourceGroup --system-assigned --user-assigned
"""
helps['containerapp env identity show'] = """
type: command
short-summary: Show managed identities of a managed environment.
examples:
- name: Show managed identities.
text: |
az containerapp env identity show -n my-env -g MyResourceGroup
"""
helps['containerapp up'] = """
type: command
short-summary: Create or update a container app as well as any associated resources (ACR, resource group, container apps environment, GitHub Actions, etc.)
examples:
- name: Create a container app from a dockerfile in a GitHub repo (setting up github actions)
text: |
az containerapp up -n my-containerapp --repo https://github.com/myAccount/myRepo
- name: Create a container app from a dockerfile in a local directory (or autogenerate a container if no dockerfile is found)
text: |
az containerapp up -n my-containerapp --source .
- name: Create a container app from an image in a registry
text: |
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag
- name: Create a container app from an image in a registry with ingress enabled and a specified environment
text: |
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --ingress external --target-port 80 --environment MyEnv
- name: Create a container app from an image in a registry on a Connected cluster
text: |
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --connected-cluster-id MyConnectedClusterResourceId
- name: Create a container app from an image in a registry on a connected environment
text: |
az containerapp up -n my-containerapp --image myregistry.azurecr.io/myImage:myTag --environment MyConnectedEnvironmentId
"""
helps['containerapp replica count'] = """
type: command
short-summary: Count of a container app's replica(s)
examples:
- name: Count replicas of a particular revision
text: |
az containerapp replica count -n my-containerapp -g MyResourceGroup --revision MyRevision
- name: Count replicas of the latest revision
text: |
az containerapp replica count -n my-containerapp -g MyResourceGroup
"""
# Environment Commands
helps['containerapp env'] = """
type: group
short-summary: Commands to manage Container Apps environments.
"""
helps['containerapp env create'] = """
type: command
short-summary: Create a Container Apps environment.
examples:
- name: Create an environment with an auto-generated Log Analytics workspace.
text: |
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\
--location eastus2
- name: Create a zone-redundant environment
text: |
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\
--location eastus2 --zone-redundant
- name: Create an environment with an existing Log Analytics workspace.
text: |
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\
--logs-workspace-id myLogsWorkspaceID \\
--logs-workspace-key myLogsWorkspaceKey \\
--location eastus2
- name: Create an environment with workload profiles enabled.
text: |
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\
--location eastus2 --enable-workload-profiles
- name: Create an environment without workload profiles enabled.
text: |
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\
--location eastus2 --enable-workload-profiles false
- name: Create an environment with system assigned and user assigned identity.
text: |
az containerapp env create -n MyContainerappEnvironment -g MyResourceGroup \\
--location eastus2 --mi-system-assigned --mi-user-assigned MyUserIdentityResourceId
"""
helps['containerapp add-on'] = """
type: group
short-summary: Commands to manage add-ons available within the environment.
"""
helps['containerapp add-on list'] = """
type: command
short-summary: List all add-ons within the environment.
"""
helps['containerapp resiliency'] = """
type: group
short-summary: Commands to manage resiliency policies for a container app.
"""
helps['containerapp resiliency create'] = """
type: command
short-summary: Create resiliency policies for a container app.
examples:
- name: Create recommended resiliency policies.
text: |
az containerapp resiliency create -g MyResourceGroup \\
-n MyResiliencyName --container-app-name my-containerapp --recommended
- name: Create the timeout resiliency policy.
text: |
az containerapp resiliency create -g MyResourceGroup \\
-n MyResiliencyName --container-app-name my-containerapp \\
--timeout 15 --timeout-connect 5
- name: Create resiliency policies using a yaml configuration.
text: |
az containerapp resiliency create -g MyResourceGroup \\
-n MyResiliencyName --container-app-name my-containerapp \\
--yaml "path/to/yaml/file.yml"
"""
helps['containerapp resiliency update'] = """
type: command
short-summary: Update resiliency policies for a container app.
examples:
- name: Update the TCP Connection Pool resiliency policy.
text: |
az containerapp resiliency update -g MyResourceGroup \\
-n MyResiliencyName --container-app-name my-containerapp \\
--tcp-connections 1024
- name: Update resiliency policies using a yaml configuration.
text: |
az containerapp resiliency update -g MyResourceGroup \\
-n MyResiliencyName --container-app-name my-containerapp \\
--yaml "path/to/yaml/file.yml"
"""
helps['containerapp resiliency delete'] = """
type: command
short-summary: Delete resiliency policies for a container app.
examples:
- name: Delete resiliency policies for a container app.
text: |
az containerapp resiliency delete -g MyResourceGroup \\
-n MyResiliencyName --container-app-name MyContainerApp
"""
helps['containerapp resiliency show'] = """
type: command
short-summary: Show resiliency policies for a container app.
examples:
- name: Show resiliency policies for a container app.
text: |
az containerapp resiliency show -g MyResourceGroup \\
-n MyResiliencyName --container-app-name MyContainerApp
"""
helps['containerapp resiliency list'] = """
type: command
short-summary: List resiliency policies for a container app.
examples:
- name: List resiliency policies for a container app.
text: |
az containerapp resiliency list -g MyResourceGroup \\
--container-app-name MyContainerApp
"""
helps['containerapp add-on redis'] = """
type: group
short-summary: Commands to manage the redis add-on for the Container Apps environment.
"""
helps['containerapp add-on postgres'] = """
type: group
short-summary: Commands to manage the postgres add-on for the Container Apps environment.
"""
helps['containerapp add-on kafka'] = """
type: group
short-summary: Commands to manage the kafka add-on for the Container Apps environment.
"""
helps['containerapp add-on mariadb'] = """
type: group
short-summary: Commands to manage the mariadb add-on for the Container Apps environment.
"""
helps['containerapp add-on qdrant'] = """
type: group
short-summary: Commands to manage the qdrant add-on for the Container Apps environment.
"""
helps['containerapp add-on weaviate'] = """
type: group
short-summary: Commands to manage the weaviate add-on for the Container Apps environment.
"""
helps['containerapp add-on milvus'] = """
type: group
short-summary: Commands to manage the milvus add-on for the Container Apps environment.
"""
helps['containerapp add-on redis create'] = """
type: command
short-summary: Command to create the redis add-on.
"""
helps['containerapp add-on postgres create'] = """
type: command
short-summary: Command to create the postgres add-on.
"""
helps['containerapp add-on kafka create'] = """
type: command
short-summary: Command to create the kafka add-on.
"""
helps['containerapp add-on mariadb create'] = """
type: command
short-summary: Command to create the mariadb add-on.
"""
helps['containerapp add-on qdrant create'] = """
type: command
short-summary: Command to create the qdrant add-on.
"""
helps['containerapp add-on weaviate create'] = """
type: command
short-summary: Command to create the weaviate add-on.
"""
helps['containerapp add-on milvus create'] = """
type: command
short-summary: Command to create the milvus add-on.
"""
helps['containerapp add-on redis delete'] = """
type: command
short-summary: Command to delete the redis add-on.
"""
helps['containerapp add-on postgres delete'] = """
type: command
short-summary: Command to delete the postgres add-on.
"""
helps['containerapp add-on kafka delete'] = """
type: command
short-summary: Command to delete the kafka add-on.
"""
helps['containerapp add-on mariadb delete'] = """
type: command
short-summary: Command to delete the mariadb add-on.
"""
helps['containerapp add-on qdrant delete'] = """
type: command
short-summary: Command to delete the qdrant add-on.
"""
helps['containerapp add-on weaviate delete'] = """
type: command
short-summary: Command to delete the weaviate service.
"""
helps['containerapp add-on milvus delete'] = """
type: command
short-summary: Command to delete the milvus service.
"""
helps['containerapp env update'] = """
type: command
short-summary: Update a Container Apps environment.
examples:
- name: Update an environment's custom domain configuration.
text: |
az containerapp env update -n MyContainerappEnvironment -g MyResourceGroup \\
--dns-suffix my-suffix.net --certificate-file MyFilePath \\
--certificate-password MyCertPass
"""
helps['containerapp env delete'] = """
type: command
short-summary: Delete a Container Apps environment.
examples:
- name: Delete an environment.
text: az containerapp env delete -n MyContainerappEnvironment -g MyResourceGroup
"""
helps['containerapp env show'] = """
type: command
short-summary: Show details of a Container Apps environment.
examples:
- name: Show the details of an environment.
text: |
az containerapp env show -n MyContainerappEnvironment -g MyResourceGroup
"""
helps['containerapp env list'] = """
type: command
short-summary: List Container Apps environments by subscription or resource group.
examples:
- name: List environments in the current subscription.
text: |
az containerapp env list
- name: List environments by resource group.
text: |
az containerapp env list -g MyResourceGroup
"""
# Container Apps Job Commands
helps['containerapp job'] = """
type: group
short-summary: Commands to manage Container Apps jobs.
"""
helps['containerapp job create'] = """
type: command
short-summary: Create a container apps job.
examples:
- name: Create a container apps job with Trigger Type as Manual.
text: |
az containerapp job create -n MyContainerappsjob -g MyResourceGroup \\
--environment MyContainerappEnv
--trigger-type Manual \\
--replica-timeout 5 \\
--replica-retry-limit 2 \\
--replica-completion-count 1 \\
--parallelism 1 \\
--image imageName \\
--workload-profile-name my-wlp
- name: Create a container apps job with Trigger Type as Schedule.
text: |
az containerapp job create -n MyContainerappsjob -g MyResourceGroup \\
--environment MyContainerappEnv
--trigger-type Schedule \\
--replica-timeout 5 \\
--replica-retry-limit 2 \\
--replica-completion-count 1 \\
--parallelism 1 \\
--cron-expression \"*/1 * * * *\" \\
--image imageName
- name: Create a container apps job with Trigger Type as Event.
text: |
az containerapp job create -n MyContainerappsjob -g MyResourceGroup \\
--environment MyContainerappEnv
--trigger-type Event \\
--replica-timeout 5 \\
--replica-retry-limit 2 \\
--replica-completion-count 1 \\
--parallelism 1 \\
--polling-interval 30 \\
--min-executions 0 \\
--max-executions 1 \\
--scale-rule-name queueJob \\
--scale-rule-type azure-queue \\
--scale-rule-metadata "accountName=mystorageaccountname" \\
"cloud=AzurePublicCloud" \\
"queueLength": "5" "queueName": "foo" \\
--scale-rule-auth "connection=my-connection-string-secret-name" \\
--image imageName
"""
helps['containerapp job delete'] = """
type: command
short-summary: Delete a Container Apps Job.
examples:
- name: Delete a job.
text: az containerapp job delete -n my-containerapp-job -g MyResourceGroup
"""
helps['containerapp job show'] = """
type: command
short-summary: Show details of a Container Apps Job.
examples:
- name: Show the details of a job.
text: |
az containerapp job show -n my-containerapp-job -g MyResourceGroup
"""
helps['containerapp job list'] = """
type: command
short-summary: List Container Apps Job by subscription or resource group.
examples:
- name: List jobs in the current subscription.
text: |
az containerapp job list
- name: List environments by resource group.
text: |
az containerapp job list -g MyResourceGroup
"""
helps['containerapp job start'] = """
type: command
short-summary: Start a Container Apps Job execution.
examples:
- name: Start a job execution.
text: az containerapp job start -n my-containerapp-job -g MyResourceGroup
- name: Start a job with different image and configurations.
text: az containerapp job start -n my-containerapp-job -g MyResourceGroup --image MyImageName --cpu 0.5 --memory 1.0Gi
"""
helps['containerapp job stop'] = """
type: command
short-summary: Stops a Container Apps Job execution.
examples:
- name: Stop a job execution.
text: az containerapp job stop -n my-containerapp-job -g MyResourceGroup
- name: Stop a job execution giving a specific job execution name.
text: az containerapp job stop -n my-containerapp-job -g MyResourceGroup --job-execution-name MyContainerAppJob-66v9xh0
- name: Stop multiple job executions giving a list of execution names.
text: az containerapp job stop -n my-containerapp-job -g MyResourceGroup --execution-name-list MyContainerAppJob-66v9xh0,MyContainerAppJob-66v9xh1
"""
# Certificates Commands
helps['containerapp env certificate'] = """
type: group
short-summary: Commands to manage certificates for the Container Apps environment.
"""
helps['containerapp env certificate create'] = """
type: command
short-summary: Create a managed certificate.
examples:
- name: Create a managed certificate.
text: |
az containerapp env certificate create -g MyResourceGroup --name MyEnvironment --certificate-name MyCertificate --hostname MyHostname --validation-method CNAME
"""
helps['containerapp env certificate upload'] = """
type: command
short-summary: Add or update a certificate.
examples:
- name: Add or update a certificate.
text: |
az containerapp env certificate upload -g MyResourceGroup --name MyEnvironment --certificate-file MyFilepath
- name: Add or update a certificate with a user-provided certificate name.
text: |
az containerapp env certificate upload -g MyResourceGroup --name MyEnvironment --certificate-file MyFilepath --certificate-name MyCertificateName
- name: Add or update a certificate from azure key vault using managed identity.
text: |
az containerapp env certificate upload -g MyResourceGroup --name MyEnvironment --akv-url akvSecretUrl --identity system
"""
helps['containerapp env certificate list'] = """
type: command
short-summary: List certificates for an environment.
examples:
- name: List certificates for an environment.
text: |
az containerapp env certificate list -g MyResourceGroup --name MyEnvironment
- name: Show a certificate by certificate id.
text: |
az containerapp env certificate list -g MyResourceGroup --name MyEnvironment --certificate MyCertificateId
- name: List certificates by certificate name.
text: |
az containerapp env certificate list -g MyResourceGroup --name MyEnvironment --certificate MyCertificateName
- name: List certificates by certificate thumbprint.
text: |
az containerapp env certificate list -g MyResourceGroup --name MyEnvironment --thumbprint MyCertificateThumbprint
- name: List managed certificates for an environment.
text: |
az containerapp env certificate list -g MyResourceGroup --name MyEnvironment --managed-certificates-only
- name: List private key certificates for an environment.
text: |
az containerapp env certificate list -g MyResourceGroup --name MyEnvironment --private-key-certificates-only
"""
helps['containerapp env certificate delete'] = """
type: command
short-summary: Delete a certificate from the Container Apps environment.
examples:
- name: Delete a certificate from the Container Apps environment by certificate name
text: |
az containerapp env certificate delete -g MyResourceGroup --name MyEnvironment --certificate MyCertificateName
- name: Delete a certificate from the Container Apps environment by certificate id
text: |
az containerapp env certificate delete -g MyResourceGroup --name MyEnvironment --certificate MyCertificateId
- name: Delete all certificates that have a matching thumbprint from the Container Apps environment
text: |
az containerapp env certificate delete -g MyResourceGroup --name MyEnvironment --thumbprint MyCertificateThumbprint
"""
helps['containerapp env dapr-component init'] = """
type: command
short-summary: Initializes Dapr components and dev services for an environment.
examples:
- name: Initialize Dapr components with default statestore and pubsub.
text: |
az containerapp env dapr-component init -g MyResourceGroup --name MyEnvironment
- name: Initialize Dapr components with Postgres statestore and Kafka pubsub.
text: |
az containerapp env dapr-component init -g MyResourceGroup --name MyEnvironment --statestore postgres --pubsub kafka
"""
helps['containerapp github-action'] = """
type: group
short-summary: Commands to manage GitHub Actions.
"""
helps['containerapp github-action add'] = """
type: command
short-summary: Add a GitHub Actions workflow to a repository to deploy a container app.
examples:
- name: Add GitHub Actions, using Azure Container Registry and personal access token.
text: az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main
--registry-url myregistryurl.azurecr.io
--service-principal-client-id 00000000-0000-0000-0000-00000000
--service-principal-tenant-id 00000000-0000-0000-0000-00000000
--service-principal-client-secret ClientSecret
--token MyAccessToken
- name: Add GitHub Actions, using Azure Container Registry and personal access token, configure image build via build environment variables.
text: az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main
--registry-url myregistryurl.azurecr.io
--service-principal-client-id 00000000-0000-0000-0000-00000000
--service-principal-tenant-id 00000000-0000-0000-0000-00000000
--service-principal-client-secret ClientSecret
--token MyAccessToken
--build-env-vars BP_JVM_VERSION=21 BP_MAVEN_VERSION=4
- name: Add GitHub Actions, using Azure Container Registry and log in to GitHub flow to retrieve personal access token.
text: az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main
--registry-url myregistryurl.azurecr.io
--service-principal-client-id 00000000-0000-0000-0000-00000000
--service-principal-tenant-id 00000000-0000-0000-0000-00000000
--service-principal-client-secret ClientSecret
--login-with-github
- name: Add GitHub Actions, using Docker Hub and log in to GitHub flow to retrieve personal access token.
text: az containerapp github-action add -g MyResourceGroup -n my-containerapp --repo-url https://github.com/userid/repo --branch main
--registry-username MyUsername
--registry-password MyPassword
--service-principal-client-id 00000000-0000-0000-0000-00000000
--service-principal-tenant-id 00000000-0000-0000-0000-00000000
--service-principal-client-secret ClientSecret
--login-with-github
"""
helps['containerapp hostname'] = """
type: group
short-summary: Commands to manage hostnames of a container app.
"""
helps['containerapp hostname bind'] = """
type: command
short-summary: Add or update the hostname and binding with a certificate.
examples:
- name: Add or update hostname and binding with a provided certificate.
text: |
az containerapp hostname bind -n my-containerapp -g MyResourceGroup --hostname MyHostname --certificate MyCertificateId
- name: Look for or create a managed certificate and bind with the hostname if no certificate or thumbprint is provided.
text: |
az containerapp hostname bind -n my-containerapp -g MyResourceGroup --hostname MyHostname
"""
# Auth commands
helps['containerapp auth'] = """
type: group
short-summary: Manage containerapp authentication and authorization.
"""
helps['containerapp auth show'] = """
type: command
short-summary: Show the authentication settings for the containerapp.
examples:
- name: Show the authentication settings for the containerapp.
text: az containerapp auth show --name my-containerapp --resource-group MyResourceGroup
"""
helps['containerapp auth update'] = """
type: command
short-summary: Update the authentication settings for the containerapp.
examples:
- name: Update the client ID of the AAD provider already configured.
text: |
az containerapp auth update -g myResourceGroup --name my-containerapp --set identityProviders.azureActiveDirectory.registration.clientId=my-client-id
- name: Configure the app with file based authentication by setting the config file path.
text: |
az containerapp auth update -g myResourceGroup --name my-containerapp --config-file-path D:\\home\\site\\wwwroot\\auth.json
- name: Configure the app to allow unauthenticated requests to hit the app.
text: |
az containerapp auth update -g myResourceGroup --name my-containerapp --unauthenticated-client-action AllowAnonymous
- name: Configure the app to redirect unauthenticated requests to the Facebook provider.
text: |
az containerapp auth update -g myResourceGroup --name my-containerapp --redirect-provider Facebook
- name: Configure the app to listen to the forward headers X-FORWARDED-HOST and X-FORWARDED-PROTO.
text: |
az containerapp auth update -g myResourceGroup --name my-containerapp --proxy-convention Standard
"""
helps['containerapp env workload-profile set'] = """
type: command
short-summary: Create or update an existing workload profile in a Container Apps environment
examples:
- name: Create or update an existing workload profile in a Container Apps environment
text: |
az containerapp env workload-profile set -g MyResourceGroup -n MyEnvironment --workload-profile-name my-wlp --workload-profile-type D4 --min-nodes 1 --max-nodes 2
"""
helps['containerapp env storage set'] = """
type: command
short-summary: Create or update a storage.
examples:
- name: Create a azure file storage.
text: |
az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --access-mode ReadOnly --azure-file-account-key MyAccountKey --azure-file-account-name MyAccountName --azure-file-share-name MyShareName
- name: Create a nfs azure file storage.
text: |
az containerapp env storage set -g MyResourceGroup -n MyEnv --storage-name MyStorageName --storage-type NfsAzureFile --access-mode ReadOnly --server MyNfsServer.file.core.windows.net --file-share /MyNfsServer/MyShareName
"""
# Compose commands
helps['containerapp compose'] = """
type: group
short-summary: Commands to create Azure Container Apps from Compose specifications.
"""
helps['containerapp compose create'] = """
type: command
short-summary: Create one or more Container Apps in a new or existing Container App Environment from a Compose specification.
examples:
- name: Create a container app by implicitly passing in a Compose configuration file from current directory.
text: |
az containerapp compose create -g MyResourceGroup \\
--environment MyContainerappEnv
- name: Create a container app by explicitly passing in a Compose configuration file.
text: |
az containerapp compose create -g MyResourceGroup \\
--environment MyContainerappEnv \\
--compose-file-path "path/to/docker-compose.yml"
"""
# Patch commands
helps['containerapp patch'] = """
type: group
short-summary: Patch Azure Container Apps. Patching is only available for the apps built using the source to cloud feature. See https://aka.ms/aca-local-source-to-cloud
"""
helps['containerapp patch list'] = """
type: command
short-summary: List container apps that can be patched. Patching is only available for the apps built using the source to cloud feature. See https://aka.ms/aca-local-source-to-cloud
examples:
- name: List patchable container apps in the current subscription.
text: |
az containerapp patch list
- name: List patchable container apps by resource group.
text: |
az containerapp patch list -g MyResourceGroup
- name: List patchable container apps by managed environment.
text: |
az containerapp patch list -g MyResourceGroup --environment MyContainerAppEnv
- name: List patchable and unpatchable container apps by managed environment with the show-all option.
text: |
az containerapp patch list -g MyResourceGroup --environment MyContainerAppEnv --show-all
"""
helps['containerapp patch apply'] = """
type: command
short-summary: List and apply container apps to be patched. Patching is only available for the apps built using the source to cloud feature. See https://aka.ms/aca-local-source-to-cloud
examples:
- name: List patchable container apps in the current subscription and apply patch.
text: |
az containerapp patch apply
- name: List patchable container apps by resource group and apply patch.
text: |
az containerapp patch apply -g MyResourceGroup
- name: List patchable container apps by managed environment and apply patch.
text: |
az containerapp patch apply -g MyResourceGroup --environment MyContainerAppEnv
- name: List patchable and unpatchable container apps by managed environment with the show-all option and apply patch for patchable container apps.
text: |
az containerapp patch apply -g MyResourceGroup --environment MyContainerAppEnv --show-all
"""
helps['containerapp patch interactive'] = """
type: command
short-summary: List and select container apps to be patched in an interactive way. Patching is only available for the apps built using the source to cloud feature. See https://aka.ms/aca-local-source-to-cloud
examples:
- name: List patchable container apps in the current subscription and apply patch interactively.
text: |
az containerapp patch interactive
- name: List patchable container apps by resource group and apply patch interactively.
text: |
az containerapp patch interactive -g MyResourceGroup
- name: List patchable container apps by managed environment and apply patch interactively.
text: |
az containerapp patch interactive -g MyResourceGroup --environment MyContainerAppEnv
- name: List patchable and unpatchable container apps by managed environment with the show-all option and apply patch for patchable container apps interactively.
text: |
az containerapp patch interactive -g MyResourceGroup --environment MyContainerAppEnv --show-all
"""
# containerapp create for preview
helps['containerapp create'] = """
type: command
short-summary: Create a container app.
examples:
- name: Create a container app and retrieve its fully qualified domain name.
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image myregistry.azurecr.io/my-app:v1.0 --environment MyContainerappEnv \\
--ingress external --target-port 80 \\
--registry-server myregistry.azurecr.io --registry-username myregistry --registry-password $REGISTRY_PASSWORD \\
--query properties.configuration.ingress.fqdn
- name: Create a container app with resource requirements and replica count limits.
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image nginx --environment MyContainerappEnv \\
--cpu 0.5 --memory 1.0Gi \\
--min-replicas 4 --max-replicas 8
- name: Create a container app with secrets and environment variables.
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-app:v1.0 --environment MyContainerappEnv \\
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \\
--env-vars GREETING="Hello, world" SECRETENV=secretref:anothersecret
- name: Create a container app using a YAML configuration. Example YAML configuration - https://aka.ms/azure-container-apps-yaml
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--environment MyContainerappEnv \\
--yaml "path/to/yaml/file.yml"
- name: Create a container app with an http scale rule
text: |
az containerapp create -n myapp -g mygroup --environment myenv --image nginx \\
--scale-rule-name my-http-rule \\
--scale-rule-http-concurrency 50
- name: Create a container app with a custom scale rule
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-queue-processor --environment MyContainerappEnv \\
--min-replicas 4 --max-replicas 8 \\
--scale-rule-name queue-based-autoscaling \\
--scale-rule-type azure-queue \\
--scale-rule-metadata "accountName=mystorageaccountname" \\
"cloud=AzurePublicCloud" \\
"queueLength=5" "queueName=foo" \\
--scale-rule-auth "connection=my-connection-string-secret-name"
- name: Create a container app with a custom scale rule using identity to authenticate
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-queue-processor --environment MyContainerappEnv \\
--user-assigned myUserIdentityResourceId --min-replicas 4 --max-replicas 8 \\
--scale-rule-name queue-based-autoscaling \\
--scale-rule-type azure-queue \\
--scale-rule-metadata "accountName=mystorageaccountname" \\
"cloud=AzurePublicCloud" \\
"queueLength=5" "queueName=foo" \\
--scale-rule-identity myUserIdentityResourceId
- name: Create a container app with secrets and mounts them in a volume.
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-app:v1.0 --environment MyContainerappEnv \\
--secrets mysecret=secretvalue1 anothersecret="secret value 2" \\
--secret-volume-mount "mnt/secrets"
- name: Create a container app hosted on a Connected Environment.
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-app:v1.0 --environment MyContainerappConnectedEnv \\
--environment-type connected
- name: Create a container app from a new GitHub Actions workflow in the provided GitHub repository
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--environment MyContainerappEnv --registry-server MyRegistryServer \\
--registry-user MyRegistryUser --registry-pass MyRegistryPass \\
--repo https://github.com/myAccount/myRepo
- name: Create a Container App from the provided application source
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--environment MyContainerappEnv --registry-server MyRegistryServer \\
--registry-user MyRegistryUser --registry-pass MyRegistryPass \\
--source .
- name: Create a container app with java metrics enabled
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-app:v1.0 --environment MyContainerappEnv \\
--enable-java-metrics
- name: Create a container app with java agent enabled
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-app:v1.0 --environment MyContainerappEnv \\
--enable-java-agent
- name: Create a container app with kind as functionapp
text: |
az containerapp create -n my-containerapp -g MyResourceGroup \\
--image my-app:v1.0 --environment MyContainerappEnv \\
--kind functionapp
"""
# containerapp update for preview
helps['containerapp update'] = """
type: command
short-summary: Update a container app. In multiple revisions mode, create a new revision based on the latest revision.
examples:
- name: Update a container app's container image.
text: |
az containerapp update -n my-containerapp -g MyResourceGroup \\
--image myregistry.azurecr.io/my-app:v2.0
- name: Update a container app's resource requirements and scale limits.
text: |
az containerapp update -n my-containerapp -g MyResourceGroup \\
--cpu 0.5 --memory 1.0Gi \\
--min-replicas 4 --max-replicas 8
- name: Update a container app with an http scale rule
text: |
az containerapp update -n myapp -g mygroup \\
--scale-rule-name my-http-rule \\
--scale-rule-http-concurrency 50
- name: Update a container app with a custom scale rule
text: |
az containerapp update -n myapp -g mygroup \\
--scale-rule-name my-custom-rule \\
--scale-rule-type my-custom-type \\
--scale-rule-metadata key=value key2=value2 \\
--scale-rule-auth triggerparam=secretref triggerparam=secretref
- name: Update a Container App from the provided application source
text: |
az containerapp update -n my-containerapp -g MyResourceGroup --source .
- name: Update a container app with java metrics enabled
text: |
az containerapp update -n my-containerapp -g MyResourceGroup \\
--enable-java-metrics
- name: Update a container app with java agent enabled
text: |
az containerapp update -n my-containerapp -g MyResourceGroup \\
--enable-java-agent
- name: Update a container app to erase java enhancement capabilities, like java metrics, java agent, etc.
text: |
az containerapp update -n my-containerapp -g MyResourceGroup \\
--runtime generic
"""
# containerapp list for preview
helps['containerapp list'] = """
type: command
short-summary: List container apps.
examples:
- name: List container apps in the current subscription.
text: |
az containerapp list
- name: List container apps by resource group.
text: |
az containerapp list -g MyResourceGroup
- name: List container apps by environment type.
text: |
az containerapp list --environment-type connected
"""
# Connected Environment Commands
helps['containerapp connected-env'] = """
type: group
short-summary: Commands to manage Container Apps Connected environments for use with Arc enabled Container Apps.
"""
helps['containerapp connected-env create'] = """
type: command
short-summary: Create a Container Apps connected environment.
long-summary: Create a Container Apps Connected environment for use with Arc enabled Container Apps. Environments are an isolation boundary around a collection of container apps.
examples:
- name: Create a connected environment
text: |
az containerapp connected-env create -n MyContainerappConnectedEnv -g MyResourceGroup \\
--location eastus --custom-location MyCustomLocationResourceID
"""
helps['containerapp connected-env delete'] = """
type: command
short-summary: Delete a Container Apps connected environment.
examples:
- name: Delete a connected environment.
text: az containerapp connected-env delete -n MyContainerappConnectedEnv -g MyResourceGroup
"""