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
2130 lines (1894 loc) · 99 KB
/
_help.py
File metadata and controls
2130 lines (1894 loc) · 99 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['sql'] = """
type: group
short-summary: Manage Azure SQL Databases and Data Warehouses.
"""
helps['sql db'] = """
type: group
short-summary: Manage databases.
"""
helps['sql db advanced-threat-protection-setting'] = """
type: group
short-summary: Manage a database's advanced threat protection setting.
"""
helps['sql db advanced-threat-protection-setting update'] = """
type: command
short-summary: Update a database's advanced threat protection setting.
parameters:
- name: --state
type: string
short-summary: 'State of the advanced threat protection setting'
examples:
- name: Disable an advanced threat protection setting.
text: az sql db advanced-threat-protection-setting update -g mygroup -s myserver -n mydb --state Disabled
"""
helps['sql db audit-policy'] = """
type: group
short-summary: Manage a database's auditing policy.
"""
helps['sql db audit-policy wait'] = """
type: command
short-summary: Place the CLI in a waiting state until a condition of the database's audit policy is met.
examples:
- name: Place the CLI in a waiting state until it determines that database's audit policy exists
text: az sql db audit-policy wait -g mygroup -s myserver -n mydb --exists
"""
helps['sql db audit-policy update'] = """
type: command
short-summary: Update a database's auditing policy.
long-summary: If the policy is being enabled, `--storage-account` or both `--storage-endpoint` and `--storage-key` must be specified.
examples:
- name: Enable by storage account name.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \\
--bsts Enabled --storage-account mystorage
- name: Enable by storage endpoint and key.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \\
--bsts Enabled --storage-endpoint https://mystorage.blob.core.windows.net \\
--storage-key MYKEY==
- name: Set the list of audit actions.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb \\
--actions FAILED_DATABASE_AUTHENTICATION_GROUP 'UPDATE on database::mydb by public'
- name: Disable an auditing policy.
text: az sql db audit-policy update -g mygroup -s myserver -n mydb --state Disabled
- name: Disable a blob storage auditing policy.
text: az sql db audit-policy update -g mygroup -s myserver -n mydb --bsts Disabled
- name: Enable a log analytics auditing policy.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \\
--lats Enabled --lawri myworkspaceresourceid
- name: Disable a log analytics auditing policy.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb
--lats Disabled
- name: Enable an event hub auditing policy.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \\
--event-hub-target-state Enabled \\
--event-hub-authorization-rule-id eventhubauthorizationruleid \\
--event-hub eventhubname
- name: Enable an event hub auditing policy for default event hub.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \\
--event-hub-target-state Enabled \\
--event-hub-authorization-rule-id eventhubauthorizationruleid
- name: Disable an event hub auditing policy.
text: |
az sql db audit-policy update -g mygroup -s myserver -n mydb
--event-hub-target-state Disabled
"""
helps['sql db copy'] = """
type: command
short-summary: Create a copy of a database.
long-summary: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. The copy destination database must have the same edition as the source database, but you can change the edition after the copy has completed.
examples:
- name: Create a database with performance level S0 as a copy of an existing Standard database.
text: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb --service-objective S0
- name: Create a database with GeneralPurpose edition, Gen4 hardware, and 1 vcore as a copy of an existing GeneralPurpose database.
text: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb -f Gen4 -c 1
- name: Create a database with local backup storage redundancy as a copy of an existing database
text: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb --backup-storage-redundancy Local
"""
helps['sql db create'] = """
type: command
short-summary: Create a database.
long-summary: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`.
examples:
- name: Create a Standard S0 database.
text: az sql db create -g mygroup -s myserver -n mydb --service-objective S0
- name: Create a database with GeneralPurpose edition, Gen4 hardware and 1 vcore
text: az sql db create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1
- name: Create a database with zone redundancy enabled
text: az sql db create -g mygroup -s myserver -n mydb -z
- name: Create a database with zone redundancy explicitly disabled
text: az sql db create -g mygroup -s myserver -n mydb -z false
- name: Create a GeneralPurpose Gen5 2 vcore serverless database with auto pause delay of 120 minutes
text: az sql db create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen5 -c 2 --compute-model Serverless --auto-pause-delay 120
- name: Create a Hyperscale Gen5 2 vcore database with 2 read replicas
text: az sql db create -g mygroup -s myserver -n mydb -e Hyperscale -f Gen5 -c 2 --read-replicas 2
- name: Create a GeneralPurpose database with locally redundant backup storage
text: az sql db create -g mygroup -s myserver -n mydb -e GeneralPurpose --backup-storage-redundancy Local
- name: Create a database with VBS enclave enabled.
text: az sql db create -g mygroup -s myserver -n mydb --preferred-enclave-type VBS
- name: Create a database with free limit applied
text: az sql db create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen5 -c 2 --compute-model Serverless --use-free-limit --free-limit-exhaustion-behavior AutoPause
"""
helps['sql db delete'] = """
type: command
short-summary: Delete a database.
examples:
- name: Delete a database. (autogenerated)
text: az sql db delete --name MyAzureSQLDatabase --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db export'] = """
type: command
short-summary: Export a database to a bacpac.
examples:
- name: Get an SAS key for use in export operation.
text: |
az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \\
--permissions rw --expiry 2018-01-01T00:00:00Z
- name: Export bacpac using an SAS key.
text: |
az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \\
--storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \\
--storage-key-type SharedAccessKey \\
--storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac
- name: Export bacpac using a storage account key.
text: |
az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \\
--storage-key MYKEY== --storage-key-type StorageAccessKey \\
--storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac
"""
helps['sql db import'] = """
type: command
short-summary: Imports a bacpac into a new database, or an existing empty database.
examples:
- name: Get an SAS key for use in import operation.
text: |
az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \\
--permissions rw --expiry 2018-01-01T00:00:00Z
- name: Import bacpac into an existing database using an SAS key.
text: |
az sql db import -s myserver -n mydatabase -g mygroup -p password -u login \\
--storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \\
--storage-key-type SharedAccessKey \\
--storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac
- name: Import bacpac into an existing database using a storage account key.
text: |
az sql db import -s myserver -n mydatabase -g mygroup -p password -u login --storage-key MYKEY== \\
--storage-key-type StorageAccessKey \\
--storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac
"""
helps['sql db list'] = """
type: command
short-summary: List databases on a server or elastic pool.
examples:
- name: List databases on a server or elastic pool. (autogenerated)
text: az sql db list --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db list-editions'] = """
type: command
short-summary: Show database editions available for the currently active subscription.
long-summary: Includes available service objectives and storage limits. In order to reduce verbosity, settings to intentionally reduce storage limits are hidden by default.
examples:
- name: Show all database editions in a location.
text: az sql db list-editions -l westus -o table
- name: Show all available database service objectives for Standard edition.
text: az sql db list-editions -l westus --edition Standard -o table
- name: Show available max database sizes for P1 service objective
text: az sql db list-editions -l westus --service-objective P1 --show-details max-size
"""
helps['sql db str-policy'] = """
type: group
short-summary: Manage SQL database short term retention policy.
"""
helps['sql db str-policy set'] = """
type: command
short-summary: Update short term retention settings for a live database.
examples:
- name: Set short term retention for a live database.
text: az sql db str-policy set -g mygroup -s myserver -n mydb --retention-days retentionindays --diffbackup-hours diffbackuphours
"""
helps['sql db str-policy show'] = """
type: command
short-summary: Show the short term retention policy for a live database.
examples:
- name: Show short term retention policy for a live database.
text: az sql db str-policy show -g mygroup -s myserver -n mydb
"""
helps['sql db str-policy wait'] = """
type: command
short-summary: Place the CLI in a waiting state until the policy is set.
"""
helps['sql db ltr-policy'] = """
type: group
short-summary: Manage SQL database long term retention policy.
"""
helps['sql db ltr-policy set'] = """
type: command
short-summary: Update long term retention settings for a database.
examples:
- name: Set long term retention for a database.
text: az sql db ltr-policy set -g mygroup -s myserver -n mydb --weekly-retention "P1W" --monthly-retention "P6M" --yearly-retention "P1Y" --week-of-year 26 --make-backups-immutable Enabled
- name: Set long term retention for a database with time based immutability enabled and immutability mode locked.
text: az sql db ltr-policy set -g mygroup -s myserver -n mydb --weekly-retention "P0W" --monthly-retention "P0M" --yearly-retention "P0Y" --tb-immutability Enabled --tb-immutability-mode Locked
"""
helps['sql db ltr-policy show'] = """
type: command
short-summary: Show the long term retention policy for a database.
examples:
- name: Show long term retention policy for a database.
text: az sql db ltr-policy show -g mygroup -s myserver -n mydb
"""
helps['sql db ltr-backup'] = """
type: group
short-summary: Manage SQL database long term retention backups.
"""
helps['sql db ltr-backup show'] = """
type: command
short-summary: Get a long term retention backup for a database.
examples:
- name: Show long term retention backup for a database.
text: az sql db ltr-backup show -l southeastasia -s myserver -d mydb -n "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000;Hot"
"""
helps['sql db ltr-backup list'] = """
type: command
short-summary: List the long term retention backups for a location, server or database.
examples:
- name: List long term retention backups for a database.
text: az sql db ltr-backup list -l southeastasia -s myserver -d mydb
- name: List long term retention backups for a server (list only the latest LTR backups, which belong to live databases).
text: az sql db ltr-backup list -l southeastasia -s myserver --database-state Live --only-latest-per-database True
- name: List long term retention backups for a server (with resource group argument).
text: az sql db ltr-backup list -l southeastasia -g mygroup -s myserver
- name: List long term retention backups for a location (list only the latest LTR backups, which belong to live databases).
text: az sql db ltr-backup list -l southeastasia --database-state Live --only-latest-per-database True
- name: List long term retention backups for a location (with resource group argument).
text: az sql db ltr-backup list -l southeastasia -g mygroup
"""
helps['sql db ltr-backup delete'] = """
type: command
short-summary: Delete a long term retention backup.
examples:
- name: Delete long term retention backup for database.
text: az sql db ltr-backup delete -l southeastasia -s myserver -d mydb -n "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
"""
helps['sql db ltr-backup restore'] = """
type: command
short-summary: Restore a long term retention backup to a new database.
examples:
- name: Restore LTR backup.
text: |
az sql db ltr-backup restore \\
--dest-database targetdb --dest-server myserver --dest-resource-group mygroup \\
--backup-id "/subscriptions/6caa113c-794c-42f8-ab9d-878d8aa104dc/resourceGroups/mygroup/providers/Microsoft.Sql/locations/southeastasia/longTermRetentionServers/myserver/longTermRetentionDatabases/sourcedb/longTermRetentionBackups/3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
"""
helps['sql db ltr-backup wait'] = """
type: command
short-summary: Place the CLI in a waiting state until a condition of the database is met.
"""
helps['sql db ltr-backup set-legal-hold-immutability'] = """
type: command
short-summary: Set a legal hold on the long term retention backup database.
examples:
- name: Set legal hold on a long term retention backup for a database.
text: az sql db ltr-backup set-legal-hold-immutability -g mygroup -l southeastasia -s myserver -d mydb -n "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
"""
helps['sql db ltr-backup remove-legal-hold-immutability'] = """
type: command
short-summary: Remove a legal hold on the long term retention backup database.
examples:
- name: remove a legal hold on a long term retention backup for a database.
text: az sql db ltr-backup remove-legal-hold-immutability -g mygroup -l southeastasia -s myserver -d mydb -n "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
"""
helps['sql db ltr-backup lock-time-based-immutability'] = """
type: command
short-summary: Lock the time based immutability on a long term retention backup to prevent deletion.
examples:
- name: lock the long term retention backup for a database.
text: az sql db ltr-backup lock-time-based-immutability -g mygroup -l southeastasia -s myserver -d mydb -n "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
"""
helps['sql db ltr-backup remove-time-based-immutability'] = """
type: command
short-summary: disable the time based immutability on a long term retention backup.
examples:
- name: disable a time based immutability on a long term retention backup for a database.
text: az sql db ltr-backup remove-time-based-immutability -g mygroup -l southeastasia -s myserver -d mydb -n "3214b3fb-fba9-43e7-96a3-09e35ffcb336;132292152080000000"
"""
helps['sql db geo-backup'] = """
type: group
short-summary: Manage SQL database geo redundant backups.
"""
helps['sql db geo-backup show'] = """
type: command
short-summary: Gets a recoverable database, which is a resource representing a database's geo backup.
examples:
- name: Gets a recoverable database, which represents a database's geo backup.
text: az sql db geo-backup show --server myserver --database mydb --resource-group mygroup
"""
helps['sql db geo-backup list'] = """
type: command
short-summary: Gets a list of recoverable databases.
examples:
- name: Gets a list of recoverable databases.
text: az sql db geo-backup list -s myserver -g mygroup
"""
helps['sql db geo-backup restore'] = """
type: command
short-summary: Restore a geo-redundant backup to a new database.
examples:
- name: Restore Geo-redundant backup.
text: |
az sql db geo-backup restore \\
--dest-database targetdb --dest-server myserver --resource-group mygroup \\
--geo-backup-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup/providers/Microsoft.Sql/servers/myserver/databases/mydb/geoBackupPolicies/Default"
"""
helps['sql db op'] = """
type: group
short-summary: Manage operations on a database.
"""
helps['sql db op cancel'] = """
type: command
examples:
- name: Cancel an operation.
text: az sql db op cancel -g mygroup -s myserver -d mydb -n d2896mydb-2ba8-4c84-bac1-387c430cce40
"""
helps['sql mi op cancel'] = """
type: command
examples:
- name: Cancel an operation.
text: az sql mi op cancel -g mygroup --mi myManagedInstance -n d2896mydb-2ba8-4c84-bac1-387c430cce40
"""
helps['sql db rename'] = """
type: command
short-summary: Rename a database.
examples:
- name: Rename a database. (autogenerated)
text: az sql db rename --name MyAzureSQLDatabase --new-name MyNew --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db replica'] = """
type: group
short-summary: Manage replication between databases.
"""
helps['sql db replica create'] = """
type: command
short-summary: Create a database as a readable secondary replica of an existing database.
long-summary: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. The secondary database must have the same edition as the primary database.
examples:
- name: Create a database with performance level S0 as a secondary replica of an existing Standard database.
text: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb --service-objective S0
- name: Create a database with GeneralPurpose edition, Gen4 hardware, and 1 vcore as a secondary replica of an existing GeneralPurpose database
text: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb -f Gen4 -c 1
- name: Create a database with with zone redundant backup storage as a secondary replica of an existing database.
text: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb --backup-storage-redundancy Zone
"""
helps['sql db replica delete-link'] = """
type: command
short-summary: Permanently stop data replication between two database replicas.
"""
helps['sql db replica list-links'] = """
type: command
short-summary: List the replicas of a database and their replication status.
examples:
- name: List the replicas of a database and their replication status. (autogenerated)
text: az sql db replica list-links --name MyAzureSQLDatabase --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db replica set-primary'] = """
type: command
short-summary: Set the primary replica database by failing over from the current primary replica database.
examples:
- name: Set the primary replica database by failing over from the current primary replica database. (autogenerated)
text: az sql db replica set-primary --allow-data-loss --name MyDatabase --resource-group MyResourceGroup --server myserver --subscription MySubscription
crafted: true
"""
helps['sql db restore'] = """
type: command
short-summary: Create a new database by restoring from a backup.
examples:
- name: Create a new database by restoring from a backup. (autogenerated)
text: |
az sql db restore --dest-name MyDest --edition GeneralPurpose --name MyAzureSQLDatabase --resource-group MyResourceGroup --server myserver --subscription MySubscription --time "2018-05-20T05:34:22"
crafted: true
- name: Create a new database with geo-redundant backup storage by restoring from a backup. (autogenerated)
text: |
az sql db restore --dest-name MyDest --edition GeneralPurpose --name MyAzureSQLDatabase --resource-group MyResourceGroup --server myserver --subscription MySubscription --time "2018-05-20T05:34:22" --backup-storage-redundancy Geo
"""
helps['sql db show'] = """
type: command
short-summary: Get the details for a database.
examples:
- name: Get the details for a database. (autogenerated)
text: az sql db show --name MyAzureSQLDatabase --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db show-deleted'] = """
type: command
short-summary: Get the details for a deleted database.
examples:
- name: Get the details for a deleted database. (autogenerated)
text: az sql db show-deleted --resource-group MyResourceGroup --server myserver --restorable-dropped-database-id "MyAzureSQLDatabase,133203966918270000"
crafted: true
"""
helps['sql db show-connection-string'] = """
type: command
short-summary: Generates a connection string to a database.
examples:
- name: Generate connection string for ado.net
text: az sql db show-connection-string -s myserver -n mydb -c ado.net
"""
helps['sql db tde'] = """
type: group
short-summary: Manage a database's transparent data encryption.
"""
helps['sql db tde set'] = """
type: command
short-summary: Sets a database's transparent data encryption configuration.
examples:
- name: Sets a database's transparent data encryption configuration. (autogenerated)
text: az sql db tde set --database mydb --resource-group MyResourceGroup --server myserver --status Enabled
crafted: true
"""
helps['sql db tde key'] = """
type: group
short-summary: Manage a database's encryption protector.
"""
helps['sql db tde key revalidate'] = """
type: command
short-summary: Revalidates a database's encryption protector key.
examples:
- name: Revalidates a database's encryption protector key. (autogenerated)
text: az sql db tde key revalidate --database mydb --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db tde key revert'] = """
type: command
short-summary: Reverts a database's encryption protector key to server level.
examples:
- name: Reverts a database's encryption protector key to server level. (autogenerated)
text: az sql db tde key revert --database mydb --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql db threat-policy'] = """
type: group
short-summary: Manage a database's threat detection policies.
"""
helps['sql db threat-policy update'] = """
type: command
short-summary: Update a database's threat detection policy.
long-summary: If the policy is being enabled, storage_account or both storage_endpoint and storage_account_access_key must be specified.
examples:
- name: Enable by storage account name.
text: |
az sql db threat-policy update -g mygroup -s myserver -n mydb \\
--state Enabled --storage-account mystorage
- name: Enable by storage endpoint and key.
text: |
az sql db threat-policy update -g mygroup -s myserver -n mydb \\
--state Enabled --storage-endpoint https://mystorage.blob.core.windows.net \\
--storage-key MYKEY==
- name: Disable a subset of alert types.
text: |
az sql db threat-policy update -g mygroup -s myserver -n mydb \\
--disabled-alerts Sql_Injection_Vulnerability Access_Anomaly
- name: Configure email recipients for a policy.
text: |
az sql db threat-policy update -g mygroup -s myserver -n mydb \\
--email-addresses me@examlee.com you@example.com \\
--email-account-admins Enabled
- name: Disable a threat policy.
text: az sql db threat-policy update -g mygroup -s myserver -n mydb --state Disabled
"""
helps['sql db update'] = """
type: command
short-summary: Update a database.
examples:
- name: Update a database to Standard edition, S0 performance level (10 DTU) by specifying DTU capacity. Note that GeneralPurpose allows a wider range of max size than Standard edition.
text: az sql db update -g mygroup -s myserver -n mydb --edition Standard --capacity 10 --max-size 250GB
- name: Update a database to Standard edition, S1 performance level (20 DTU) by specifying performance level name. Note that GeneralPurpose allows a wider range of max size than Standard edition.
text: az sql db update -g mygroup -s myserver -n mydb --edition Standard --service-objective S1 --max-size 250GB
- name: Update a database to GeneralPurpose edition, 4 vcores with Gen5 hardware
text: az sql db update -g mygroup -s myserver -n mydb --edition GeneralPurpose --capacity 4 --family Gen5
- name: Update database with increased max size
text: az sql db update -g mygroup -s myserver -n mydb --max-size 500GB
- name: Update database with zone redundancy enabled
text: az sql db update -g mygroup -s myserver -n mydb -z
- name: Update database with zone redundancy explicitly disabled
text: az sql db update -g mygroup -s myserver -n mydb -z false
- name: Update database to serverless compute model
text: az sql db update -g mygroup -s myserver -n mydb --edition GeneralPurpose --capacity 2 --family Gen5 --compute-model Serverless
- name: Update database with locally redundant backup storage
text: az sql db update -g mygroup -s myserver -n mydb --backup-storage-redundancy Local
- name: Update database with VBS enclave enabled.
text: az sql db update -g mygroup -s myserver -n mydb --preferred-enclave-type VBS
- name: Update exhaustion behavior of free limit database to BillOverUsage
text: az sql db update -g mygroup -s myserver -n mydb --free-limit-exhaustion-behavior BillOverUsage
- name: Update a database to Hyperscale edition, 2 vcores with Gen5 hardware, with manual cutover option
text: az sql db update -g mygroup -s myserver -n mydb --edition Hyperscale --service-objective HS_Gen5_2 --manual-cutover
- name: Trigger cutover with perform cutover option when update database to Hyperscale edition is in progress
text: az sql db update -g mygroup -s myserver -n mydb --perform-cutover
"""
helps['sql dw'] = """
type: group
short-summary: Manage data warehouses.
"""
helps['sql dw create'] = """
type: command
short-summary: Create a data warehouse.
examples:
- name: Create a data warehouse. (autogenerated)
text: az sql dw create --name MyDataWarehouse --resource-group MyResourceGroup --server myserver --service-objective S0
crafted: true
"""
helps['sql dw delete'] = """
type: command
short-summary: Delete a data warehouse.
examples:
- name: Delete a data warehouse. (autogenerated)
text: az sql dw delete --name MyDataWarehouse --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql dw list'] = """
type: command
short-summary: List data warehouses for a server.
examples:
- name: List data warehouses for a server. (autogenerated)
text: az sql dw list --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql dw show'] = """
type: command
short-summary: Get the details for a data warehouse.
examples:
- name: Get the details for a data warehouse. (autogenerated)
text: az sql dw show --name MyDataWarehouse --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql dw update'] = """
type: command
short-summary: Update a data warehouse.
examples:
- name: Update a data warehouse. (autogenerated)
text: az sql dw update --name MyDataWarehouse --resource-group MyResourceGroup --server myserver --service-objective S1
crafted: true
"""
helps['sql elastic-pool'] = """
type: group
short-summary: Manage elastic pools.
"""
helps['sql elastic-pool create'] = """
type: command
short-summary: Create an elastic pool.
examples:
- name: Create elastic pool with zone redundancy enabled
text: az sql elastic-pool create -g mygroup -s myserver -n mypool -z
- name: Create elastic pool with zone redundancy explicitly disabled
text: az sql elastic-pool create -g mygroup -s myserver -n mypool -z false
- name: Create a Standard 100 DTU elastic pool.
text: az sql elastic-pool create -g mygroup -s myserver -n mydb -e Standard -c 100
- name: Create an elastic pool with GeneralPurpose edition, Gen4 hardware and 1 vcore.
text: az sql elastic-pool create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1
- name: Create an elastic pool with Hyperscale edition, Gen5 hardware, 4 vcore and 2 high availability replicas.
text: az sql elastic-pool create -g mygroup -s myserver -n mydb -e Hyperscale -f Gen5 -c 4 --ha-replicas 2
- name: Create an elastic pool with VBS enclave.
text: az sql elastic-pool create -g mygroup -s myserver -n mydb --preferred-enclave-type VBS
"""
helps['sql elastic-pool list-editions'] = """
type: command
short-summary: List elastic pool editions available for the active subscription.
long-summary: Also includes available pool DTU settings, storage limits, and per database settings. In order to reduce verbosity, additional storage limits and per database settings are hidden by default.
examples:
- name: Show all elastic pool editions and pool DTU limits in the West US region.
text: az sql elastic-pool list-editions -l westus -o table
- name: Show all pool DTU limits for Standard edition in the West US region.
text: az sql elastic-pool list-editions -l westus --edition Standard -o table
- name: Show available max sizes for elastic pools with at least 100 DTUs in the West US region.
text: az sql elastic-pool list-editions -l westus --dtu 100 --show-details max-size -o table
- name: Show available per database settings for Standard 100 DTU elastic pools in the West US region.
text: az sql elastic-pool list-editions -l westus --edition Standard --dtu 100 -o table --show-details db-min-dtu db-max-dtu db-max-size
"""
helps['sql elastic-pool op'] = """
type: group
short-summary: Manage operations on an elastic pool.
"""
helps['sql elastic-pool op cancel'] = """
type: command
examples:
- name: Cancel an operation.
text: az sql elastic-pool op cancel -g mygroup -s myserver --elastic-pool myelasticpool -n d2896mydb-2ba8-4c84-bac1-387c430cce40
"""
helps['sql elastic-pool update'] = """
type: command
short-summary: Update an elastic pool.
examples:
- name: Update elastic pool with zone redundancy enabled
text: az sql elastic-pool update -g mygroup -s myserver -n mypool -z
- name: Update elastic pool with zone redundancy explicitly disabled
text: az sql elastic-pool update -g mygroup -s myserver -n mypool -z false
- name: Update elastic pool with 2 high availability replicas
text: az sql elastic-pool update -g mygroup -s myserver -n mypool --ha-replicas 2
- name: Update elastic pool with VBS enclave
text: az sql elastic-pool update -g mygroup -s myserver -n mypool --preferred-enclave-type VBS
"""
helps['sql failover-group'] = """
type: group
short-summary: Manage SQL Failover Groups.
"""
helps['sql failover-group create'] = """
type: command
short-summary: Creates a failover group.
examples:
- name: Creates a failover group. (autogenerated)
text: az sql failover-group create --name MyFailoverGroup --partner-server newDb --resource-group MyResourceGroup --server myserver --subscription MySubscription
crafted: true
"""
helps['sql failover-group set-primary'] = """
type: command
short-summary: Set the primary of the failover group by failing over all databases from the current primary server.
examples:
- name: Set the primary of the failover group by failing over all databases from the current primary server. (autogenerated)
text: az sql failover-group set-primary --name MyFailoverGroup --resource-group MyResourceGroup --server myserver
crafted: true
"""
helps['sql failover-group update'] = """
type: command
short-summary: Updates the failover group.
"""
helps['sql instance-failover-group'] = """
type: group
short-summary: Manage SQL Instance Failover Groups.
"""
helps['sql instance-failover-group create'] = """
type: command
short-summary: Creates an instance failover group between two connected managed instances.
long-summary: If an outage occurs on the primary server, the grace period indicates that Azure SQL Managed Database will not initiate automatic failover before the grace period expires. Please note that failover operation with --allow-data-loss option might cause data loss due to the nature of asynchronous synchronization.
"""
helps['sql instance-failover-group set-primary'] = """
type: command
short-summary: Set the primary of the instance failover group by failing over all databases from the current primary managed instance.
"""
helps['sql instance-failover-group update'] = """
type: command
short-summary: Updates the instance failover group.
"""
helps['sql instance-pool'] = """
type: group
short-summary: Manage instance pools.
"""
helps['sql instance-pool create'] = """
type: command
short-summary: Create an instance pool.
examples:
- name: Example to create an instance pool (include --no-wait in the end to get an asynchronous experience)
text: az sql instance-pool create -g resource_group_name -n instance_pool_name -l location --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --license-type LicenseIncluded --capacity 8 -e GeneralPurpose -f Gen5 -m SQL_{Region}_{MaintenanceConfigName} --no-wait
- name: Example to create an instance pool with subnet name and vnet-name
text: az sql instance-pool create --license-type LicenseIncluded -l northcentralus -n myinstancepool -c 8 -e GeneralPurpose -f Gen5 -g billingPools --subnet mysubnetname --vnet-name myvnetname
"""
helps['sql instance-pool delete'] = """
type: command
short-summary: Delete an instance pool.
examples:
- name: Delete an instance pool
text: az sql instance-pool delete -g mygroup -n myinstancepool --yes
"""
helps['sql instance-pool list'] = """
type: command
short-summary: List available instance pools.
examples:
- name: List all instance pools in the current subscription.
text: az sql instance-pool list
- name: List all instance pools in a resource group.
text: az sql instance-pool list -g mygroup
"""
helps['sql instance-pool show'] = """
type: command
short-summary: Get the details for an instance pool.
examples:
- name: Get the details for an instance pool
text: az sql instance-pool show -g mygroup -n myinstancepool
"""
helps['sql instance-pool update'] = """
type: command
short-summary: Update an instance pool.
examples:
- name: Update an instance pool with new tags (make sure they are space separated if there are multiple tags)
text: az sql instance-pool update -n myinstancepool -g mygroup --tags mykey1=myvalue1 mykey2=myvalue2 --license-type LicenseIncluded --capacity 8 -e GeneralPurpose -f Gen5 -m SQL_{Region}_{MaintenanceConfigName}
- name: Clear the tags assigned to an instance pool
text: az sql instance-pool update -n myinstancepool -g mygroup --tags ""
"""
helps['sql instance-pool wait'] = """
type: command
short-summary: Wait for an instance pool to reach a desired state.
examples:
- name: Wait until an instance pool gets created.
text: az sql instance-pool wait -n myinstancepool -g mygroup --created
"""
helps['sql stg'] = """
type: group
short-summary: Manage Server Trust Groups.
"""
helps['sql stg create'] = """
type: command
short-summary: Create a Server Trust Group.
examples:
- name: Create a Server Trust Group with specified resource ids of its members.
text: az sql stg create -g resourcegroup -l location -n stg-name --trust-scope GlobalTransactions -m $mi1-id $mi2-id
"""
helps['sql stg show'] = """
type: command
short-summary: Retrieve a Server Trust Group.
examples:
- name: Retrieve a Server Trust Group.
text: az sql stg show -g resourcegroup -l location -n stg-name
"""
helps['sql stg delete'] = """
type: command
short-summary: Delete a Server Trust Group.
examples:
- name: Delete a Server Trust Group.
text: az sql stg delete -g resourcegroup -l location -n stg-name
"""
helps['sql stg list'] = """
type: command
short-summary: Retrieve a list of Server Trust Groups.
examples:
- name: Retrieve a list of Server Trust Groups by instance.
text: az sql stg list -g resourcegroup --instance-name mi1-name
- name: Retrieve a list of Server Trust Groups by location.
text: az sql stg list -g resourcegroup -l location
"""
helps['sql mi'] = """
type: group
short-summary: Manage SQL Managed Instances.
"""
helps['sql mi ad-admin'] = """
type: group
short-summary: Manage a managed instance's Active Directory administrator.
"""
helps['sql mi ad-admin create'] = """
type: command
short-summary: Creates a new managed instance Active Directory administrator.
"""
helps['sql mi ad-admin delete'] = """
type: command
short-summary: Deletes an existing managed instance Active Directory Administrator.
"""
helps['sql mi ad-admin list'] = """
type: command
short-summary: Returns a list of managed instance Active Directory Administrators.
"""
helps['sql mi ad-admin update'] = """
type: command
short-summary: Updates an existing managed instance Active Directory administrator.
"""
helps['sql mi ad-only-auth'] = """
type: group
short-summary: Manage a Managed Instance's Azure Active Directory only settings.
"""
helps['sql mi ad-only-auth enable'] = """
type: command
short-summary: Enable Azure Active Directory only Authentication for this Managed Instance.
examples:
- name: Enable Active Directory only authentication for a managed instance
text: az sql mi ad-only-auth enable --resource-group mygroup --name myMI
"""
helps['sql mi ad-only-auth disable'] = """
type: command
short-summary: Disable Azure Active Directory only Authentication for this Managed Instance.
examples:
- name: Disable Active Directory only authentication for a managed instance
text: az sql mi ad-only-auth disable --resource-group mygroup --name myMI
"""
helps['sql mi ad-only-auth get'] = """
type: command
short-summary: Get a specific Azure Active Directory only Authentication property.
examples:
- name: Get Active Directory only authentication status for a managed instance
text: az sql mi ad-only-auth get --resource-group mygroup --name myMI
"""
helps['sql mi create'] = """
type: command
short-summary: Create a managed instance.
examples:
- name: Create a managed instance with minimal set of parameters
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName}
- name: Create a managed instance with specified parameters and with identity
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --license-type LicenseIncluded --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --capacity 8 --storage 32GB --edition GeneralPurpose --family Gen5
- name: Create managed instance with specified parameters and tags
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --license-type LicenseIncluded --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --capacity 8 --storage 32GB --edition GeneralPurpose --family Gen5 --tags tagName1=tagValue1 tagName2=tagValue2
- name: Create managed instance with specified parameters and backup storage redundancy specified
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --license-type LicenseIncluded --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --capacity 8 --storage 32GB --edition GeneralPurpose --family Gen5 --backup-storage-redundancy Local
- name: Create a managed instance with maintenance configuration
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -m SQL_{Region}_{MaintenanceConfigName}
- name: Create a managed instance with Service Principal enabled
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --service-principal-type SystemAssigned
- name: Create a managed instance without SQL Admin, with AAD admin and AD Only enabled
text: az sql mi create --enable-ad-only-auth --external-admin-principal-type User --external-admin-name myUserName --external-admin-sid c5e964e2-6bb2-2222-1111-3b16ec0e1234 -g myResourceGroup -n miName --subnet /subscriptions/78975f9f-2222-1111-1111-29c42ac70000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet-test/subnets/ManagedInstance
- name: Create a managed instance without SQL Admin, with AD admin, AD Only enabled, User ManagedIdenties and Identity Type is SystemAssigned,UserAssigned.
text: az sql mi create --enable-ad-only-auth --external-admin-principal-type User --external-admin-name myUserName \\
--external-admin-sid c5e964e2-6bb2-1111-1111-3b16ec0e1234 -g myResourceGroup -n myServer -i \\
--user-assigned-identity-id /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi \\
--identity-type SystemAssigned,UserAssigned --pid /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi \\
--subnet /subscriptions/78975f9f-2222-1111-1111-29c42ac70000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet-test/subnets/ManagedInstance
- name: Create a managed instance without SQL Admin, with AD admin, AD Only enabled, User ManagedIdenties and Identity Type is UserAssigned.
text: az sql mi create --enable-ad-only-auth --external-admin-principal-type User --external-admin-name myUserName \\
--external-admin-sid c5e964e2-6bb2-1111-1111-3b16ec0e1234 -g myResourceGroup -n myServer -i \\
--user-assigned-identity-id /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi \\
--identity-type UserAssigned --pid /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testumi \\
--subnet /subscriptions/78975f9f-2222-1111-1111-29c42ac70000/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet-test/subnets/ManagedInstance
- name: Create managed instance with enabled zone redundancy
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -z
- name: Create managed instance with zone redundancy explicitly disabled
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -z false
- name: Create managed instance with instance pool name
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --instance-pool-name myinstancepool
- name: Create managed instance with database format and pricing model
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --database-format AlwaysUpToDate --pricing-model Regular
- name: Create managed instance with dns zone partner
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --dns-zone-partner dns
- name: Create managed instance which uses Windows authentication metadata mode
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --am Windows
- name: Create GPv2 managed instance with specified IOPS limit
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -e GeneralPurpose --gpv2 true -f Gen8IH -c 4 --storage 256GB --iops 3000
- name: Create managed instance with specified memory size in GB
text: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -e GeneralPurpose --gpv2 true -f Gen8IM -c 4 --storage 256GB --iops 3000 --memory 40
"""
helps['sql mi delete'] = """
type: command
short-summary: Delete a managed instance.
examples:
- name: Delete a managed instance
text: az sql mi delete -g mygroup -n myinstance --yes
"""
helps['sql mi failover'] = """
type: command
short-summary: Failover a managed instance.
examples:
- name: Failover a managed instance primary replica
text: az sql mi failover -g mygroup -n myinstance
- name: Failover a managed instance readable secodary replica
text: az sql mi failover -g mygroup -n myinstance --replica-type ReadableSecondary
"""
helps['sql mi advanced-threat-protection-setting'] = """
type: group
short-summary: Manage a SQL Managed Instance's advanced threat protection setting.
"""
helps['sql mi advanced-threat-protection-setting update'] = """
type: command
short-summary: Update a SQL Managed Instance's advanced threat protection setting.
parameters:
- name: --state
type: string
short-summary: 'State of the advanced threat protection setting'
examples:
- name: Disable an advanced threat protection setting.
text: az sql mi advanced-threat-protection-setting update -g mygroup -n myinstance --state Disabled
"""
helps['sql mi key'] = """
type: group
short-summary: Manage a SQL Instance's keys.
"""
helps['sql mi key create'] = """
type: command
short-summary: Creates a SQL Instance key.
"""
helps['sql mi key delete'] = """
type: command
short-summary: Deletes a SQL Instance key.
"""