Source file cli.ml

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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
(* generated by: awso-codegen generate-all --botocore-data vendor/botocore/botocore/data -o aws --runtime-dir lib/runtime/awso --cli-dir awso-cli *)
open Core
open Async
let json_arg = Command.Arg_type.create Yojson.Safe.from_string
let call ?endpoint_url ?profile ?region f m result_to_json error_to_json =
  let region =
    match region with
    | Some region -> Some (Awso.Region.of_string region)
    | None -> None in
  (Awso_async.Cfg.get_exn ?profile ?region ()) >>=
    (fun cfg ->
       (f ?endpoint_url ?cfg:(Some cfg) m) >>=
         (fun result ->
            match result with
            | Error err ->
                (match error_to_json with
                 | None ->
                     failwithf
                       "endpoint error, but no error values defined in boto"
                       ()
                 | Some to_json ->
                     let s = (err |> to_json) |> Yojson.Safe.to_string in
                     failwithf "AWS error: %s" s ())
            | Ok result ->
                ((match result_to_json with
                  | None -> print_endline "ok response from endpoint"
                  | Some to_json ->
                      ((result |> to_json) |> Yojson.Safe.to_string) |>
                        print_endline);
                 return ())))
let add_source_identifier_to_subscription =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and subscriptionName =
         flag "subscription-name" (required string) ~doc:"STRING String"
       and sourceIdentifier =
         flag "source-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.add_source_identifier_to_subscription
           (Values.AddSourceIdentifierToSubscriptionMessage.make
              ~subscriptionName ~sourceIdentifier ())
           (Some Values.AddSourceIdentifierToSubscriptionResult.to_json)
           (Some Values.AddSourceIdentifierToSubscriptionResult.error_to_json)])
let add_tags_to_resource =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceName =
         flag "resource-name" (required string) ~doc:"STRING String"
       and tags = flag "tags" (required json_arg) ~doc:"JSON TagList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.add_tags_to_resource
           (Values.AddTagsToResourceMessage.make ~resourceName
              ~tags:(Values.TagList.of_json tags) ()) None None])
let apply_pending_maintenance_action =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceIdentifier =
         flag "resource-identifier" (required string) ~doc:"STRING String"
       and applyAction =
         flag "apply-action" (required string) ~doc:"STRING String"
       and optInType =
         flag "opt-in-type" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.apply_pending_maintenance_action
           (Values.ApplyPendingMaintenanceActionMessage.make
              ~resourceIdentifier ~applyAction ~optInType ())
           (Some Values.ApplyPendingMaintenanceActionResult.to_json)
           (Some Values.ApplyPendingMaintenanceActionResult.error_to_json)])
let copy_d_b_cluster_parameter_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and sourceDBClusterParameterGroupIdentifier =
         flag "source-d-b-cluster-parameter-group-identifier"
           (required string) ~doc:"STRING String"
       and targetDBClusterParameterGroupIdentifier =
         flag "target-d-b-cluster-parameter-group-identifier"
           (required string) ~doc:"STRING String"
       and targetDBClusterParameterGroupDescription =
         flag "target-d-b-cluster-parameter-group-description"
           (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.copy_d_b_cluster_parameter_group
           (Values.CopyDBClusterParameterGroupMessage.make
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~sourceDBClusterParameterGroupIdentifier
              ~targetDBClusterParameterGroupIdentifier
              ~targetDBClusterParameterGroupDescription ())
           (Some Values.CopyDBClusterParameterGroupResult.to_json)
           (Some Values.CopyDBClusterParameterGroupResult.error_to_json)])
let copy_d_b_cluster_snapshot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and kmsKeyId =
         flag "kms-key-id" (optional string) ~doc:"STRING String"
       and preSignedUrl =
         flag "pre-signed-url" (optional string) ~doc:"STRING String"
       and copyTags =
         flag "copy-tags" (optional bool) ~doc:"BOOL BooleanOptional"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and sourceDBClusterSnapshotIdentifier =
         flag "source-d-b-cluster-snapshot-identifier" (required string)
           ~doc:"STRING String"
       and targetDBClusterSnapshotIdentifier =
         flag "target-d-b-cluster-snapshot-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.copy_d_b_cluster_snapshot
           (Values.CopyDBClusterSnapshotMessage.make ?kmsKeyId ?preSignedUrl
              ?copyTags ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~sourceDBClusterSnapshotIdentifier
              ~targetDBClusterSnapshotIdentifier ())
           (Some Values.CopyDBClusterSnapshotResult.to_json)
           (Some Values.CopyDBClusterSnapshotResult.error_to_json)])
let create_d_b_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and availabilityZones =
         flag "availability-zones" (optional json_arg)
           ~doc:"JSON AvailabilityZones"
       and backupRetentionPeriod =
         flag "backup-retention-period" (optional int)
           ~doc:"INT IntegerOptional"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (optional string)
           ~doc:"STRING String"
       and vpcSecurityGroupIds =
         flag "vpc-security-group-ids" (optional json_arg)
           ~doc:"JSON VpcSecurityGroupIdList"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (optional string) ~doc:"STRING String"
       and engineVersion =
         flag "engine-version" (optional string) ~doc:"STRING String"
       and port = flag "port" (optional int) ~doc:"INT IntegerOptional"
       and masterUsername =
         flag "master-username" (optional string) ~doc:"STRING String"
       and masterUserPassword =
         flag "master-user-password" (optional string) ~doc:"STRING String"
       and preferredBackupWindow =
         flag "preferred-backup-window" (optional string)
           ~doc:"STRING String"
       and preferredMaintenanceWindow =
         flag "preferred-maintenance-window" (optional string)
           ~doc:"STRING String"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and storageEncrypted =
         flag "storage-encrypted" (optional bool) ~doc:"BOOL BooleanOptional"
       and kmsKeyId =
         flag "kms-key-id" (optional string) ~doc:"STRING String"
       and preSignedUrl =
         flag "pre-signed-url" (optional string) ~doc:"STRING String"
       and enableCloudwatchLogsExports =
         flag "enable-cloudwatch-logs-exports" (optional json_arg)
           ~doc:"JSON LogTypeList"
       and deletionProtection =
         flag "deletion-protection" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (optional string)
           ~doc:"STRING GlobalClusterIdentifier"
       and storageType =
         flag "storage-type" (optional string) ~doc:"STRING String"
       and serverlessV2ScalingConfiguration =
         flag "serverless-v2-scaling-configuration" (optional json_arg)
           ~doc:"JSON ServerlessV2ScalingConfiguration"
       and manageMasterUserPassword =
         flag "manage-master-user-password" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and masterUserSecretKmsKeyId =
         flag "master-user-secret-kms-key-id" (optional string)
           ~doc:"STRING String"
       and networkType =
         flag "network-type" (optional string) ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String"
       and engine = flag "engine" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_d_b_cluster
           (Values.CreateDBClusterMessage.make
              ?availabilityZones:(Option.map
                                    ~f:Values.AvailabilityZones.of_json
                                    availabilityZones) ?backupRetentionPeriod
              ?dBClusterParameterGroupName
              ?vpcSecurityGroupIds:(Option.map
                                      ~f:Values.VpcSecurityGroupIdList.of_json
                                      vpcSecurityGroupIds) ?dBSubnetGroupName
              ?engineVersion ?port ?masterUsername ?masterUserPassword
              ?preferredBackupWindow ?preferredMaintenanceWindow
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ?storageEncrypted ?kmsKeyId ?preSignedUrl
              ?enableCloudwatchLogsExports:(Option.map
                                              ~f:Values.LogTypeList.of_json
                                              enableCloudwatchLogsExports)
              ?deletionProtection ?globalClusterIdentifier ?storageType
              ?serverlessV2ScalingConfiguration:(Option.map
                                                   ~f:Values.ServerlessV2ScalingConfiguration.of_json
                                                   serverlessV2ScalingConfiguration)
              ?manageMasterUserPassword ?masterUserSecretKmsKeyId
              ?networkType ~dBClusterIdentifier ~engine ())
           (Some Values.CreateDBClusterResult.to_json)
           (Some Values.CreateDBClusterResult.error_to_json)])
let create_d_b_cluster_parameter_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (required string)
           ~doc:"STRING String"
       and dBParameterGroupFamily =
         flag "d-b-parameter-group-family" (required string)
           ~doc:"STRING String"
       and description =
         flag "description" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_d_b_cluster_parameter_group
           (Values.CreateDBClusterParameterGroupMessage.make
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~dBClusterParameterGroupName ~dBParameterGroupFamily
              ~description ())
           (Some Values.CreateDBClusterParameterGroupResult.to_json)
           (Some Values.CreateDBClusterParameterGroupResult.error_to_json)])
let create_d_b_cluster_snapshot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and dBClusterSnapshotIdentifier =
         flag "d-b-cluster-snapshot-identifier" (required string)
           ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_d_b_cluster_snapshot
           (Values.CreateDBClusterSnapshotMessage.make
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~dBClusterSnapshotIdentifier ~dBClusterIdentifier ())
           (Some Values.CreateDBClusterSnapshotResult.to_json)
           (Some Values.CreateDBClusterSnapshotResult.error_to_json)])
let create_d_b_instance =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and availabilityZone =
         flag "availability-zone" (optional string) ~doc:"STRING String"
       and preferredMaintenanceWindow =
         flag "preferred-maintenance-window" (optional string)
           ~doc:"STRING String"
       and autoMinorVersionUpgrade =
         flag "auto-minor-version-upgrade" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and copyTagsToSnapshot =
         flag "copy-tags-to-snapshot" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and promotionTier =
         flag "promotion-tier" (optional int) ~doc:"INT IntegerOptional"
       and enablePerformanceInsights =
         flag "enable-performance-insights" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and performanceInsightsKMSKeyId =
         flag "performance-insights-k-m-s-key-id" (optional string)
           ~doc:"STRING String"
       and cACertificateIdentifier =
         flag "c-a-certificate-identifier" (optional string)
           ~doc:"STRING String"
       and dBInstanceIdentifier =
         flag "d-b-instance-identifier" (required string)
           ~doc:"STRING String"
       and dBInstanceClass =
         flag "d-b-instance-class" (required string) ~doc:"STRING String"
       and engine = flag "engine" (required string) ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_d_b_instance
           (Values.CreateDBInstanceMessage.make ?availabilityZone
              ?preferredMaintenanceWindow ?autoMinorVersionUpgrade
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ?copyTagsToSnapshot ?promotionTier ?enablePerformanceInsights
              ?performanceInsightsKMSKeyId ?cACertificateIdentifier
              ~dBInstanceIdentifier ~dBInstanceClass ~engine
              ~dBClusterIdentifier ())
           (Some Values.CreateDBInstanceResult.to_json)
           (Some Values.CreateDBInstanceResult.error_to_json)])
let create_d_b_subnet_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (required string) ~doc:"STRING String"
       and dBSubnetGroupDescription =
         flag "d-b-subnet-group-description" (required string)
           ~doc:"STRING String"
       and subnetIds =
         flag "subnet-ids" (required json_arg)
           ~doc:"JSON SubnetIdentifierList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_d_b_subnet_group
           (Values.CreateDBSubnetGroupMessage.make
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~dBSubnetGroupName ~dBSubnetGroupDescription
              ~subnetIds:(Values.SubnetIdentifierList.of_json subnetIds) ())
           (Some Values.CreateDBSubnetGroupResult.to_json)
           (Some Values.CreateDBSubnetGroupResult.error_to_json)])
let create_event_subscription =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and sourceType =
         flag "source-type" (optional string) ~doc:"STRING String"
       and eventCategories =
         flag "event-categories" (optional json_arg)
           ~doc:"JSON EventCategoriesList"
       and sourceIds =
         flag "source-ids" (optional json_arg) ~doc:"JSON SourceIdsList"
       and enabled =
         flag "enabled" (optional bool) ~doc:"BOOL BooleanOptional"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and subscriptionName =
         flag "subscription-name" (required string) ~doc:"STRING String"
       and snsTopicArn =
         flag "sns-topic-arn" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_event_subscription
           (Values.CreateEventSubscriptionMessage.make ?sourceType
              ?eventCategories:(Option.map
                                  ~f:Values.EventCategoriesList.of_json
                                  eventCategories)
              ?sourceIds:(Option.map ~f:Values.SourceIdsList.of_json
                            sourceIds) ?enabled
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ~subscriptionName ~snsTopicArn ())
           (Some Values.CreateEventSubscriptionResult.to_json)
           (Some Values.CreateEventSubscriptionResult.error_to_json)])
let create_global_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and sourceDBClusterIdentifier =
         flag "source-d-b-cluster-identifier" (optional string)
           ~doc:"STRING String"
       and engine = flag "engine" (optional string) ~doc:"STRING String"
       and engineVersion =
         flag "engine-version" (optional string) ~doc:"STRING String"
       and deletionProtection =
         flag "deletion-protection" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and databaseName =
         flag "database-name" (optional string) ~doc:"STRING String"
       and storageEncrypted =
         flag "storage-encrypted" (optional bool) ~doc:"BOOL BooleanOptional"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (required string)
           ~doc:"STRING GlobalClusterIdentifier" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_global_cluster
           (Values.CreateGlobalClusterMessage.make ?sourceDBClusterIdentifier
              ?engine ?engineVersion ?deletionProtection ?databaseName
              ?storageEncrypted ~globalClusterIdentifier ())
           (Some Values.CreateGlobalClusterResult.to_json)
           (Some Values.CreateGlobalClusterResult.error_to_json)])
let delete_d_b_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and skipFinalSnapshot =
         flag "skip-final-snapshot" (optional bool) ~doc:"BOOL Boolean"
       and finalDBSnapshotIdentifier =
         flag "final-d-b-snapshot-identifier" (optional string)
           ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_d_b_cluster
           (Values.DeleteDBClusterMessage.make ?skipFinalSnapshot
              ?finalDBSnapshotIdentifier ~dBClusterIdentifier ())
           (Some Values.DeleteDBClusterResult.to_json)
           (Some Values.DeleteDBClusterResult.error_to_json)])
let delete_d_b_cluster_parameter_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_d_b_cluster_parameter_group
           (Values.DeleteDBClusterParameterGroupMessage.make
              ~dBClusterParameterGroupName ()) None None])
let delete_d_b_cluster_snapshot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterSnapshotIdentifier =
         flag "d-b-cluster-snapshot-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_d_b_cluster_snapshot
           (Values.DeleteDBClusterSnapshotMessage.make
              ~dBClusterSnapshotIdentifier ())
           (Some Values.DeleteDBClusterSnapshotResult.to_json)
           (Some Values.DeleteDBClusterSnapshotResult.error_to_json)])
let delete_d_b_instance =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBInstanceIdentifier =
         flag "d-b-instance-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_d_b_instance
           (Values.DeleteDBInstanceMessage.make ~dBInstanceIdentifier ())
           (Some Values.DeleteDBInstanceResult.to_json)
           (Some Values.DeleteDBInstanceResult.error_to_json)])
let delete_d_b_subnet_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_d_b_subnet_group
           (Values.DeleteDBSubnetGroupMessage.make ~dBSubnetGroupName ())
           None None])
let delete_event_subscription =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and subscriptionName =
         flag "subscription-name" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_event_subscription
           (Values.DeleteEventSubscriptionMessage.make ~subscriptionName ())
           (Some Values.DeleteEventSubscriptionResult.to_json)
           (Some Values.DeleteEventSubscriptionResult.error_to_json)])
let delete_global_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (required string)
           ~doc:"STRING GlobalClusterIdentifier" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_global_cluster
           (Values.DeleteGlobalClusterMessage.make ~globalClusterIdentifier
              ()) (Some Values.DeleteGlobalClusterResult.to_json)
           (Some Values.DeleteGlobalClusterResult.error_to_json)])
let describe_certificates =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and certificateIdentifier =
         flag "certificate-identifier" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_certificates
           (Values.DescribeCertificatesMessage.make ?certificateIdentifier
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ())
           (Some Values.CertificateMessage.to_json)
           (Some Values.CertificateMessage.error_to_json)])
let describe_d_b_cluster_parameter_groups =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (optional string)
           ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_cluster_parameter_groups
           (Values.DescribeDBClusterParameterGroupsMessage.make
              ?dBClusterParameterGroupName
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ())
           (Some Values.DBClusterParameterGroupsMessage.to_json)
           (Some Values.DBClusterParameterGroupsMessage.error_to_json)])
let describe_d_b_cluster_parameters =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and source = flag "source" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_cluster_parameters
           (Values.DescribeDBClusterParametersMessage.make ?source
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ~dBClusterParameterGroupName ())
           (Some Values.DBClusterParameterGroupDetails.to_json)
           (Some Values.DBClusterParameterGroupDetails.error_to_json)])
let describe_d_b_cluster_snapshot_attributes =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterSnapshotIdentifier =
         flag "d-b-cluster-snapshot-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_cluster_snapshot_attributes
           (Values.DescribeDBClusterSnapshotAttributesMessage.make
              ~dBClusterSnapshotIdentifier ())
           (Some Values.DescribeDBClusterSnapshotAttributesResult.to_json)
           (Some
              Values.DescribeDBClusterSnapshotAttributesResult.error_to_json)])
let describe_d_b_cluster_snapshots =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (optional string) ~doc:"STRING String"
       and dBClusterSnapshotIdentifier =
         flag "d-b-cluster-snapshot-identifier" (optional string)
           ~doc:"STRING String"
       and snapshotType =
         flag "snapshot-type" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String"
       and includeShared =
         flag "include-shared" (optional bool) ~doc:"BOOL Boolean"
       and includePublic =
         flag "include-public" (optional bool) ~doc:"BOOL Boolean" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_cluster_snapshots
           (Values.DescribeDBClusterSnapshotsMessage.make
              ?dBClusterIdentifier ?dBClusterSnapshotIdentifier ?snapshotType
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ?includeShared ?includePublic ())
           (Some Values.DBClusterSnapshotMessage.to_json)
           (Some Values.DBClusterSnapshotMessage.error_to_json)])
let describe_d_b_clusters =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_clusters
           (Values.DescribeDBClustersMessage.make ?dBClusterIdentifier
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ()) (Some Values.DBClusterMessage.to_json)
           (Some Values.DBClusterMessage.error_to_json)])
let describe_d_b_engine_versions =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and engine = flag "engine" (optional string) ~doc:"STRING String"
       and engineVersion =
         flag "engine-version" (optional string) ~doc:"STRING String"
       and dBParameterGroupFamily =
         flag "d-b-parameter-group-family" (optional string)
           ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String"
       and defaultOnly =
         flag "default-only" (optional bool) ~doc:"BOOL Boolean"
       and listSupportedCharacterSets =
         flag "list-supported-character-sets" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and listSupportedTimezones =
         flag "list-supported-timezones" (optional bool)
           ~doc:"BOOL BooleanOptional" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_engine_versions
           (Values.DescribeDBEngineVersionsMessage.make ?engine
              ?engineVersion ?dBParameterGroupFamily
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ?defaultOnly ?listSupportedCharacterSets
              ?listSupportedTimezones ())
           (Some Values.DBEngineVersionMessage.to_json)
           (Some Values.DBEngineVersionMessage.error_to_json)])
let describe_d_b_instances =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBInstanceIdentifier =
         flag "d-b-instance-identifier" (optional string)
           ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_instances
           (Values.DescribeDBInstancesMessage.make ?dBInstanceIdentifier
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ()) (Some Values.DBInstanceMessage.to_json)
           (Some Values.DBInstanceMessage.error_to_json)])
let describe_d_b_subnet_groups =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_d_b_subnet_groups
           (Values.DescribeDBSubnetGroupsMessage.make ?dBSubnetGroupName
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ())
           (Some Values.DBSubnetGroupMessage.to_json)
           (Some Values.DBSubnetGroupMessage.error_to_json)])
let describe_engine_default_cluster_parameters =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String"
       and dBParameterGroupFamily =
         flag "d-b-parameter-group-family" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_engine_default_cluster_parameters
           (Values.DescribeEngineDefaultClusterParametersMessage.make
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ~dBParameterGroupFamily ())
           (Some Values.DescribeEngineDefaultClusterParametersResult.to_json)
           (Some
              Values.DescribeEngineDefaultClusterParametersResult.error_to_json)])
let describe_event_categories =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and sourceType =
         flag "source-type" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_event_categories
           (Values.DescribeEventCategoriesMessage.make ?sourceType
              ?filters:(Option.map ~f:Values.FilterList.of_json filters) ())
           (Some Values.EventCategoriesMessage.to_json)
           (Some Values.EventCategoriesMessage.error_to_json)])
let describe_event_subscriptions =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and subscriptionName =
         flag "subscription-name" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_event_subscriptions
           (Values.DescribeEventSubscriptionsMessage.make ?subscriptionName
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ())
           (Some Values.EventSubscriptionsMessage.to_json)
           (Some Values.EventSubscriptionsMessage.error_to_json)])
let describe_events =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and sourceIdentifier =
         flag "source-identifier" (optional string) ~doc:"STRING String"
       and sourceType =
         flag "source-type" (optional json_arg) ~doc:"JSON SourceType"
       and startTime =
         flag "start-time" (optional json_arg) ~doc:"JSON TStamp"
       and endTime = flag "end-time" (optional json_arg) ~doc:"JSON TStamp"
       and duration =
         flag "duration" (optional int) ~doc:"INT IntegerOptional"
       and eventCategories =
         flag "event-categories" (optional json_arg)
           ~doc:"JSON EventCategoriesList"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_events
           (Values.DescribeEventsMessage.make ?sourceIdentifier
              ?sourceType:(Option.map ~f:Values.SourceType.of_json sourceType)
              ?startTime:(Option.map ~f:Values.TStamp.of_json startTime)
              ?endTime:(Option.map ~f:Values.TStamp.of_json endTime)
              ?duration
              ?eventCategories:(Option.map
                                  ~f:Values.EventCategoriesList.of_json
                                  eventCategories)
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ()) (Some Values.EventsMessage.to_json)
           (Some Values.EventsMessage.error_to_json)])
let describe_global_clusters =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (optional string)
           ~doc:"STRING GlobalClusterIdentifier"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_global_clusters
           (Values.DescribeGlobalClustersMessage.make
              ?globalClusterIdentifier
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ())
           (Some Values.GlobalClustersMessage.to_json)
           (Some Values.GlobalClustersMessage.error_to_json)])
let describe_orderable_d_b_instance_options =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and engineVersion =
         flag "engine-version" (optional string) ~doc:"STRING String"
       and dBInstanceClass =
         flag "d-b-instance-class" (optional string) ~doc:"STRING String"
       and licenseModel =
         flag "license-model" (optional string) ~doc:"STRING String"
       and vpc = flag "vpc" (optional bool) ~doc:"BOOL BooleanOptional"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional"
       and marker = flag "marker" (optional string) ~doc:"STRING String"
       and engine = flag "engine" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_orderable_d_b_instance_options
           (Values.DescribeOrderableDBInstanceOptionsMessage.make
              ?engineVersion ?dBInstanceClass ?licenseModel ?vpc
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?maxRecords ?marker ~engine ())
           (Some Values.OrderableDBInstanceOptionsMessage.to_json)
           (Some Values.OrderableDBInstanceOptionsMessage.error_to_json)])
let describe_pending_maintenance_actions =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceIdentifier =
         flag "resource-identifier" (optional string) ~doc:"STRING String"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and marker = flag "marker" (optional string) ~doc:"STRING String"
       and maxRecords =
         flag "max-records" (optional int) ~doc:"INT IntegerOptional" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_pending_maintenance_actions
           (Values.DescribePendingMaintenanceActionsMessage.make
              ?resourceIdentifier
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ?marker ?maxRecords ())
           (Some Values.PendingMaintenanceActionsMessage.to_json)
           (Some Values.PendingMaintenanceActionsMessage.error_to_json)])
let failover_d_b_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (optional string) ~doc:"STRING String"
       and targetDBInstanceIdentifier =
         flag "target-d-b-instance-identifier" (optional string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.failover_d_b_cluster
           (Values.FailoverDBClusterMessage.make ?dBClusterIdentifier
              ?targetDBInstanceIdentifier ())
           (Some Values.FailoverDBClusterResult.to_json)
           (Some Values.FailoverDBClusterResult.error_to_json)])
let failover_global_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and allowDataLoss =
         flag "allow-data-loss" (optional bool) ~doc:"BOOL BooleanOptional"
       and switchover =
         flag "switchover" (optional bool) ~doc:"BOOL BooleanOptional"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (required string)
           ~doc:"STRING GlobalClusterIdentifier"
       and targetDbClusterIdentifier =
         flag "target-db-cluster-identifier" (required string)
           ~doc:"STRING DBClusterIdentifier" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.failover_global_cluster
           (Values.FailoverGlobalClusterMessage.make ?allowDataLoss
              ?switchover ~globalClusterIdentifier ~targetDbClusterIdentifier
              ()) (Some Values.FailoverGlobalClusterResult.to_json)
           (Some Values.FailoverGlobalClusterResult.error_to_json)])
let list_tags_for_resource =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and filters =
         flag "filters" (optional json_arg) ~doc:"JSON FilterList"
       and resourceName =
         flag "resource-name" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_tags_for_resource
           (Values.ListTagsForResourceMessage.make
              ?filters:(Option.map ~f:Values.FilterList.of_json filters)
              ~resourceName ()) (Some Values.TagListMessage.to_json)
           (Some Values.TagListMessage.error_to_json)])
let modify_d_b_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and newDBClusterIdentifier =
         flag "new-d-b-cluster-identifier" (optional string)
           ~doc:"STRING String"
       and applyImmediately =
         flag "apply-immediately" (optional bool) ~doc:"BOOL Boolean"
       and backupRetentionPeriod =
         flag "backup-retention-period" (optional int)
           ~doc:"INT IntegerOptional"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (optional string)
           ~doc:"STRING String"
       and vpcSecurityGroupIds =
         flag "vpc-security-group-ids" (optional json_arg)
           ~doc:"JSON VpcSecurityGroupIdList"
       and port = flag "port" (optional int) ~doc:"INT IntegerOptional"
       and masterUserPassword =
         flag "master-user-password" (optional string) ~doc:"STRING String"
       and preferredBackupWindow =
         flag "preferred-backup-window" (optional string)
           ~doc:"STRING String"
       and preferredMaintenanceWindow =
         flag "preferred-maintenance-window" (optional string)
           ~doc:"STRING String"
       and cloudwatchLogsExportConfiguration =
         flag "cloudwatch-logs-export-configuration" (optional json_arg)
           ~doc:"JSON CloudwatchLogsExportConfiguration"
       and engineVersion =
         flag "engine-version" (optional string) ~doc:"STRING String"
       and allowMajorVersionUpgrade =
         flag "allow-major-version-upgrade" (optional bool)
           ~doc:"BOOL Boolean"
       and deletionProtection =
         flag "deletion-protection" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and storageType =
         flag "storage-type" (optional string) ~doc:"STRING String"
       and serverlessV2ScalingConfiguration =
         flag "serverless-v2-scaling-configuration" (optional json_arg)
           ~doc:"JSON ServerlessV2ScalingConfiguration"
       and manageMasterUserPassword =
         flag "manage-master-user-password" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and masterUserSecretKmsKeyId =
         flag "master-user-secret-kms-key-id" (optional string)
           ~doc:"STRING String"
       and rotateMasterUserPassword =
         flag "rotate-master-user-password" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and networkType =
         flag "network-type" (optional string) ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_d_b_cluster
           (Values.ModifyDBClusterMessage.make ?newDBClusterIdentifier
              ?applyImmediately ?backupRetentionPeriod
              ?dBClusterParameterGroupName
              ?vpcSecurityGroupIds:(Option.map
                                      ~f:Values.VpcSecurityGroupIdList.of_json
                                      vpcSecurityGroupIds) ?port
              ?masterUserPassword ?preferredBackupWindow
              ?preferredMaintenanceWindow
              ?cloudwatchLogsExportConfiguration:(Option.map
                                                    ~f:Values.CloudwatchLogsExportConfiguration.of_json
                                                    cloudwatchLogsExportConfiguration)
              ?engineVersion ?allowMajorVersionUpgrade ?deletionProtection
              ?storageType
              ?serverlessV2ScalingConfiguration:(Option.map
                                                   ~f:Values.ServerlessV2ScalingConfiguration.of_json
                                                   serverlessV2ScalingConfiguration)
              ?manageMasterUserPassword ?masterUserSecretKmsKeyId
              ?rotateMasterUserPassword ?networkType ~dBClusterIdentifier ())
           (Some Values.ModifyDBClusterResult.to_json)
           (Some Values.ModifyDBClusterResult.error_to_json)])
let modify_d_b_cluster_parameter_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (required string)
           ~doc:"STRING String"
       and parameters =
         flag "parameters" (required json_arg) ~doc:"JSON ParametersList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_d_b_cluster_parameter_group
           (Values.ModifyDBClusterParameterGroupMessage.make
              ~dBClusterParameterGroupName
              ~parameters:(Values.ParametersList.of_json parameters) ())
           (Some Values.DBClusterParameterGroupNameMessage.to_json)
           (Some Values.DBClusterParameterGroupNameMessage.error_to_json)])
let modify_d_b_cluster_snapshot_attribute =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and valuesToAdd =
         flag "values-to-add" (optional json_arg)
           ~doc:"JSON AttributeValueList"
       and valuesToRemove =
         flag "values-to-remove" (optional json_arg)
           ~doc:"JSON AttributeValueList"
       and dBClusterSnapshotIdentifier =
         flag "d-b-cluster-snapshot-identifier" (required string)
           ~doc:"STRING String"
       and attributeName =
         flag "attribute-name" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_d_b_cluster_snapshot_attribute
           (Values.ModifyDBClusterSnapshotAttributeMessage.make
              ?valuesToAdd:(Option.map ~f:Values.AttributeValueList.of_json
                              valuesToAdd)
              ?valuesToRemove:(Option.map
                                 ~f:Values.AttributeValueList.of_json
                                 valuesToRemove) ~dBClusterSnapshotIdentifier
              ~attributeName ())
           (Some Values.ModifyDBClusterSnapshotAttributeResult.to_json)
           (Some Values.ModifyDBClusterSnapshotAttributeResult.error_to_json)])
let modify_d_b_instance =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBInstanceClass =
         flag "d-b-instance-class" (optional string) ~doc:"STRING String"
       and applyImmediately =
         flag "apply-immediately" (optional bool) ~doc:"BOOL Boolean"
       and preferredMaintenanceWindow =
         flag "preferred-maintenance-window" (optional string)
           ~doc:"STRING String"
       and autoMinorVersionUpgrade =
         flag "auto-minor-version-upgrade" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and newDBInstanceIdentifier =
         flag "new-d-b-instance-identifier" (optional string)
           ~doc:"STRING String"
       and cACertificateIdentifier =
         flag "c-a-certificate-identifier" (optional string)
           ~doc:"STRING String"
       and copyTagsToSnapshot =
         flag "copy-tags-to-snapshot" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and promotionTier =
         flag "promotion-tier" (optional int) ~doc:"INT IntegerOptional"
       and enablePerformanceInsights =
         flag "enable-performance-insights" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and performanceInsightsKMSKeyId =
         flag "performance-insights-k-m-s-key-id" (optional string)
           ~doc:"STRING String"
       and certificateRotationRestart =
         flag "certificate-rotation-restart" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and dBInstanceIdentifier =
         flag "d-b-instance-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_d_b_instance
           (Values.ModifyDBInstanceMessage.make ?dBInstanceClass
              ?applyImmediately ?preferredMaintenanceWindow
              ?autoMinorVersionUpgrade ?newDBInstanceIdentifier
              ?cACertificateIdentifier ?copyTagsToSnapshot ?promotionTier
              ?enablePerformanceInsights ?performanceInsightsKMSKeyId
              ?certificateRotationRestart ~dBInstanceIdentifier ())
           (Some Values.ModifyDBInstanceResult.to_json)
           (Some Values.ModifyDBInstanceResult.error_to_json)])
let modify_d_b_subnet_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBSubnetGroupDescription =
         flag "d-b-subnet-group-description" (optional string)
           ~doc:"STRING String"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (required string) ~doc:"STRING String"
       and subnetIds =
         flag "subnet-ids" (required json_arg)
           ~doc:"JSON SubnetIdentifierList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_d_b_subnet_group
           (Values.ModifyDBSubnetGroupMessage.make ?dBSubnetGroupDescription
              ~dBSubnetGroupName
              ~subnetIds:(Values.SubnetIdentifierList.of_json subnetIds) ())
           (Some Values.ModifyDBSubnetGroupResult.to_json)
           (Some Values.ModifyDBSubnetGroupResult.error_to_json)])
let modify_event_subscription =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and snsTopicArn =
         flag "sns-topic-arn" (optional string) ~doc:"STRING String"
       and sourceType =
         flag "source-type" (optional string) ~doc:"STRING String"
       and eventCategories =
         flag "event-categories" (optional json_arg)
           ~doc:"JSON EventCategoriesList"
       and enabled =
         flag "enabled" (optional bool) ~doc:"BOOL BooleanOptional"
       and subscriptionName =
         flag "subscription-name" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_event_subscription
           (Values.ModifyEventSubscriptionMessage.make ?snsTopicArn
              ?sourceType
              ?eventCategories:(Option.map
                                  ~f:Values.EventCategoriesList.of_json
                                  eventCategories) ?enabled ~subscriptionName
              ()) (Some Values.ModifyEventSubscriptionResult.to_json)
           (Some Values.ModifyEventSubscriptionResult.error_to_json)])
let modify_global_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and newGlobalClusterIdentifier =
         flag "new-global-cluster-identifier" (optional string)
           ~doc:"STRING GlobalClusterIdentifier"
       and deletionProtection =
         flag "deletion-protection" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (required string)
           ~doc:"STRING GlobalClusterIdentifier" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.modify_global_cluster
           (Values.ModifyGlobalClusterMessage.make
              ?newGlobalClusterIdentifier ?deletionProtection
              ~globalClusterIdentifier ())
           (Some Values.ModifyGlobalClusterResult.to_json)
           (Some Values.ModifyGlobalClusterResult.error_to_json)])
let reboot_d_b_instance =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and forceFailover =
         flag "force-failover" (optional bool) ~doc:"BOOL BooleanOptional"
       and dBInstanceIdentifier =
         flag "d-b-instance-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.reboot_d_b_instance
           (Values.RebootDBInstanceMessage.make ?forceFailover
              ~dBInstanceIdentifier ())
           (Some Values.RebootDBInstanceResult.to_json)
           (Some Values.RebootDBInstanceResult.error_to_json)])
let remove_from_global_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (required string)
           ~doc:"STRING GlobalClusterIdentifier"
       and dbClusterIdentifier =
         flag "db-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.remove_from_global_cluster
           (Values.RemoveFromGlobalClusterMessage.make
              ~globalClusterIdentifier ~dbClusterIdentifier ())
           (Some Values.RemoveFromGlobalClusterResult.to_json)
           (Some Values.RemoveFromGlobalClusterResult.error_to_json)])
let remove_source_identifier_from_subscription =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and subscriptionName =
         flag "subscription-name" (required string) ~doc:"STRING String"
       and sourceIdentifier =
         flag "source-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.remove_source_identifier_from_subscription
           (Values.RemoveSourceIdentifierFromSubscriptionMessage.make
              ~subscriptionName ~sourceIdentifier ())
           (Some Values.RemoveSourceIdentifierFromSubscriptionResult.to_json)
           (Some
              Values.RemoveSourceIdentifierFromSubscriptionResult.error_to_json)])
let remove_tags_from_resource =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resourceName =
         flag "resource-name" (required string) ~doc:"STRING String"
       and tagKeys = flag "tag-keys" (required json_arg) ~doc:"JSON KeyList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.remove_tags_from_resource
           (Values.RemoveTagsFromResourceMessage.make ~resourceName
              ~tagKeys:(Values.KeyList.of_json tagKeys) ()) None None])
let reset_d_b_cluster_parameter_group =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and resetAllParameters =
         flag "reset-all-parameters" (optional bool) ~doc:"BOOL Boolean"
       and parameters =
         flag "parameters" (optional json_arg) ~doc:"JSON ParametersList"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.reset_d_b_cluster_parameter_group
           (Values.ResetDBClusterParameterGroupMessage.make
              ?resetAllParameters
              ?parameters:(Option.map ~f:Values.ParametersList.of_json
                             parameters) ~dBClusterParameterGroupName ())
           (Some Values.DBClusterParameterGroupNameMessage.to_json)
           (Some Values.DBClusterParameterGroupNameMessage.error_to_json)])
let restore_d_b_cluster_from_snapshot =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and availabilityZones =
         flag "availability-zones" (optional json_arg)
           ~doc:"JSON AvailabilityZones"
       and engineVersion =
         flag "engine-version" (optional string) ~doc:"STRING String"
       and port = flag "port" (optional int) ~doc:"INT IntegerOptional"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (optional string) ~doc:"STRING String"
       and vpcSecurityGroupIds =
         flag "vpc-security-group-ids" (optional json_arg)
           ~doc:"JSON VpcSecurityGroupIdList"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and kmsKeyId =
         flag "kms-key-id" (optional string) ~doc:"STRING String"
       and enableCloudwatchLogsExports =
         flag "enable-cloudwatch-logs-exports" (optional json_arg)
           ~doc:"JSON LogTypeList"
       and deletionProtection =
         flag "deletion-protection" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and dBClusterParameterGroupName =
         flag "d-b-cluster-parameter-group-name" (optional string)
           ~doc:"STRING String"
       and serverlessV2ScalingConfiguration =
         flag "serverless-v2-scaling-configuration" (optional json_arg)
           ~doc:"JSON ServerlessV2ScalingConfiguration"
       and storageType =
         flag "storage-type" (optional string) ~doc:"STRING String"
       and networkType =
         flag "network-type" (optional string) ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String"
       and snapshotIdentifier =
         flag "snapshot-identifier" (required string) ~doc:"STRING String"
       and engine = flag "engine" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.restore_d_b_cluster_from_snapshot
           (Values.RestoreDBClusterFromSnapshotMessage.make
              ?availabilityZones:(Option.map
                                    ~f:Values.AvailabilityZones.of_json
                                    availabilityZones) ?engineVersion ?port
              ?dBSubnetGroupName
              ?vpcSecurityGroupIds:(Option.map
                                      ~f:Values.VpcSecurityGroupIdList.of_json
                                      vpcSecurityGroupIds)
              ?tags:(Option.map ~f:Values.TagList.of_json tags) ?kmsKeyId
              ?enableCloudwatchLogsExports:(Option.map
                                              ~f:Values.LogTypeList.of_json
                                              enableCloudwatchLogsExports)
              ?deletionProtection ?dBClusterParameterGroupName
              ?serverlessV2ScalingConfiguration:(Option.map
                                                   ~f:Values.ServerlessV2ScalingConfiguration.of_json
                                                   serverlessV2ScalingConfiguration)
              ?storageType ?networkType ~dBClusterIdentifier
              ~snapshotIdentifier ~engine ())
           (Some Values.RestoreDBClusterFromSnapshotResult.to_json)
           (Some Values.RestoreDBClusterFromSnapshotResult.error_to_json)])
let restore_d_b_cluster_to_point_in_time =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and restoreType =
         flag "restore-type" (optional string) ~doc:"STRING String"
       and restoreToTime =
         flag "restore-to-time" (optional json_arg) ~doc:"JSON TStamp"
       and useLatestRestorableTime =
         flag "use-latest-restorable-time" (optional bool)
           ~doc:"BOOL Boolean"
       and port = flag "port" (optional int) ~doc:"INT IntegerOptional"
       and dBSubnetGroupName =
         flag "d-b-subnet-group-name" (optional string) ~doc:"STRING String"
       and vpcSecurityGroupIds =
         flag "vpc-security-group-ids" (optional json_arg)
           ~doc:"JSON VpcSecurityGroupIdList"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and kmsKeyId =
         flag "kms-key-id" (optional string) ~doc:"STRING String"
       and enableCloudwatchLogsExports =
         flag "enable-cloudwatch-logs-exports" (optional json_arg)
           ~doc:"JSON LogTypeList"
       and deletionProtection =
         flag "deletion-protection" (optional bool)
           ~doc:"BOOL BooleanOptional"
       and serverlessV2ScalingConfiguration =
         flag "serverless-v2-scaling-configuration" (optional json_arg)
           ~doc:"JSON ServerlessV2ScalingConfiguration"
       and storageType =
         flag "storage-type" (optional string) ~doc:"STRING String"
       and networkType =
         flag "network-type" (optional string) ~doc:"STRING String"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String"
       and sourceDBClusterIdentifier =
         flag "source-d-b-cluster-identifier" (required string)
           ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.restore_d_b_cluster_to_point_in_time
           (Values.RestoreDBClusterToPointInTimeMessage.make ?restoreType
              ?restoreToTime:(Option.map ~f:Values.TStamp.of_json
                                restoreToTime) ?useLatestRestorableTime ?port
              ?dBSubnetGroupName
              ?vpcSecurityGroupIds:(Option.map
                                      ~f:Values.VpcSecurityGroupIdList.of_json
                                      vpcSecurityGroupIds)
              ?tags:(Option.map ~f:Values.TagList.of_json tags) ?kmsKeyId
              ?enableCloudwatchLogsExports:(Option.map
                                              ~f:Values.LogTypeList.of_json
                                              enableCloudwatchLogsExports)
              ?deletionProtection
              ?serverlessV2ScalingConfiguration:(Option.map
                                                   ~f:Values.ServerlessV2ScalingConfiguration.of_json
                                                   serverlessV2ScalingConfiguration)
              ?storageType ?networkType ~dBClusterIdentifier
              ~sourceDBClusterIdentifier ())
           (Some Values.RestoreDBClusterToPointInTimeResult.to_json)
           (Some Values.RestoreDBClusterToPointInTimeResult.error_to_json)])
let start_d_b_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.start_d_b_cluster
           (Values.StartDBClusterMessage.make ~dBClusterIdentifier ())
           (Some Values.StartDBClusterResult.to_json)
           (Some Values.StartDBClusterResult.error_to_json)])
let stop_d_b_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and dBClusterIdentifier =
         flag "d-b-cluster-identifier" (required string) ~doc:"STRING String" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.stop_d_b_cluster
           (Values.StopDBClusterMessage.make ~dBClusterIdentifier ())
           (Some Values.StopDBClusterResult.to_json)
           (Some Values.StopDBClusterResult.error_to_json)])
let switchover_global_cluster =
  Command.async ~summary:""
    ([%map_open.Command
       let cli_profile =
         flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
       and cli_region =
         flag "-cli-region" (optional string) ~doc:"REGION override region"
       and endpoint_url =
         flag "-endpoint-url" (optional string)
           ~doc:"URL override endpoint url"
       and globalClusterIdentifier =
         flag "global-cluster-identifier" (required string)
           ~doc:"STRING GlobalClusterIdentifier"
       and targetDbClusterIdentifier =
         flag "target-db-cluster-identifier" (required string)
           ~doc:"STRING DBClusterIdentifier" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.switchover_global_cluster
           (Values.SwitchoverGlobalClusterMessage.make
              ~globalClusterIdentifier ~targetDbClusterIdentifier ())
           (Some Values.SwitchoverGlobalClusterResult.to_json)
           (Some Values.SwitchoverGlobalClusterResult.error_to_json)])
let main =
  Command.group
    ~summary:((Awso.Service.to_string Values.service) ^ " commands")
    [("add-source-identifier-to-subscription",
       add_source_identifier_to_subscription);
    ("add-tags-to-resource", add_tags_to_resource);
    ("apply-pending-maintenance-action", apply_pending_maintenance_action);
    ("copy-d-b-cluster-parameter-group", copy_d_b_cluster_parameter_group);
    ("copy-d-b-cluster-snapshot", copy_d_b_cluster_snapshot);
    ("create-d-b-cluster", create_d_b_cluster);
    ("create-d-b-cluster-parameter-group",
      create_d_b_cluster_parameter_group);
    ("create-d-b-cluster-snapshot", create_d_b_cluster_snapshot);
    ("create-d-b-instance", create_d_b_instance);
    ("create-d-b-subnet-group", create_d_b_subnet_group);
    ("create-event-subscription", create_event_subscription);
    ("create-global-cluster", create_global_cluster);
    ("delete-d-b-cluster", delete_d_b_cluster);
    ("delete-d-b-cluster-parameter-group",
      delete_d_b_cluster_parameter_group);
    ("delete-d-b-cluster-snapshot", delete_d_b_cluster_snapshot);
    ("delete-d-b-instance", delete_d_b_instance);
    ("delete-d-b-subnet-group", delete_d_b_subnet_group);
    ("delete-event-subscription", delete_event_subscription);
    ("delete-global-cluster", delete_global_cluster);
    ("describe-certificates", describe_certificates);
    ("describe-d-b-cluster-parameter-groups",
      describe_d_b_cluster_parameter_groups);
    ("describe-d-b-cluster-parameters", describe_d_b_cluster_parameters);
    ("describe-d-b-cluster-snapshot-attributes",
      describe_d_b_cluster_snapshot_attributes);
    ("describe-d-b-cluster-snapshots", describe_d_b_cluster_snapshots);
    ("describe-d-b-clusters", describe_d_b_clusters);
    ("describe-d-b-engine-versions", describe_d_b_engine_versions);
    ("describe-d-b-instances", describe_d_b_instances);
    ("describe-d-b-subnet-groups", describe_d_b_subnet_groups);
    ("describe-engine-default-cluster-parameters",
      describe_engine_default_cluster_parameters);
    ("describe-event-categories", describe_event_categories);
    ("describe-event-subscriptions", describe_event_subscriptions);
    ("describe-events", describe_events);
    ("describe-global-clusters", describe_global_clusters);
    ("describe-orderable-d-b-instance-options",
      describe_orderable_d_b_instance_options);
    ("describe-pending-maintenance-actions",
      describe_pending_maintenance_actions);
    ("failover-d-b-cluster", failover_d_b_cluster);
    ("failover-global-cluster", failover_global_cluster);
    ("list-tags-for-resource", list_tags_for_resource);
    ("modify-d-b-cluster", modify_d_b_cluster);
    ("modify-d-b-cluster-parameter-group",
      modify_d_b_cluster_parameter_group);
    ("modify-d-b-cluster-snapshot-attribute",
      modify_d_b_cluster_snapshot_attribute);
    ("modify-d-b-instance", modify_d_b_instance);
    ("modify-d-b-subnet-group", modify_d_b_subnet_group);
    ("modify-event-subscription", modify_event_subscription);
    ("modify-global-cluster", modify_global_cluster);
    ("reboot-d-b-instance", reboot_d_b_instance);
    ("remove-from-global-cluster", remove_from_global_cluster);
    ("remove-source-identifier-from-subscription",
      remove_source_identifier_from_subscription);
    ("remove-tags-from-resource", remove_tags_from_resource);
    ("reset-d-b-cluster-parameter-group", reset_d_b_cluster_parameter_group);
    ("restore-d-b-cluster-from-snapshot", restore_d_b_cluster_from_snapshot);
    ("restore-d-b-cluster-to-point-in-time",
      restore_d_b_cluster_to_point_in_time);
    ("start-d-b-cluster", start_d_b_cluster);
    ("stop-d-b-cluster", stop_d_b_cluster);
    ("switchover-global-cluster", switchover_global_cluster)]