forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_help.py
More file actions
3088 lines (2731 loc) · 128 KB
/
_help.py
File metadata and controls
3088 lines (2731 loc) · 128 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
# pylint: disable=line-too-long, too-many-lines
helps['appservice'] = """
type: group
short-summary: Manage App Service plans.
"""
helps['appservice hybrid-connection'] = """
type: group
short-summary: a method that sets the key a hybrid-connection uses
"""
helps['appservice hybrid-connection set-key'] = """
type: command
short-summary: set the key that all apps in an appservice plan use to connect to the hybrid-connections in that appservice plan
examples:
- name: set the key that all apps in an appservice plan use to connect to the hybrid-connections in that appservice plan
text: az appservice hybrid-connection set-key -g MyResourceGroup --plan MyAppServicePlan --namespace [HybridConectionNamespace] --hybrid-connection [HybridConnectionName] --key-type ["primary"/"secondary"]
"""
helps['appservice list-locations'] = """
type: command
short-summary: List regions where a plan sku is available.
examples:
- name: List regions where a plan sku is available. (autogenerated)
text: az appservice list-locations --sku F1
crafted: true
"""
helps['appservice plan'] = """
type: group
short-summary: Manage app service plans.
"""
helps['appservice plan create'] = """
type: command
short-summary: Create an app service plan.
examples:
- name: Create a basic app service plan.
text: >
az appservice plan create -g MyResourceGroup -n MyPlan
- name: Create a standard app service plan with four Linux workers.
text: >
az appservice plan create -g MyResourceGroup -n MyPlan --is-linux --number-of-workers 4 --sku S1
- name: Create a Windows container app service plan.
text: >
az appservice plan create -g MyResourceGroup -n MyPlan --hyper-v --sku P1V3
- name: Create an app service plan for App Service Environment.
text: >
az appservice plan create -g MyResourceGroup -n MyPlan --app-service-environment MyAppServiceEnvironment --sku I1v2
- name: Create an app service plan for App Service Environment in different subscription.
text: >
az appservice plan create -g MyResourceGroup -n MyPlan --app-service-environment '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase' --sku I1V2
- name: Create an app service plan for App Service Environment in different subscription and the resource group in different region than App Service Environment.
text: >
az appservice plan create -g MyResourceGroup -n MyPlan --app-service-environment '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase' --sku I1V2 --location ase-region
"""
helps['appservice plan delete'] = """
type: command
short-summary: Delete an app service plan.
examples:
- name: Delete an app service plan. (autogenerated)
text: az appservice plan delete --name MyAppServicePlan --resource-group MyResourceGroup
crafted: true
"""
helps['appservice plan list'] = """
type: command
short-summary: List app service plans.
examples:
- name: List all free tier App Service plans.
text: >
az appservice plan list --query "[?sku.tier=='Free']"
- name: List all App Service plans for an App Service environment.
text: >
az appservice plan list --query "[?hostingEnvironmentProfile.name=='<ase-name>']"
"""
helps['appservice plan show'] = """
type: command
short-summary: Get the app service plans for a resource group or a set of resource groups.
examples:
- name: Get the app service plans for a resource group or a set of resource groups. (autogenerated)
text: az appservice plan show --name MyAppServicePlan --resource-group MyResourceGroup
crafted: true
"""
helps['appservice plan update'] = """
type: command
short-summary: Update an app service plan.
long-summary: See https:///go.microsoft.com/fwlink/?linkid=2133856 to learn more.
examples:
- name: Update an app service plan. (autogenerated)
text: az appservice plan update --name MyAppServicePlan --resource-group MyResourceGroup --sku F1
crafted: true
"""
helps['appservice vnet-integration'] = """
type: group
short-summary: a method that lists the virtual network integrations used in an appservice plan
"""
helps['appservice vnet-integration list'] = """
type: command
short-summary: list the virtual network integrations used in an appservice plan
examples:
- name: list the virtual network integrations used in an appservice plan
text: az appservice vnet-integration list -g MyResourceGroup --plan MyAppServicePlan
"""
helps['functionapp'] = """
type: group
short-summary: Manage function apps. To install the Azure Functions Core tools see https://github.com/Azure/azure-functions-core-tools
"""
helps['functionapp config'] = """
type: group
short-summary: Configure a function app.
"""
helps['functionapp config access-restriction'] = """
type: group
short-summary: Methods that show, set, add, and remove access restrictions on a functionapp
"""
helps['functionapp config access-restriction add'] = """
type: command
short-summary: Adds an Access Restriction to the function app
examples:
- name: Add Access Restriction opening (Allow) named developers for IPv4 address 130.220.0.0/27 with priority 200 to main site.
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --rule-name developers --action Allow --ip-address 130.220.0.0/27 --priority 200
- name: Add Access Restriction opening (Allow) named build_server for IPv4 address 192.168.0.0/27 with priority 250 to scm site.
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --rule-name build_server --action Allow --ip-address 192.168.0.0/27 --priority 250 --scm-site true
- name: Add Access Restriction opening (Allow) named app_gateway for Subnet app_gw in vNet core_weu with priority 300 to main site.
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --rule-name app_gateway --action Allow --vnet-name core_weu --subnet app_gateway --priority 300
- name: Add Access Restriction opening (Allow) named internal_agents for Subnet build_agents in vNet corp01 with priority 500 to scm site; and ignore service endpoint registration on the Subnet.
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --rule-name internal_agents --action Allow --vnet-name corp01 --subnet build_agents --priority 500 --scm-site true --ignore-missing-endpoint true
- name: Add Access Restriction opening (Allow) named remote_agents in vNet 'corp01' in rg 'vnets' with subnet 'agents'
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --rule-name remote_agents --action Allow --vnet-name corp01 --subnet agents --priority 500 --vnet-resource-group vnets
- name: Add Access Restriction opening (Allow) named agents in vNet 'corp01' in rg 'vnets' with subnet 'agents' (using subnet resource id)
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --rule-name remote_agents --action Allow --priority 800 --subnet '/subscriptions/<subscription-id>/resourceGroups/vnets/providers/Microsoft.Network/virtualNetworks/corp01/subnets/agents'
- name: Add Access Restriction opening (Allow) with no rule name for service tag AzureCloud
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --priority 400 --service-tag AzureCloud
- name: Add Access Restriction opening (Allow) with no rule name for service tag AzureFrontDoor.Backend and http-header X-Azure-FDID with value '12345678-abcd-1234-abcd-12345678910a'
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --priority 400 --service-tag AzureFrontDoor.Backend --http-header x-azure-fdid=12345678-abcd-1234-abcd-12345678910a
- name: Add Access Restriction opening (Allow) with multiple http-header values for the same header 'X-Azure-FDID'
text: az functionapp config access-restriction add -g ResourceGroup -n AppName --priority 400 --service-tag AzureFrontDoor.Backend --http-header x-azure-fdid=12345678-abcd-1234-abcd-12345678910a x-azure-fdid=11111111-abcd-1234-abcd-222222222222
"""
helps['functionapp config access-restriction remove'] = """
type: command
short-summary: Removes an Access Restriction from the functionapp.
examples:
- name: Remove Access Restriction named developers from the main site.
text: az functionapp config access-restriction remove -g ResourceGroup -n AppName --rule-name developers
- name: Remove Access Restriction named internal_agents from the scm site.
text: az functionapp config access-restriction remove -g ResourceGroup -n AppName --rule-name internal_agents --scm-site true
- name: Remove Access Restriction with service tag AzureFrontDoor.Backend from the main site.
text: az functionapp config access-restriction remove -g ResourceGroup -n AppName --service-tag AzureFrontDoor.Backend
"""
helps['functionapp config access-restriction set'] = """
type: command
short-summary: Sets if SCM site is using the same restrictions as the main site.
examples:
- name: Enable SCM site to use same access restrictions as main site.
text: az functionapp config access-restriction set -g ResourceGroup -n AppName --use-same-restrictions-for-scm-site true
- name: Set default action to Allow for main site.
text: az functionapp config access-restriction set -g ResourceGroup -n AppName --default-action Allow
- name: Set default action to Deny for scm site.
text: az functionapp config access-restriction set -g ResourceGroup -n AppName --scm-default-action Deny
"""
helps['functionapp config access-restriction show'] = """
type: command
short-summary: Show Access Restriction settings for functionapp.
examples:
- name: Get Access Restriction settings for a functionapp.
text: az functionapp config access-restriction show -g ResourceGroup -n AppName
"""
helps['functionapp config appsettings'] = """
type: group
short-summary: Configure function app settings.
"""
helps['functionapp config appsettings delete'] = """
type: command
short-summary: Delete a function app's settings.
long-summary: Note that setting values are now redacted in the result. Please use the `az functionapp config appsettings list` command to view the settings.
examples:
- name: Delete a function app's settings. (autogenerated)
text: az functionapp config appsettings delete --name MyFunctionApp --resource-group MyResourceGroup --setting-names {setting-names}
crafted: true
"""
helps['functionapp config appsettings list'] = """
type: command
short-summary: Show settings for a function app.
examples:
- name: Show settings for a function app. (autogenerated)
text: az functionapp config appsettings list --name MyWebapp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config appsettings set'] = """
type: command
short-summary: Update a function app's settings.
long-summary: Note that setting values are now redacted in the result. Please use the `az functionapp config appsettings list` command to view the settings.
parameters:
- name: --settings
short-summary: Space-separated appsettings in KEY=VALUE format. Use @{file} to load from a file.
- name: --slot-settings
short-summary: Space-separated appsettings in KEY=VALUE format. Use @{file} to load from a file. Given setting are added to the configuration and marked as Deployment slot setting by default.
examples:
- name: Update a function app's settings.
text: |
az functionapp config appsettings set --name MyFunctionApp --resource-group MyResourceGroup --settings foo=bar AzureWebJobsStorage=$storageConnectionString
- name: Set using both key-value pair and a json file with more settings.
text: >
az functionapp config appsettings set -g MyResourceGroup -n MyUniqueApp --settings mySetting=value @moreSettings.json
"""
helps['functionapp config container'] = """
type: group
short-summary: Manage an existing function app's container settings.
"""
helps['functionapp config container delete'] = """
type: command
short-summary: Delete an existing function app's container settings.
"""
helps['functionapp config container set'] = """
type: command
short-summary: Set an existing function app's container settings.
examples:
- name: Set a function app container's settings. (autogenerated)
text: az functionapp config container set --docker-custom-image-name MyDockerCustomImage --docker-registry-server-password StrongPassword --docker-registry-server-url https://{azure-container-registry-name}.azurecr.io --docker-registry-server-user DockerUserId --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config container show'] = """
type: command
short-summary: Get details of a function app's container settings.
examples:
- name: Get details of a function app container's settings. (autogenerated)
text: az functionapp config container show --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config hostname'] = """
type: group
short-summary: Configure hostnames for a function app.
"""
helps['functionapp config hostname add'] = """
type: command
short-summary: Bind a hostname to a function app.
examples:
- name: Bind a hostname to a function app. (autogenerated)
text: az functionapp config hostname add --hostname www.yourdomain.com --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config hostname delete'] = """
type: command
short-summary: Unbind a hostname from a function app.
"""
helps['functionapp config hostname get-external-ip'] = """
type: command
short-summary: Get the external-facing IP address for a function app.
examples:
- name: Get the external-facing IP address for a function app. (autogenerated)
text: az functionapp config hostname get-external-ip --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config hostname list'] = """
type: command
short-summary: List all hostname bindings for a function app.
examples:
- name: List all hostname bindings for a function app. (autogenerated)
text: az functionapp config hostname list --resource-group MyResourceGroup --webapp-name MyWebapp
crafted: true
"""
helps['functionapp config set'] = """
type: command
short-summary: Set an existing function app's configuration.
examples:
- name: Set the function app's configuration. (autogenerated)
text: az functionapp config set --always-on true --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
- name: set configuration through a JSON file called params.json
text: >
az functionapp config set -g MyResourceGroup -n MyFunctionApp --generic-configurations "@.\\params.json"
"""
helps['functionapp config show'] = """
type: command
short-summary: Get the details of an existing function app's configuration.
examples:
- name: Get the details of a web app's configuration. (autogenerated)
text: az functionapp config show --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config ssl'] = """
type: group
short-summary: Configure SSL certificates.
"""
helps['functionapp config ssl bind'] = """
type: command
short-summary: Bind an SSL certificate to a function app.
examples:
- name: Bind an SSL certificate to a function app. (autogenerated)
text: az functionapp config ssl bind --certificate-thumbprint {certificate-thumbprint} --name MyFunctionApp --resource-group MyResourceGroup --ssl-type SNI
crafted: true
"""
helps['functionapp config ssl delete'] = """
type: command
short-summary: Delete an SSL certificate from a function app.
"""
helps['functionapp config ssl list'] = """
type: command
short-summary: List SSL certificates for a function app.
examples:
- name: List SSL certificates for a function app. (autogenerated)
text: az functionapp config ssl list --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config ssl show'] = """
type: command
short-summary: Show the details of an SSL certificate for a function app.
examples:
- name: Show the details of an SSL certificate for a function app. (autogenerated)
text: az functionapp config ssl show --resource-group MyResourceGroup --certificate-name cname.mycustomdomain.com
crafted: true
"""
helps['functionapp config ssl unbind'] = """
type: command
short-summary: Unbind an SSL certificate from a function app.
"""
helps['functionapp config ssl upload'] = """
type: command
short-summary: Upload an SSL certificate to a function app.
examples:
- name: Upload an SSL certificate to a function app. (autogenerated)
text: az functionapp config ssl upload --certificate-file {certificate-file} --certificate-password {certificate-password} --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp config ssl import'] = """
type: command
short-summary: Import an SSL certificate to a function app from Key Vault.
examples:
- name: Import an SSL certificate to a function app from Key Vault.
text: az functionapp config ssl import --resource-group MyResourceGroup --name MyFunctionApp --key-vault MyKeyVault --key-vault-certificate-name MyCertificateName
- name: Import an SSL certificate to a function app from Key Vault using resource id (typically if Key Vault is in another subscription).
text: az functionapp config ssl import --resource-group MyResourceGroup --name MyFunctionApp --key-vault '/subscriptions/[sub id]/resourceGroups/[rg]/providers/Microsoft.KeyVault/vaults/[vault name]' --key-vault-certificate-name MyCertificateName
"""
helps['functionapp config ssl create'] = """
type: command
short-summary: Create a Managed Certificate for a hostname in a function app.
examples:
- name: Create a Managed Certificate for cname.mycustomdomain.com.
text: az functionapp config ssl create --resource-group MyResourceGroup --name MyWebapp --hostname cname.mycustomdomain.com
"""
helps['functionapp deployment config'] = """
type: group
short-summary: Manage a function app's deployment configuration.
"""
helps['functionapp deployment config set'] = """
type: command
short-summary: Update an existing function app's deployment configuration.
examples:
- name: Set the function app's deployment storage.
text: az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-storage-name MyStorageAccount --deployment-storage-container-name MyStorageContainer
- name: Set the function app's deployment storage authentication method.
text: az functionapp deployment config set --name MyFunctionApp --resource-group MyResourceGroup --deployment-storage-auth-type userAssignedIdentity --deployment-storage-auth-value myAssignedId
"""
helps['functionapp deployment config show'] = """
type: command
short-summary: Get the details of a function app's deployment configuration.
examples:
- name: Get the details of a function app's deployment configuration.
text: az functionapp deployment config show --name MyFunctionApp --resource-group MyResourceGroup
"""
helps['functionapp runtime'] = """
type: group
short-summary: Manage a function app's runtime.
"""
helps['functionapp runtime config'] = """
type: group
short-summary: Manage a function app's runtime configuration.
"""
helps['functionapp runtime config set'] = """
type: command
short-summary: Update an existing function app's runtime configuration.
examples:
- name: Set the function app's runtime version.
text: az functionapp runtime config set --name MyFunctionApp --resource-group MyResourceGroup --runtime-version 3.11
"""
helps['functionapp runtime config show'] = """
type: command
short-summary: Get the details of a function app's runtime configuration.
examples:
- name: Get the details of a function app's runtime configuration.
text: az functionapp runtime config show --name MyFunctionApp --resource-group MyResourceGroup
"""
helps['functionapp scale'] = """
type: group
short-summary: Manage a function app's scale.
"""
helps['functionapp scale config'] = """
type: group
short-summary: Manage a function app's scale configuration.
"""
helps['functionapp scale config set'] = """
type: command
short-summary: Update an existing function app's scale configuration.
examples:
- name: Set the function app's instance memory configuration.
text: az functionapp scale config set --name MyFunctionApp --resource-group MyResourceGroup --instance-memory 2048
- name: Set the function app's maximum instance count configuration.
text: az functionapp scale config set --name MyFunctionApp --resource-group MyResourceGroup --maximum-instance-count 5
- name: Set the function app's trigger configuration.
text: az functionapp scale config set --name MyFunctionApp --resource-group MyResourceGroup --trigger-type http --trigger-settings perInstanceConcurrency=1
"""
helps['functionapp scale config show'] = """
type: command
short-summary: Get the details of a function app's scale configuration.
examples:
- name: Get the details of a function app's scale configuration.
text: az functionapp scale config show --name MyFunctionApp --resource-group MyResourceGroup
"""
helps['functionapp scale config always-ready'] = """
type: group
short-summary: Manage the always-ready settings in the scale configuration.
"""
helps['functionapp scale config always-ready delete'] = """
type: command
short-summary: Delete always-ready settings in the scale configuration.
examples:
- name: Delete always-ready setings in the scale configuration.
text: az functionapp scale config always-ready delete --name MyFunctionApp --resource-group MyResourceGroup --setting-names key1 key2
"""
helps['functionapp scale config always-ready set'] = """
type: command
short-summary: Add or update existing always-ready settings in the scale configuration.
examples:
- name: Add or update existing always-ready settings in the scale configuration.
text: az functionapp scale config always-ready set --name MyFunctionApp --resource-group MyResourceGroup --settings key1=value1 key2=value2
"""
helps['functionapp cors'] = """
type: group
short-summary: Manage Cross-Origin Resource Sharing (CORS)
"""
helps['functionapp cors add'] = """
type: command
short-summary: Add allowed origins
examples:
- name: add a new allowed origin
text: >
az functionapp cors add -g {myRG} -n {myAppName} --allowed-origins https://myapps.com
"""
helps['functionapp cors remove'] = """
type: command
short-summary: Remove allowed origins
examples:
- name: remove an allowed origin
text: >
az functionapp cors remove -g {myRG} -n {myAppName} --allowed-origins https://myapps.com
- name: remove all allowed origins
text: >
az functionapp cors remove -g {myRG} -n {myAppName} --allowed-origins
"""
helps['functionapp cors show'] = """
type: command
short-summary: show allowed origins
examples:
- name: show allowed origins (autogenerated)
text: az functionapp cors show --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp cors credentials'] = """
type: command
short-summary: Enable or disable access-control-allow-credentials.
examples:
- name: Enable CORS access-control-allow-credentials.
text: az functionapp cors credentials --name MyFunctionApp --resource-group MyResourceGroup --enable true
crafted: true
- name: Disable CORS access-control-allow-credentials.
text: az functionapp cors credentials --name MyFunctionApp --resource-group MyResourceGroup --enable false
crafted: false
"""
helps['functionapp create'] = """
type: command
short-summary: Create a function app.
long-summary: The function app's name must be able to produce a unique FQDN as AppName.azurewebsites.net.
examples:
- name: Create a basic function app.
text: >
az functionapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -s MyStorageAccount
- name: Create a function app. (autogenerated)
text: az functionapp create --consumption-plan-location westus --name MyUniqueAppName --os-type Windows --resource-group MyResourceGroup --runtime dotnet-isolated --storage-account MyStorageAccount
crafted: true
- name: Create a function app using a private ACR image.
text: >
az functionapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime node --storage-account MyStorageAccount --deployment-container-image-name myacr.azurecr.io/myimage:tag --docker-registry-server-password passw0rd --docker-registry-server-user MyUser
- name: Create a flex consumption function app. See https://aka.ms/flex-http-concurrency for more information on default http concurrency values.
text: >
az functionapp create -g MyResourceGroup --name MyUniqueAppName -s MyStorageAccount --flexconsumption-location northeurope --runtime java --instance-memory 2048
"""
helps['functionapp delete'] = """
type: command
short-summary: Delete a function app.
examples:
- name: Delete a function app. (autogenerated)
text: az functionapp delete --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment'] = """
type: group
short-summary: Manage function app deployments.
"""
helps['functionapp deployment user show'] = """
type: command
short-summary: Gets publishing user.
"""
helps['functionapp deployment container'] = """
type: group
short-summary: Manage container-based continuous deployment.
"""
helps['functionapp deployment container config'] = """
type: command
short-summary: Configure continuous deployment via containers.
examples:
- name: Configure continuous deployment via containers (autogenerated)
text: az functionapp deployment container config --enable-cd true --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment container show-cd-url'] = """
type: command
short-summary: Get the URL which can be used to configure webhooks for continuous deployment.
examples:
- name: Get the URL which can be used to configure webhooks for continuous deployment. (autogenerated)
text: az functionapp deployment container show-cd-url --ids {ids}
crafted: true
- name: Get the URL which can be used to configure webhooks for continuous deployment. (autogenerated)
text: az functionapp deployment container show-cd-url --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment list-publishing-credentials'] = """
type: command
short-summary: Get the details for available function app publishing credentials.
examples:
- name: Get the details for available function app deployment publishing credentials.
text: az functionapp deployment list-publishing-credentials --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment list-publishing-profiles'] = """
type: command
short-summary: Get the details for available function app deployment profiles.
examples:
- name: Get the details for available function app deployment profiles. (autogenerated)
text: az functionapp deployment list-publishing-profiles --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment slot'] = """
type: group
short-summary: Manage function app deployment slots.
"""
helps['functionapp deployment slot auto-swap'] = """
type: command
short-summary: Configure deployment slot auto swap.
"""
helps['functionapp deployment slot create'] = """
type: command
short-summary: Create a deployment slot.
examples:
- name: Create a deployment slot. (autogenerated)
text: az functionapp deployment slot create --name MyFunctionapp --resource-group MyResourceGroup --slot staging
crafted: true
"""
helps['functionapp deployment slot delete'] = """
type: command
short-summary: Delete a deployment slot.
examples:
- name: Delete a deployment slot. (autogenerated)
text: az functionapp deployment slot delete --name MyFunctionapp --resource-group MyResourceGroup --slot staging
crafted: true
"""
helps['functionapp deployment slot list'] = """
type: command
short-summary: List all deployment slots.
examples:
- name: List all deployment slots. (autogenerated)
text: az functionapp deployment slot list --name MyFunctionapp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment slot swap'] = """
type: command
short-summary: Swap deployment slots for a function app.
examples:
- name: Swap a staging slot into production for the MyUniqueApp function app.
text: >
az functionapp deployment slot swap -g MyResourceGroup -n MyUniqueApp --slot staging \\
--target-slot production
"""
helps['functionapp deployment source'] = """
type: group
short-summary: Manage function app deployment via source control.
"""
helps['functionapp deployment source config'] = """
type: command
short-summary: Manage deployment from git or Mercurial repositories.
long-summary: Note that the GitHub action password is now redacted in the result. Please use the `az functionapp deployment source show` command to view the GitHub action password.
examples:
- name: Manage deployment from git or Mercurial repositories. (autogenerated)
text: az functionapp deployment source config --branch master --manual-integration --name MyFunctionApp --repo-url https://github.com/Azure-Samples/function-image-upload-resize --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment source config-local-git'] = """
type: command
short-summary: Get a URL for a git repository endpoint to clone and push to for function app deployment.
examples:
- name: Get an endpoint and add it as a git remote.
text: >
az functionapp deployment source config-local-git \\
-g MyResourceGroup -n MyUniqueApp
git remote add azure \\
https://{deploy_user_name}@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git
"""
helps['functionapp deployment source config-zip'] = """
type: command
short-summary: Perform deployment using the kudu zip push deployment for a function app.
long-summary: >
By default Kudu assumes that zip deployments do not require any build-related actions like
npm install or dotnet publish. This can be overridden by including an .deployment file in your
zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true',
to enable Kudu detection logic and build script generation process.
See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview.
Alternately the setting can be enabled using the az functionapp config appsettings set command.
examples:
- name: Perform deployment by using zip file content.
text: >
az functionapp deployment source config-zip \\
-g {myRG} -n {myAppName} \\
--src {zipFilePathLocation}
"""
helps['functionapp deployment source delete'] = """
type: command
short-summary: Delete a source control deployment configuration.
examples:
- name: Delete a source control deployment configuration. (autogenerated)
text: az functionapp deployment source delete --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment source show'] = """
type: command
short-summary: Get the details of a source control deployment configuration.
examples:
- name: Get the details of a source control deployment configuration. (autogenerated)
text: az functionapp deployment source show --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment source sync'] = """
type: command
short-summary: Synchronize from the repository. Only needed under manual integration mode.
examples:
- name: Synchronize from the repository. Only needed under manual integration mode. (autogenerated)
text: az functionapp deployment source sync --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp deployment user'] = """
type: group
short-summary: Manage user credentials for deployment.
"""
helps['functionapp deployment user set'] = """
type: command
short-summary: Update deployment credentials.
long-summary: All function and web apps in the subscription will be impacted since they share the same deployment credentials.
examples:
- name: Set FTP and git deployment credentials for all apps.
text: >
az functionapp deployment user set --user-name MyUserName
"""
helps['functionapp deployment github-actions'] = """
type: group
short-summary: Configure GitHub Actions for a functionapp
"""
helps['functionapp deployment github-actions add'] = """
type: command
short-summary: Add a GitHub Actions workflow file to the specified repository. The workflow will build and deploy your app to the specified functionapp.
examples:
- name: Add GitHub Actions to a specified repository, providing personal access token
text: >
az functionapp deployment github-actions add --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --token MyPersonalAccessToken
- name: Add GitHub Actions to a specified repository, using interactive method of retrieving personal access token
text: >
az functionapp deployment github-actions add --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --login-with-github
"""
helps['functionapp deployment github-actions remove'] = """
type: command
short-summary: Remove and disconnect the GitHub Actions workflow file from the specified repository.
examples:
- name: Remove GitHub Actions from a specified repository, providing personal access token
text: >
az functionapp deployment github-actions remove --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --token MyPersonalAccessToken
- name: Remove GitHub Actions from a specified repository, using interactive method of retrieving personal access token
text: >
az functionapp deployment github-actions remove --repo "githubUser/githubRepo" -g MyResourceGroup -n MyFunctionapp --login-with-github
"""
helps['functionapp function'] = """
type: group
short-summary: Manage function app functions.
"""
helps['functionapp function show'] = """
type: command
short-summary: Get the details of a function.
examples:
- name: Show function details.
text: >
az functionapp function show -g MyResourceGroup -n MyFunctionAppName --function-name MyFunctionName
crafted: true
"""
helps['functionapp function delete'] = """
type: command
short-summary: Delete a function.
examples:
- name: Delete a function.
text: >
az functionapp function delete -g MyResourceGroup -n MyFunctionAppName --function-name MyFunctionName
crafted: true
"""
helps['functionapp function list'] = """
type: command
short-summary: List functions in a function app.
examples:
- name: List functions.
text: >
az functionapp function list -g MyResourceGroup -n MyFunctionAppName
"""
helps['functionapp function keys'] = """
type: group
short-summary: Manage function keys.
"""
helps['functionapp function keys set'] = """
type: command
short-summary: Create or update a function key.
long-summary: Note that key values are now redacted in the result. Please use the `az functionapp function keys list` command to view the key values.
examples:
- name: Create a function key.
text: >
az functionapp function keys set -g MyResourceGroup -n MyFunctionAppName --function-name MyFunctionName --key-name MyKeyName --key-value MyKeyValue
crafted: true
"""
helps['functionapp function keys list'] = """
type: command
short-summary: List all function keys.
examples:
- name: List all function keys.
text: >
az functionapp function keys list -g MyResourceGroup -n MyFunctionAppName --function-name MyFunctionName
crafted: true
"""
helps['functionapp function keys delete'] = """
type: command
short-summary: Delete a function key.
examples:
- name: Delete a function key.
text: >
az functionapp function keys delete -g MyResourceGroup -n MyFunctionAppName --function-name MyFunctionName --key-name MyKeyName
crafted: true
"""
helps['functionapp hybrid-connection'] = """
type: group
short-summary: methods that list, add and remove hybrid-connections from functionapp
"""
helps['functionapp hybrid-connection add'] = """
type: command
short-summary: add an existing hybrid-connection to a functionapp
examples:
- name: add a hybrid-connection to a functionapp
text: az functionapp hybrid-connection add -g MyResourceGroup -n MyWebapp --namespace [HybridConnectionNamespace] --hybrid-connection [HybridConnectionName] -s [slot]
"""
helps['functionapp hybrid-connection list'] = """
type: command
short-summary: list the hybrid-connections on a functionapp
examples:
- name: list the hybrid-connections on a functionapp
text: az functionapp hybrid-connection list -g MyResourceGroup -n MyWebapp -s [slot]
"""
helps['functionapp hybrid-connection remove'] = """
type: command
short-summary: remove a hybrid-connection from a functionapp
examples:
- name: remove a hybrid-connection from a functionapp
text: az functionapp hybrid-connection remove -g MyResourceGroup -n MyWebapp --namespace [HybridConnectionNamespace] --hybrid-connection [HybridConnectionName] -s [slot]
"""
helps['functionapp identity'] = """
type: group
short-summary: manage web app's managed identity
"""
helps['functionapp identity assign'] = """
type: command
short-summary: assign managed identity to the web app
examples:
- name: assign local identity and assign a reader role to the current resource group.
text: >
az functionapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/MyResourceGroup
- name: enable identity for the web app.
text: >
az functionapp identity assign -g MyResourceGroup -n MyUniqueApp
- name: assign local identity and a user assigned identity to a function app.
text: >
az functionapp identity assign -g MyResourceGroup -n MyUniqueApp --identities [system] myAssignedId
"""
helps['functionapp identity remove'] = """
type: command
short-summary: Disable web app's managed identity
examples:
- name: Disable web app's system managed identity
text: az functionapp identity remove --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
- name: Disable web app's system managed identity and a user managed identity
text: az functionapp identity remove --name MyFunctionApp --resource-group MyResourceGroup --identities [system] myAssignedId
"""
helps['functionapp identity show'] = """
type: command
short-summary: display web app's managed identity
examples:
- name: display functionapp's managed identity (autogenerated)
text: az functionapp identity show --name MyFunctionApp --resource-group MyResourceGroup
crafted: true
"""
helps['functionapp keys'] = """
type: group
short-summary: Manage function app keys.
"""
helps['functionapp keys set'] = """
type: command
short-summary: Create or update a function app key.
long-summary: Note that key values are now redacted in the result. Please use the `az functionapp keys list` command to view the key values.
examples:
- name: Create a function key for an Azure Function app.
text: >
az functionapp keys set -g MyResourceGroup -n MyFunctionAppName --key-type functionKeys --key-name MyKeyName --key-value MyKeyValue
crafted: true
"""
helps['functionapp keys list'] = """
type: command
short-summary: List all function app keys.
examples:
- name: List all keys for an Azure Function app.
text: >
az functionapp keys list -g MyResourceGroup -n MyFunctionAppName
crafted: true
"""
helps['functionapp keys delete'] = """
type: command
short-summary: Delete a function app key.
examples:
- name: Delete a master key for an Azure Function app.
text: >
az functionapp keys delete -g MyResourceGroup -n MyFunctionAppName --key-type masterKey --key-name MyKeyName
crafted: true
"""
helps['functionapp list'] = """
type: command
short-summary: List function apps.
examples:
- name: List all function apps in MyResourceGroup.
text: >
az functionapp list --resource-group MyResourceGroup
- name: List default host name and state for all function apps.
text: >
az functionapp list --query "[].{hostName: defaultHostName, state: state}"
- name: List all running function apps.
text: >
az functionapp list --query "[?state=='Running']"
"""
helps['functionapp list-consumption-locations'] = """
type: command
short-summary: List available locations for running function apps.
"""
helps['functionapp list-flexconsumption-locations'] = """
type: command
short-summary: List available locations for running function apps on the Flex Consumption plan.
"""
helps['functionapp list-flexconsumption-runtimes'] = """
type: command
short-summary: List available built-in stacks which can be used for function apps on the Flex Consumption plan.
"""
helps['functionapp flex-migration'] = """
type: group
short-summary: Manage migration of Linux Consumption function apps to the Flex Consumption plan.
"""
helps['functionapp flex-migration start'] = """
type: command
short-summary: Create a Flex Consumption app with the same settings as the provided Linux Consumption function app.
examples:
- name: Migrate a Linux Consumption function app to the Flex Consumption plan.
text: >
az functionapp flex-migration start --source-name MyLinuxConsumptionApp --source-resource-group MyLinuxConsumptionResourceGroup --name MyFunctionApp --resource-group MyResourceGroup --storage-account MyStorageAccount
- name: Migrate a Linux Consumption function app to the Flex Consumption plan without migrating managed identity configurations.
text: >
az functionapp flex-migration start --source-name MyLinuxConsumptionApp --source-resource-group MyLinuxConsumptionResourceGroup --name MyFunctionApp --resource-group MyResourceGroup --storage-account MyStorageAccount --skip-managed-identities