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
(* 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 associate_web_a_c_l =
  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 webACLArn =
         flag "web-a-c-l-arn" (required string) ~doc:"STRING ResourceArn"
       and resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.associate_web_a_c_l
           (Values.AssociateWebACLRequest.make ~webACLArn ~resourceArn ())
           (Some Values.AssociateWebACLResponse.to_json)
           (Some Values.AssociateWebACLResponse.error_to_json)])
let check_capacity =
  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 scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and rules = flag "rules" (required json_arg) ~doc:"JSON Rules" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.check_capacity
           (Values.CheckCapacityRequest.make
              ~scope:(Values.Scope.of_json scope)
              ~rules:(Values.Rules.of_json rules) ())
           (Some Values.CheckCapacityResponse.to_json)
           (Some Values.CheckCapacityResponse.error_to_json)])
let create_a_p_i_key =
  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 scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and tokenDomains =
         flag "token-domains" (required json_arg)
           ~doc:"JSON APIKeyTokenDomains" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_a_p_i_key
           (Values.CreateAPIKeyRequest.make
              ~scope:(Values.Scope.of_json scope)
              ~tokenDomains:(Values.APIKeyTokenDomains.of_json tokenDomains)
              ()) (Some Values.CreateAPIKeyResponse.to_json)
           (Some Values.CreateAPIKeyResponse.error_to_json)])
let create_i_p_set =
  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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and iPAddressVersion =
         flag "i-p-address-version" (required json_arg)
           ~doc:"JSON IPAddressVersion"
       and addresses =
         flag "addresses" (required json_arg) ~doc:"JSON IPAddresses" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_i_p_set
           (Values.CreateIPSetRequest.make ?description
              ?tags:(Option.map ~f:Values.TagList.of_json tags) ~name
              ~scope:(Values.Scope.of_json scope)
              ~iPAddressVersion:(Values.IPAddressVersion.of_json
                                   iPAddressVersion)
              ~addresses:(Values.IPAddresses.of_json addresses) ())
           (Some Values.CreateIPSetResponse.to_json)
           (Some Values.CreateIPSetResponse.error_to_json)])
let create_regex_pattern_set =
  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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and regularExpressionList =
         flag "regular-expression-list" (required json_arg)
           ~doc:"JSON RegularExpressionList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_regex_pattern_set
           (Values.CreateRegexPatternSetRequest.make ?description
              ?tags:(Option.map ~f:Values.TagList.of_json tags) ~name
              ~scope:(Values.Scope.of_json scope)
              ~regularExpressionList:(Values.RegularExpressionList.of_json
                                        regularExpressionList) ())
           (Some Values.CreateRegexPatternSetResponse.to_json)
           (Some Values.CreateRegexPatternSetResponse.error_to_json)])
let create_rule_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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and rules = flag "rules" (optional json_arg) ~doc:"JSON Rules"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and customResponseBodies =
         flag "custom-response-bodies" (optional json_arg)
           ~doc:"JSON CustomResponseBodies"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and capacity =
         flag "capacity" (required json_arg) ~doc:"JSON CapacityUnit"
       and visibilityConfig =
         flag "visibility-config" (required json_arg)
           ~doc:"JSON VisibilityConfig" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_rule_group
           (Values.CreateRuleGroupRequest.make ?description
              ?rules:(Option.map ~f:Values.Rules.of_json rules)
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ?customResponseBodies:(Option.map
                                       ~f:Values.CustomResponseBodies.of_json
                                       customResponseBodies) ~name
              ~scope:(Values.Scope.of_json scope)
              ~capacity:(Values.CapacityUnit.of_json capacity)
              ~visibilityConfig:(Values.VisibilityConfig.of_json
                                   visibilityConfig) ())
           (Some Values.CreateRuleGroupResponse.to_json)
           (Some Values.CreateRuleGroupResponse.error_to_json)])
let create_web_a_c_l =
  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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and rules = flag "rules" (optional json_arg) ~doc:"JSON Rules"
       and dataProtectionConfig =
         flag "data-protection-config" (optional json_arg)
           ~doc:"JSON DataProtectionConfig"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagList"
       and customResponseBodies =
         flag "custom-response-bodies" (optional json_arg)
           ~doc:"JSON CustomResponseBodies"
       and captchaConfig =
         flag "captcha-config" (optional json_arg) ~doc:"JSON CaptchaConfig"
       and challengeConfig =
         flag "challenge-config" (optional json_arg)
           ~doc:"JSON ChallengeConfig"
       and tokenDomains =
         flag "token-domains" (optional json_arg) ~doc:"JSON TokenDomains"
       and associationConfig =
         flag "association-config" (optional json_arg)
           ~doc:"JSON AssociationConfig"
       and onSourceDDoSProtectionConfig =
         flag "on-source-d-do-s-protection-config" (optional json_arg)
           ~doc:"JSON OnSourceDDoSProtectionConfig"
       and applicationConfig =
         flag "application-config" (optional json_arg)
           ~doc:"JSON ApplicationConfig"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and defaultAction =
         flag "default-action" (required json_arg) ~doc:"JSON DefaultAction"
       and visibilityConfig =
         flag "visibility-config" (required json_arg)
           ~doc:"JSON VisibilityConfig" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_web_a_c_l
           (Values.CreateWebACLRequest.make ?description
              ?rules:(Option.map ~f:Values.Rules.of_json rules)
              ?dataProtectionConfig:(Option.map
                                       ~f:Values.DataProtectionConfig.of_json
                                       dataProtectionConfig)
              ?tags:(Option.map ~f:Values.TagList.of_json tags)
              ?customResponseBodies:(Option.map
                                       ~f:Values.CustomResponseBodies.of_json
                                       customResponseBodies)
              ?captchaConfig:(Option.map ~f:Values.CaptchaConfig.of_json
                                captchaConfig)
              ?challengeConfig:(Option.map ~f:Values.ChallengeConfig.of_json
                                  challengeConfig)
              ?tokenDomains:(Option.map ~f:Values.TokenDomains.of_json
                               tokenDomains)
              ?associationConfig:(Option.map
                                    ~f:Values.AssociationConfig.of_json
                                    associationConfig)
              ?onSourceDDoSProtectionConfig:(Option.map
                                               ~f:Values.OnSourceDDoSProtectionConfig.of_json
                                               onSourceDDoSProtectionConfig)
              ?applicationConfig:(Option.map
                                    ~f:Values.ApplicationConfig.of_json
                                    applicationConfig) ~name
              ~scope:(Values.Scope.of_json scope)
              ~defaultAction:(Values.DefaultAction.of_json defaultAction)
              ~visibilityConfig:(Values.VisibilityConfig.of_json
                                   visibilityConfig) ())
           (Some Values.CreateWebACLResponse.to_json)
           (Some Values.CreateWebACLResponse.error_to_json)])
let delete_a_p_i_key =
  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 scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and aPIKey = flag "a-p-i-key" (required string) ~doc:"STRING APIKey" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_a_p_i_key
           (Values.DeleteAPIKeyRequest.make
              ~scope:(Values.Scope.of_json scope) ~aPIKey ())
           (Some Values.DeleteAPIKeyResponse.to_json)
           (Some Values.DeleteAPIKeyResponse.error_to_json)])
let delete_firewall_manager_rule_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 webACLArn =
         flag "web-a-c-l-arn" (required string) ~doc:"STRING ResourceArn"
       and webACLLockToken =
         flag "web-a-c-l-lock-token" (required string)
           ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_firewall_manager_rule_groups
           (Values.DeleteFirewallManagerRuleGroupsRequest.make ~webACLArn
              ~webACLLockToken ())
           (Some Values.DeleteFirewallManagerRuleGroupsResponse.to_json)
           (Some Values.DeleteFirewallManagerRuleGroupsResponse.error_to_json)])
let delete_i_p_set =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_i_p_set
           (Values.DeleteIPSetRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ~lockToken ())
           (Some Values.DeleteIPSetResponse.to_json)
           (Some Values.DeleteIPSetResponse.error_to_json)])
let delete_logging_configuration =
  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 logType = flag "log-type" (optional json_arg) ~doc:"JSON LogType"
       and logScope =
         flag "log-scope" (optional json_arg) ~doc:"JSON LogScope"
       and resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_logging_configuration
           (Values.DeleteLoggingConfigurationRequest.make
              ?logType:(Option.map ~f:Values.LogType.of_json logType)
              ?logScope:(Option.map ~f:Values.LogScope.of_json logScope)
              ~resourceArn ())
           (Some Values.DeleteLoggingConfigurationResponse.to_json)
           (Some Values.DeleteLoggingConfigurationResponse.error_to_json)])
let delete_permission_policy =
  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 resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_permission_policy
           (Values.DeletePermissionPolicyRequest.make ~resourceArn ())
           (Some Values.DeletePermissionPolicyResponse.to_json)
           (Some Values.DeletePermissionPolicyResponse.error_to_json)])
let delete_regex_pattern_set =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_regex_pattern_set
           (Values.DeleteRegexPatternSetRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ~lockToken ())
           (Some Values.DeleteRegexPatternSetResponse.to_json)
           (Some Values.DeleteRegexPatternSetResponse.error_to_json)])
let delete_rule_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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_rule_group
           (Values.DeleteRuleGroupRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ~lockToken ())
           (Some Values.DeleteRuleGroupResponse.to_json)
           (Some Values.DeleteRuleGroupResponse.error_to_json)])
let delete_web_a_c_l =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_web_a_c_l
           (Values.DeleteWebACLRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ~lockToken ())
           (Some Values.DeleteWebACLResponse.to_json)
           (Some Values.DeleteWebACLResponse.error_to_json)])
let describe_all_managed_products =
  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 scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_all_managed_products
           (Values.DescribeAllManagedProductsRequest.make
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.DescribeAllManagedProductsResponse.to_json)
           (Some Values.DescribeAllManagedProductsResponse.error_to_json)])
let describe_managed_products_by_vendor =
  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 vendorName =
         flag "vendor-name" (required string) ~doc:"STRING VendorName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_managed_products_by_vendor
           (Values.DescribeManagedProductsByVendorRequest.make ~vendorName
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.DescribeManagedProductsByVendorResponse.to_json)
           (Some Values.DescribeManagedProductsByVendorResponse.error_to_json)])
let describe_managed_rule_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 versionName =
         flag "version-name" (optional string) ~doc:"STRING VersionKeyString"
       and vendorName =
         flag "vendor-name" (required string) ~doc:"STRING VendorName"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_managed_rule_group
           (Values.DescribeManagedRuleGroupRequest.make ?versionName
              ~vendorName ~name ~scope:(Values.Scope.of_json scope) ())
           (Some Values.DescribeManagedRuleGroupResponse.to_json)
           (Some Values.DescribeManagedRuleGroupResponse.error_to_json)])
let disassociate_web_a_c_l =
  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 resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.disassociate_web_a_c_l
           (Values.DisassociateWebACLRequest.make ~resourceArn ())
           (Some Values.DisassociateWebACLResponse.to_json)
           (Some Values.DisassociateWebACLResponse.error_to_json)])
let generate_mobile_sdk_release_url =
  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 platform =
         flag "platform" (required json_arg) ~doc:"JSON Platform"
       and releaseVersion =
         flag "release-version" (required string)
           ~doc:"STRING VersionKeyString" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.generate_mobile_sdk_release_url
           (Values.GenerateMobileSdkReleaseUrlRequest.make
              ~platform:(Values.Platform.of_json platform) ~releaseVersion ())
           (Some Values.GenerateMobileSdkReleaseUrlResponse.to_json)
           (Some Values.GenerateMobileSdkReleaseUrlResponse.error_to_json)])
let get_decrypted_a_p_i_key =
  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 scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and aPIKey = flag "a-p-i-key" (required string) ~doc:"STRING APIKey" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_decrypted_a_p_i_key
           (Values.GetDecryptedAPIKeyRequest.make
              ~scope:(Values.Scope.of_json scope) ~aPIKey ())
           (Some Values.GetDecryptedAPIKeyResponse.to_json)
           (Some Values.GetDecryptedAPIKeyResponse.error_to_json)])
let get_i_p_set =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_i_p_set
           (Values.GetIPSetRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ())
           (Some Values.GetIPSetResponse.to_json)
           (Some Values.GetIPSetResponse.error_to_json)])
let get_logging_configuration =
  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 logType = flag "log-type" (optional json_arg) ~doc:"JSON LogType"
       and logScope =
         flag "log-scope" (optional json_arg) ~doc:"JSON LogScope"
       and resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_logging_configuration
           (Values.GetLoggingConfigurationRequest.make
              ?logType:(Option.map ~f:Values.LogType.of_json logType)
              ?logScope:(Option.map ~f:Values.LogScope.of_json logScope)
              ~resourceArn ())
           (Some Values.GetLoggingConfigurationResponse.to_json)
           (Some Values.GetLoggingConfigurationResponse.error_to_json)])
let get_managed_rule_set =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_managed_rule_set
           (Values.GetManagedRuleSetRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ())
           (Some Values.GetManagedRuleSetResponse.to_json)
           (Some Values.GetManagedRuleSetResponse.error_to_json)])
let get_mobile_sdk_release =
  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 platform =
         flag "platform" (required json_arg) ~doc:"JSON Platform"
       and releaseVersion =
         flag "release-version" (required string)
           ~doc:"STRING VersionKeyString" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_mobile_sdk_release
           (Values.GetMobileSdkReleaseRequest.make
              ~platform:(Values.Platform.of_json platform) ~releaseVersion ())
           (Some Values.GetMobileSdkReleaseResponse.to_json)
           (Some Values.GetMobileSdkReleaseResponse.error_to_json)])
let get_permission_policy =
  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 resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_permission_policy
           (Values.GetPermissionPolicyRequest.make ~resourceArn ())
           (Some Values.GetPermissionPolicyResponse.to_json)
           (Some Values.GetPermissionPolicyResponse.error_to_json)])
let get_rate_based_statement_managed_keys =
  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 ruleGroupRuleName =
         flag "rule-group-rule-name" (optional string)
           ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and webACLName =
         flag "web-a-c-l-name" (required string) ~doc:"STRING EntityName"
       and webACLId =
         flag "web-a-c-l-id" (required string) ~doc:"STRING EntityId"
       and ruleName =
         flag "rule-name" (required string) ~doc:"STRING EntityName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_rate_based_statement_managed_keys
           (Values.GetRateBasedStatementManagedKeysRequest.make
              ?ruleGroupRuleName ~scope:(Values.Scope.of_json scope)
              ~webACLName ~webACLId ~ruleName ())
           (Some Values.GetRateBasedStatementManagedKeysResponse.to_json)
           (Some
              Values.GetRateBasedStatementManagedKeysResponse.error_to_json)])
let get_regex_pattern_set =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_regex_pattern_set
           (Values.GetRegexPatternSetRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ())
           (Some Values.GetRegexPatternSetResponse.to_json)
           (Some Values.GetRegexPatternSetResponse.error_to_json)])
let get_rule_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 name = flag "name" (optional string) ~doc:"STRING EntityName"
       and scope = flag "scope" (optional json_arg) ~doc:"JSON Scope"
       and id = flag "id" (optional string) ~doc:"STRING EntityId"
       and aRN = flag "a-r-n" (optional string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_rule_group
           (Values.GetRuleGroupRequest.make ?name
              ?scope:(Option.map ~f:Values.Scope.of_json scope) ?id ?aRN ())
           (Some Values.GetRuleGroupResponse.to_json)
           (Some Values.GetRuleGroupResponse.error_to_json)])
let get_sampled_requests =
  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 webAclArn =
         flag "web-acl-arn" (required string) ~doc:"STRING ResourceArn"
       and ruleMetricName =
         flag "rule-metric-name" (required string) ~doc:"STRING MetricName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and timeWindow =
         flag "time-window" (required json_arg) ~doc:"JSON TimeWindow"
       and maxItems =
         flag "max-items" (required json_arg) ~doc:"JSON ListMaxItems" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_sampled_requests
           (Values.GetSampledRequestsRequest.make ~webAclArn ~ruleMetricName
              ~scope:(Values.Scope.of_json scope)
              ~timeWindow:(Values.TimeWindow.of_json timeWindow)
              ~maxItems:(Values.ListMaxItems.of_json maxItems) ())
           (Some Values.GetSampledRequestsResponse.to_json)
           (Some Values.GetSampledRequestsResponse.error_to_json)])
let get_top_path_statistics_by_traffic =
  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 uriPathPrefix =
         flag "uri-path-prefix" (optional string)
           ~doc:"STRING UriPathPrefixString"
       and botCategory =
         flag "bot-category" (optional string) ~doc:"STRING FilterString"
       and botOrganization =
         flag "bot-organization" (optional string) ~doc:"STRING FilterString"
       and botName =
         flag "bot-name" (optional string) ~doc:"STRING FilterString"
       and nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and webAclArn =
         flag "web-acl-arn" (required string) ~doc:"STRING ResourceArn"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and timeWindow =
         flag "time-window" (required json_arg) ~doc:"JSON TimeWindow"
       and limit = flag "limit" (required int) ~doc:"INT PathStatisticsLimit"
       and numberOfTopTrafficBotsPerPath =
         flag "number-of-top-traffic-bots-per-path" (required int)
           ~doc:"INT NumberOfTopTrafficBotsPerPath" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_top_path_statistics_by_traffic
           (Values.GetTopPathStatisticsByTrafficRequest.make ?uriPathPrefix
              ?botCategory ?botOrganization ?botName ?nextMarker ~webAclArn
              ~scope:(Values.Scope.of_json scope)
              ~timeWindow:(Values.TimeWindow.of_json timeWindow) ~limit
              ~numberOfTopTrafficBotsPerPath ())
           (Some Values.GetTopPathStatisticsByTrafficResponse.to_json)
           (Some Values.GetTopPathStatisticsByTrafficResponse.error_to_json)])
let get_web_a_c_l =
  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 name = flag "name" (optional string) ~doc:"STRING EntityName"
       and scope = flag "scope" (optional json_arg) ~doc:"JSON Scope"
       and id = flag "id" (optional string) ~doc:"STRING EntityId"
       and aRN = flag "a-r-n" (optional string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_web_a_c_l
           (Values.GetWebACLRequest.make ?name
              ?scope:(Option.map ~f:Values.Scope.of_json scope) ?id ?aRN ())
           (Some Values.GetWebACLResponse.to_json)
           (Some Values.GetWebACLResponse.error_to_json)])
let get_web_a_c_l_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 resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_web_a_c_l_for_resource
           (Values.GetWebACLForResourceRequest.make ~resourceArn ())
           (Some Values.GetWebACLForResourceResponse.to_json)
           (Some Values.GetWebACLForResourceResponse.error_to_json)])
let list_a_p_i_keys =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_a_p_i_keys
           (Values.ListAPIKeysRequest.make ?nextMarker ?limit
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListAPIKeysResponse.to_json)
           (Some Values.ListAPIKeysResponse.error_to_json)])
let list_available_managed_rule_group_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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and vendorName =
         flag "vendor-name" (required string) ~doc:"STRING VendorName"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_available_managed_rule_group_versions
           (Values.ListAvailableManagedRuleGroupVersionsRequest.make
              ?nextMarker ?limit ~vendorName ~name
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListAvailableManagedRuleGroupVersionsResponse.to_json)
           (Some
              Values.ListAvailableManagedRuleGroupVersionsResponse.error_to_json)])
let list_available_managed_rule_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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_available_managed_rule_groups
           (Values.ListAvailableManagedRuleGroupsRequest.make ?nextMarker
              ?limit ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListAvailableManagedRuleGroupsResponse.to_json)
           (Some Values.ListAvailableManagedRuleGroupsResponse.error_to_json)])
let list_i_p_sets =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_i_p_sets
           (Values.ListIPSetsRequest.make ?nextMarker ?limit
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListIPSetsResponse.to_json)
           (Some Values.ListIPSetsResponse.error_to_json)])
let list_logging_configurations =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and logScope =
         flag "log-scope" (optional json_arg) ~doc:"JSON LogScope"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_logging_configurations
           (Values.ListLoggingConfigurationsRequest.make ?nextMarker ?limit
              ?logScope:(Option.map ~f:Values.LogScope.of_json logScope)
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListLoggingConfigurationsResponse.to_json)
           (Some Values.ListLoggingConfigurationsResponse.error_to_json)])
let list_managed_rule_sets =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_managed_rule_sets
           (Values.ListManagedRuleSetsRequest.make ?nextMarker ?limit
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListManagedRuleSetsResponse.to_json)
           (Some Values.ListManagedRuleSetsResponse.error_to_json)])
let list_mobile_sdk_releases =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and platform =
         flag "platform" (required json_arg) ~doc:"JSON Platform" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_mobile_sdk_releases
           (Values.ListMobileSdkReleasesRequest.make ?nextMarker ?limit
              ~platform:(Values.Platform.of_json platform) ())
           (Some Values.ListMobileSdkReleasesResponse.to_json)
           (Some Values.ListMobileSdkReleasesResponse.error_to_json)])
let list_regex_pattern_sets =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_regex_pattern_sets
           (Values.ListRegexPatternSetsRequest.make ?nextMarker ?limit
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListRegexPatternSetsResponse.to_json)
           (Some Values.ListRegexPatternSetsResponse.error_to_json)])
let list_resources_for_web_a_c_l =
  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 resourceType =
         flag "resource-type" (optional json_arg) ~doc:"JSON ResourceType"
       and webACLArn =
         flag "web-a-c-l-arn" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_resources_for_web_a_c_l
           (Values.ListResourcesForWebACLRequest.make
              ?resourceType:(Option.map ~f:Values.ResourceType.of_json
                               resourceType) ~webACLArn ())
           (Some Values.ListResourcesForWebACLResponse.to_json)
           (Some Values.ListResourcesForWebACLResponse.error_to_json)])
let list_rule_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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_rule_groups
           (Values.ListRuleGroupsRequest.make ?nextMarker ?limit
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListRuleGroupsResponse.to_json)
           (Some Values.ListRuleGroupsResponse.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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceArn" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_tags_for_resource
           (Values.ListTagsForResourceRequest.make ?nextMarker ?limit
              ~resourceARN ())
           (Some Values.ListTagsForResourceResponse.to_json)
           (Some Values.ListTagsForResourceResponse.error_to_json)])
let list_web_a_c_ls =
  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 nextMarker =
         flag "next-marker" (optional string) ~doc:"STRING NextMarker"
       and limit = flag "limit" (optional int) ~doc:"INT PaginationLimit"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_web_a_c_ls
           (Values.ListWebACLsRequest.make ?nextMarker ?limit
              ~scope:(Values.Scope.of_json scope) ())
           (Some Values.ListWebACLsResponse.to_json)
           (Some Values.ListWebACLsResponse.error_to_json)])
let put_logging_configuration =
  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 loggingConfiguration =
         flag "logging-configuration" (required json_arg)
           ~doc:"JSON LoggingConfiguration" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_logging_configuration
           (Values.PutLoggingConfigurationRequest.make
              ~loggingConfiguration:(Values.LoggingConfiguration.of_json
                                       loggingConfiguration) ())
           (Some Values.PutLoggingConfigurationResponse.to_json)
           (Some Values.PutLoggingConfigurationResponse.error_to_json)])
let put_managed_rule_set_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 recommendedVersion =
         flag "recommended-version" (optional string)
           ~doc:"STRING VersionKeyString"
       and versionsToPublish =
         flag "versions-to-publish" (optional json_arg)
           ~doc:"JSON VersionsToPublish"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_managed_rule_set_versions
           (Values.PutManagedRuleSetVersionsRequest.make ?recommendedVersion
              ?versionsToPublish:(Option.map
                                    ~f:Values.VersionsToPublish.of_json
                                    versionsToPublish) ~name
              ~scope:(Values.Scope.of_json scope) ~id ~lockToken ())
           (Some Values.PutManagedRuleSetVersionsResponse.to_json)
           (Some Values.PutManagedRuleSetVersionsResponse.error_to_json)])
let put_permission_policy =
  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 resourceArn =
         flag "resource-arn" (required string) ~doc:"STRING ResourceArn"
       and policy =
         flag "policy" (required string) ~doc:"STRING PolicyString" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_permission_policy
           (Values.PutPermissionPolicyRequest.make ~resourceArn ~policy ())
           (Some Values.PutPermissionPolicyResponse.to_json)
           (Some Values.PutPermissionPolicyResponse.error_to_json)])
let tag_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 resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceArn"
       and tags = flag "tags" (required json_arg) ~doc:"JSON TagList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.tag_resource
           (Values.TagResourceRequest.make ~resourceARN
              ~tags:(Values.TagList.of_json tags) ())
           (Some Values.TagResourceResponse.to_json)
           (Some Values.TagResourceResponse.error_to_json)])
let untag_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 resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceArn"
       and tagKeys =
         flag "tag-keys" (required json_arg) ~doc:"JSON TagKeyList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.untag_resource
           (Values.UntagResourceRequest.make ~resourceARN
              ~tagKeys:(Values.TagKeyList.of_json tagKeys) ())
           (Some Values.UntagResourceResponse.to_json)
           (Some Values.UntagResourceResponse.error_to_json)])
let update_i_p_set =
  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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and addresses =
         flag "addresses" (required json_arg) ~doc:"JSON IPAddresses"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_i_p_set
           (Values.UpdateIPSetRequest.make ?description ~name
              ~scope:(Values.Scope.of_json scope) ~id
              ~addresses:(Values.IPAddresses.of_json addresses) ~lockToken ())
           (Some Values.UpdateIPSetResponse.to_json)
           (Some Values.UpdateIPSetResponse.error_to_json)])
let update_managed_rule_set_version_expiry_date =
  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 name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken"
       and versionToExpire =
         flag "version-to-expire" (required string)
           ~doc:"STRING VersionKeyString"
       and expiryTimestamp =
         flag "expiry-timestamp" (required json_arg) ~doc:"JSON Timestamp" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_managed_rule_set_version_expiry_date
           (Values.UpdateManagedRuleSetVersionExpiryDateRequest.make ~name
              ~scope:(Values.Scope.of_json scope) ~id ~lockToken
              ~versionToExpire
              ~expiryTimestamp:(Values.Timestamp.of_json expiryTimestamp) ())
           (Some Values.UpdateManagedRuleSetVersionExpiryDateResponse.to_json)
           (Some
              Values.UpdateManagedRuleSetVersionExpiryDateResponse.error_to_json)])
let update_regex_pattern_set =
  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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and regularExpressionList =
         flag "regular-expression-list" (required json_arg)
           ~doc:"JSON RegularExpressionList"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_regex_pattern_set
           (Values.UpdateRegexPatternSetRequest.make ?description ~name
              ~scope:(Values.Scope.of_json scope) ~id
              ~regularExpressionList:(Values.RegularExpressionList.of_json
                                        regularExpressionList) ~lockToken ())
           (Some Values.UpdateRegexPatternSetResponse.to_json)
           (Some Values.UpdateRegexPatternSetResponse.error_to_json)])
let update_rule_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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and rules = flag "rules" (optional json_arg) ~doc:"JSON Rules"
       and customResponseBodies =
         flag "custom-response-bodies" (optional json_arg)
           ~doc:"JSON CustomResponseBodies"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and visibilityConfig =
         flag "visibility-config" (required json_arg)
           ~doc:"JSON VisibilityConfig"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_rule_group
           (Values.UpdateRuleGroupRequest.make ?description
              ?rules:(Option.map ~f:Values.Rules.of_json rules)
              ?customResponseBodies:(Option.map
                                       ~f:Values.CustomResponseBodies.of_json
                                       customResponseBodies) ~name
              ~scope:(Values.Scope.of_json scope) ~id
              ~visibilityConfig:(Values.VisibilityConfig.of_json
                                   visibilityConfig) ~lockToken ())
           (Some Values.UpdateRuleGroupResponse.to_json)
           (Some Values.UpdateRuleGroupResponse.error_to_json)])
let update_web_a_c_l =
  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 description =
         flag "description" (optional string) ~doc:"STRING EntityDescription"
       and rules = flag "rules" (optional json_arg) ~doc:"JSON Rules"
       and dataProtectionConfig =
         flag "data-protection-config" (optional json_arg)
           ~doc:"JSON DataProtectionConfig"
       and customResponseBodies =
         flag "custom-response-bodies" (optional json_arg)
           ~doc:"JSON CustomResponseBodies"
       and captchaConfig =
         flag "captcha-config" (optional json_arg) ~doc:"JSON CaptchaConfig"
       and challengeConfig =
         flag "challenge-config" (optional json_arg)
           ~doc:"JSON ChallengeConfig"
       and tokenDomains =
         flag "token-domains" (optional json_arg) ~doc:"JSON TokenDomains"
       and associationConfig =
         flag "association-config" (optional json_arg)
           ~doc:"JSON AssociationConfig"
       and onSourceDDoSProtectionConfig =
         flag "on-source-d-do-s-protection-config" (optional json_arg)
           ~doc:"JSON OnSourceDDoSProtectionConfig"
       and applicationConfig =
         flag "application-config" (optional json_arg)
           ~doc:"JSON ApplicationConfig"
       and name = flag "name" (required string) ~doc:"STRING EntityName"
       and scope = flag "scope" (required json_arg) ~doc:"JSON Scope"
       and id = flag "id" (required string) ~doc:"STRING EntityId"
       and defaultAction =
         flag "default-action" (required json_arg) ~doc:"JSON DefaultAction"
       and visibilityConfig =
         flag "visibility-config" (required json_arg)
           ~doc:"JSON VisibilityConfig"
       and lockToken =
         flag "lock-token" (required string) ~doc:"STRING LockToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_web_a_c_l
           (Values.UpdateWebACLRequest.make ?description
              ?rules:(Option.map ~f:Values.Rules.of_json rules)
              ?dataProtectionConfig:(Option.map
                                       ~f:Values.DataProtectionConfig.of_json
                                       dataProtectionConfig)
              ?customResponseBodies:(Option.map
                                       ~f:Values.CustomResponseBodies.of_json
                                       customResponseBodies)
              ?captchaConfig:(Option.map ~f:Values.CaptchaConfig.of_json
                                captchaConfig)
              ?challengeConfig:(Option.map ~f:Values.ChallengeConfig.of_json
                                  challengeConfig)
              ?tokenDomains:(Option.map ~f:Values.TokenDomains.of_json
                               tokenDomains)
              ?associationConfig:(Option.map
                                    ~f:Values.AssociationConfig.of_json
                                    associationConfig)
              ?onSourceDDoSProtectionConfig:(Option.map
                                               ~f:Values.OnSourceDDoSProtectionConfig.of_json
                                               onSourceDDoSProtectionConfig)
              ?applicationConfig:(Option.map
                                    ~f:Values.ApplicationConfig.of_json
                                    applicationConfig) ~name
              ~scope:(Values.Scope.of_json scope) ~id
              ~defaultAction:(Values.DefaultAction.of_json defaultAction)
              ~visibilityConfig:(Values.VisibilityConfig.of_json
                                   visibilityConfig) ~lockToken ())
           (Some Values.UpdateWebACLResponse.to_json)
           (Some Values.UpdateWebACLResponse.error_to_json)])
let main =
  Command.group
    ~summary:((Awso.Service.to_string Values.service) ^ " commands")
    [("associate-web-a-c-l", associate_web_a_c_l);
    ("check-capacity", check_capacity);
    ("create-a-p-i-key", create_a_p_i_key);
    ("create-i-p-set", create_i_p_set);
    ("create-regex-pattern-set", create_regex_pattern_set);
    ("create-rule-group", create_rule_group);
    ("create-web-a-c-l", create_web_a_c_l);
    ("delete-a-p-i-key", delete_a_p_i_key);
    ("delete-firewall-manager-rule-groups",
      delete_firewall_manager_rule_groups);
    ("delete-i-p-set", delete_i_p_set);
    ("delete-logging-configuration", delete_logging_configuration);
    ("delete-permission-policy", delete_permission_policy);
    ("delete-regex-pattern-set", delete_regex_pattern_set);
    ("delete-rule-group", delete_rule_group);
    ("delete-web-a-c-l", delete_web_a_c_l);
    ("describe-all-managed-products", describe_all_managed_products);
    ("describe-managed-products-by-vendor",
      describe_managed_products_by_vendor);
    ("describe-managed-rule-group", describe_managed_rule_group);
    ("disassociate-web-a-c-l", disassociate_web_a_c_l);
    ("generate-mobile-sdk-release-url", generate_mobile_sdk_release_url);
    ("get-decrypted-a-p-i-key", get_decrypted_a_p_i_key);
    ("get-i-p-set", get_i_p_set);
    ("get-logging-configuration", get_logging_configuration);
    ("get-managed-rule-set", get_managed_rule_set);
    ("get-mobile-sdk-release", get_mobile_sdk_release);
    ("get-permission-policy", get_permission_policy);
    ("get-rate-based-statement-managed-keys",
      get_rate_based_statement_managed_keys);
    ("get-regex-pattern-set", get_regex_pattern_set);
    ("get-rule-group", get_rule_group);
    ("get-sampled-requests", get_sampled_requests);
    ("get-top-path-statistics-by-traffic",
      get_top_path_statistics_by_traffic);
    ("get-web-a-c-l", get_web_a_c_l);
    ("get-web-a-c-l-for-resource", get_web_a_c_l_for_resource);
    ("list-a-p-i-keys", list_a_p_i_keys);
    ("list-available-managed-rule-group-versions",
      list_available_managed_rule_group_versions);
    ("list-available-managed-rule-groups",
      list_available_managed_rule_groups);
    ("list-i-p-sets", list_i_p_sets);
    ("list-logging-configurations", list_logging_configurations);
    ("list-managed-rule-sets", list_managed_rule_sets);
    ("list-mobile-sdk-releases", list_mobile_sdk_releases);
    ("list-regex-pattern-sets", list_regex_pattern_sets);
    ("list-resources-for-web-a-c-l", list_resources_for_web_a_c_l);
    ("list-rule-groups", list_rule_groups);
    ("list-tags-for-resource", list_tags_for_resource);
    ("list-web-a-c-ls", list_web_a_c_ls);
    ("put-logging-configuration", put_logging_configuration);
    ("put-managed-rule-set-versions", put_managed_rule_set_versions);
    ("put-permission-policy", put_permission_policy);
    ("tag-resource", tag_resource);
    ("untag-resource", untag_resource);
    ("update-i-p-set", update_i_p_set);
    ("update-managed-rule-set-version-expiry-date",
      update_managed_rule_set_version_expiry_date);
    ("update-regex-pattern-set", update_regex_pattern_set);
    ("update-rule-group", update_rule_group);
    ("update-web-a-c-l", update_web_a_c_l)]