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
(* 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_tags_to_stream =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and tags = flag "tags" (required json_arg) ~doc:"JSON TagMap" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.add_tags_to_stream
           (Values.AddTagsToStreamInput.make ?streamName ?streamARN ?streamId
              ~tags:(Values.TagMap.of_json tags) ()) None None])
let create_stream =
  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 shardCount =
         flag "shard-count" (optional int) ~doc:"INT PositiveIntegerObject"
       and streamModeDetails =
         flag "stream-mode-details" (optional json_arg)
           ~doc:"JSON StreamModeDetails"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagMap"
       and warmThroughputMiBps =
         flag "warm-throughput-mi-bps" (optional int)
           ~doc:"INT NaturalIntegerObject"
       and maxRecordSizeInKiB =
         flag "max-record-size-in-ki-b" (optional int)
           ~doc:"INT MaxRecordSizeInKiB"
       and streamName =
         flag "stream-name" (required string) ~doc:"STRING StreamName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.create_stream
           (Values.CreateStreamInput.make ?shardCount
              ?streamModeDetails:(Option.map
                                    ~f:Values.StreamModeDetails.of_json
                                    streamModeDetails)
              ?tags:(Option.map ~f:Values.TagMap.of_json tags)
              ?warmThroughputMiBps ?maxRecordSizeInKiB ~streamName ()) None
           None])
let decrease_stream_retention_period =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and retentionPeriodHours =
         flag "retention-period-hours" (required int)
           ~doc:"INT RetentionPeriodHours" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.decrease_stream_retention_period
           (Values.DecreaseStreamRetentionPeriodInput.make ?streamName
              ?streamARN ?streamId ~retentionPeriodHours ()) None None])
let delete_resource_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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceARN" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_resource_policy
           (Values.DeleteResourcePolicyInput.make ?streamId ~resourceARN ())
           None None])
let delete_stream =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and enforceConsumerDeletion =
         flag "enforce-consumer-deletion" (optional bool)
           ~doc:"BOOL BooleanObject"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.delete_stream
           (Values.DeleteStreamInput.make ?streamName
              ?enforceConsumerDeletion ?streamARN ?streamId ()) None None])
let deregister_stream_consumer =
  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 streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and consumerName =
         flag "consumer-name" (optional string) ~doc:"STRING ConsumerName"
       and consumerARN =
         flag "consumer-a-r-n" (optional string) ~doc:"STRING ConsumerARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.deregister_stream_consumer
           (Values.DeregisterStreamConsumerInput.make ?streamARN
              ?consumerName ?consumerARN ?streamId ()) None None])
let describe_account_settings =
  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 () = return () in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_account_settings
           (Values.DescribeAccountSettingsInput.make ())
           (Some Values.DescribeAccountSettingsOutput.to_json)
           (Some Values.DescribeAccountSettingsOutput.error_to_json)])
let describe_limits =
  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 () = return () in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_limits (Values.DescribeLimitsInput.make ())
           (Some Values.DescribeLimitsOutput.to_json)
           (Some Values.DescribeLimitsOutput.error_to_json)])
let describe_stream =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and limit =
         flag "limit" (optional int) ~doc:"INT DescribeStreamInputLimit"
       and exclusiveStartShardId =
         flag "exclusive-start-shard-id" (optional string)
           ~doc:"STRING ShardId"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_stream
           (Values.DescribeStreamInput.make ?streamName ?limit
              ?exclusiveStartShardId ?streamARN ?streamId ())
           (Some Values.DescribeStreamOutput.to_json)
           (Some Values.DescribeStreamOutput.error_to_json)])
let describe_stream_consumer =
  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 streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and consumerName =
         flag "consumer-name" (optional string) ~doc:"STRING ConsumerName"
       and consumerARN =
         flag "consumer-a-r-n" (optional string) ~doc:"STRING ConsumerARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_stream_consumer
           (Values.DescribeStreamConsumerInput.make ?streamARN ?consumerName
              ?consumerARN ?streamId ())
           (Some Values.DescribeStreamConsumerOutput.to_json)
           (Some Values.DescribeStreamConsumerOutput.error_to_json)])
let describe_stream_summary =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.describe_stream_summary
           (Values.DescribeStreamSummaryInput.make ?streamName ?streamARN
              ?streamId ()) (Some Values.DescribeStreamSummaryOutput.to_json)
           (Some Values.DescribeStreamSummaryOutput.error_to_json)])
let disable_enhanced_monitoring =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and shardLevelMetrics =
         flag "shard-level-metrics" (required json_arg)
           ~doc:"JSON MetricsNameList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.disable_enhanced_monitoring
           (Values.DisableEnhancedMonitoringInput.make ?streamName ?streamARN
              ?streamId
              ~shardLevelMetrics:(Values.MetricsNameList.of_json
                                    shardLevelMetrics) ())
           (Some Values.EnhancedMonitoringOutput.to_json)
           (Some Values.EnhancedMonitoringOutput.error_to_json)])
let enable_enhanced_monitoring =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and shardLevelMetrics =
         flag "shard-level-metrics" (required json_arg)
           ~doc:"JSON MetricsNameList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.enable_enhanced_monitoring
           (Values.EnableEnhancedMonitoringInput.make ?streamName ?streamARN
              ?streamId
              ~shardLevelMetrics:(Values.MetricsNameList.of_json
                                    shardLevelMetrics) ())
           (Some Values.EnhancedMonitoringOutput.to_json)
           (Some Values.EnhancedMonitoringOutput.error_to_json)])
let get_records =
  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 limit =
         flag "limit" (optional int) ~doc:"INT GetRecordsInputLimit"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and shardIterator =
         flag "shard-iterator" (required string) ~doc:"STRING ShardIterator" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_records
           (Values.GetRecordsInput.make ?limit ?streamARN ?streamId
              ~shardIterator ()) (Some Values.GetRecordsOutput.to_json)
           (Some Values.GetRecordsOutput.error_to_json)])
let get_resource_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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceARN" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_resource_policy
           (Values.GetResourcePolicyInput.make ?streamId ~resourceARN ())
           (Some Values.GetResourcePolicyOutput.to_json)
           (Some Values.GetResourcePolicyOutput.error_to_json)])
let get_shard_iterator =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and startingSequenceNumber =
         flag "starting-sequence-number" (optional string)
           ~doc:"STRING SequenceNumber"
       and timestamp =
         flag "timestamp" (optional json_arg) ~doc:"JSON Timestamp"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and shardId = flag "shard-id" (required string) ~doc:"STRING ShardId"
       and shardIteratorType =
         flag "shard-iterator-type" (required json_arg)
           ~doc:"JSON ShardIteratorType" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.get_shard_iterator
           (Values.GetShardIteratorInput.make ?streamName
              ?startingSequenceNumber
              ?timestamp:(Option.map ~f:Values.Timestamp.of_json timestamp)
              ?streamARN ?streamId ~shardId
              ~shardIteratorType:(Values.ShardIteratorType.of_json
                                    shardIteratorType) ())
           (Some Values.GetShardIteratorOutput.to_json)
           (Some Values.GetShardIteratorOutput.error_to_json)])
let increase_stream_retention_period =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and retentionPeriodHours =
         flag "retention-period-hours" (required int)
           ~doc:"INT RetentionPeriodHours" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.increase_stream_retention_period
           (Values.IncreaseStreamRetentionPeriodInput.make ?streamName
              ?streamARN ?streamId ~retentionPeriodHours ()) None None])
let list_shards =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and exclusiveStartShardId =
         flag "exclusive-start-shard-id" (optional string)
           ~doc:"STRING ShardId"
       and maxResults =
         flag "max-results" (optional int) ~doc:"INT ListShardsInputLimit"
       and streamCreationTimestamp =
         flag "stream-creation-timestamp" (optional json_arg)
           ~doc:"JSON Timestamp"
       and shardFilter =
         flag "shard-filter" (optional json_arg) ~doc:"JSON ShardFilter"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_shards
           (Values.ListShardsInput.make ?streamName ?nextToken
              ?exclusiveStartShardId ?maxResults
              ?streamCreationTimestamp:(Option.map
                                          ~f:Values.Timestamp.of_json
                                          streamCreationTimestamp)
              ?shardFilter:(Option.map ~f:Values.ShardFilter.of_json
                              shardFilter) ?streamARN ?streamId ())
           (Some Values.ListShardsOutput.to_json)
           (Some Values.ListShardsOutput.error_to_json)])
let list_stream_consumers =
  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 nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken"
       and maxResults =
         flag "max-results" (optional int)
           ~doc:"INT ListStreamConsumersInputLimit"
       and streamCreationTimestamp =
         flag "stream-creation-timestamp" (optional json_arg)
           ~doc:"JSON Timestamp"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and streamARN =
         flag "stream-a-r-n" (required string) ~doc:"STRING StreamARN" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_stream_consumers
           (Values.ListStreamConsumersInput.make ?nextToken ?maxResults
              ?streamCreationTimestamp:(Option.map
                                          ~f:Values.Timestamp.of_json
                                          streamCreationTimestamp) ?streamId
              ~streamARN ()) (Some Values.ListStreamConsumersOutput.to_json)
           (Some Values.ListStreamConsumersOutput.error_to_json)])
let list_streams =
  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 limit =
         flag "limit" (optional int) ~doc:"INT ListStreamsInputLimit"
       and exclusiveStartStreamName =
         flag "exclusive-start-stream-name" (optional string)
           ~doc:"STRING StreamName"
       and nextToken =
         flag "next-token" (optional string) ~doc:"STRING NextToken" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_streams
           (Values.ListStreamsInput.make ?limit ?exclusiveStartStreamName
              ?nextToken ()) (Some Values.ListStreamsOutput.to_json)
           (Some Values.ListStreamsOutput.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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       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.ListTagsForResourceInput.make ?streamId ~resourceARN ())
           (Some Values.ListTagsForResourceOutput.to_json)
           (Some Values.ListTagsForResourceOutput.error_to_json)])
let list_tags_for_stream =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and exclusiveStartTagKey =
         flag "exclusive-start-tag-key" (optional string)
           ~doc:"STRING TagKey"
       and limit =
         flag "limit" (optional int) ~doc:"INT ListTagsForStreamInputLimit"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.list_tags_for_stream
           (Values.ListTagsForStreamInput.make ?streamName
              ?exclusiveStartTagKey ?limit ?streamARN ?streamId ())
           (Some Values.ListTagsForStreamOutput.to_json)
           (Some Values.ListTagsForStreamOutput.error_to_json)])
let merge_shards =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and shardToMerge =
         flag "shard-to-merge" (required string) ~doc:"STRING ShardId"
       and adjacentShardToMerge =
         flag "adjacent-shard-to-merge" (required string)
           ~doc:"STRING ShardId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.merge_shards
           (Values.MergeShardsInput.make ?streamName ?streamARN ?streamId
              ~shardToMerge ~adjacentShardToMerge ()) None None])
let put_record =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and explicitHashKey =
         flag "explicit-hash-key" (optional string) ~doc:"STRING HashKey"
       and sequenceNumberForOrdering =
         flag "sequence-number-for-ordering" (optional string)
           ~doc:"STRING SequenceNumber"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and data = flag "data" (required json_arg) ~doc:"JSON Data"
       and partitionKey =
         flag "partition-key" (required string) ~doc:"STRING PartitionKey" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_record
           (Values.PutRecordInput.make ?streamName ?explicitHashKey
              ?sequenceNumberForOrdering ?streamARN ?streamId
              ~data:(Values.Data.of_json data) ~partitionKey ())
           (Some Values.PutRecordOutput.to_json)
           (Some Values.PutRecordOutput.error_to_json)])
let put_records =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and records =
         flag "records" (required json_arg)
           ~doc:"JSON PutRecordsRequestEntryList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_records
           (Values.PutRecordsInput.make ?streamName ?streamARN ?streamId
              ~records:(Values.PutRecordsRequestEntryList.of_json records) ())
           (Some Values.PutRecordsOutput.to_json)
           (Some Values.PutRecordsOutput.error_to_json)])
let put_resource_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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceARN"
       and policy = flag "policy" (required string) ~doc:"STRING Policy" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.put_resource_policy
           (Values.PutResourcePolicyInput.make ?streamId ~resourceARN ~policy
              ()) None None])
let register_stream_consumer =
  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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and tags = flag "tags" (optional json_arg) ~doc:"JSON TagMap"
       and streamARN =
         flag "stream-a-r-n" (required string) ~doc:"STRING StreamARN"
       and consumerName =
         flag "consumer-name" (required string) ~doc:"STRING ConsumerName" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.register_stream_consumer
           (Values.RegisterStreamConsumerInput.make ?streamId
              ?tags:(Option.map ~f:Values.TagMap.of_json tags) ~streamARN
              ~consumerName ())
           (Some Values.RegisterStreamConsumerOutput.to_json)
           (Some Values.RegisterStreamConsumerOutput.error_to_json)])
let remove_tags_from_stream =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and tagKeys =
         flag "tag-keys" (required json_arg) ~doc:"JSON TagKeyList" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.remove_tags_from_stream
           (Values.RemoveTagsFromStreamInput.make ?streamName ?streamARN
              ?streamId ~tagKeys:(Values.TagKeyList.of_json tagKeys) ()) None
           None])
let split_shard =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and shardToSplit =
         flag "shard-to-split" (required string) ~doc:"STRING ShardId"
       and newStartingHashKey =
         flag "new-starting-hash-key" (required string) ~doc:"STRING HashKey" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.split_shard
           (Values.SplitShardInput.make ?streamName ?streamARN ?streamId
              ~shardToSplit ~newStartingHashKey ()) None None])
let start_stream_encryption =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and encryptionType =
         flag "encryption-type" (required json_arg)
           ~doc:"JSON EncryptionType"
       and keyId = flag "key-id" (required string) ~doc:"STRING KeyId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.start_stream_encryption
           (Values.StartStreamEncryptionInput.make ?streamName ?streamARN
              ?streamId
              ~encryptionType:(Values.EncryptionType.of_json encryptionType)
              ~keyId ()) None None])
let stop_stream_encryption =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and encryptionType =
         flag "encryption-type" (required json_arg)
           ~doc:"JSON EncryptionType"
       and keyId = flag "key-id" (required string) ~doc:"STRING KeyId" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.stop_stream_encryption
           (Values.StopStreamEncryptionInput.make ?streamName ?streamARN
              ?streamId
              ~encryptionType:(Values.EncryptionType.of_json encryptionType)
              ~keyId ()) None None])
let subscribe_to_shard =
  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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and consumerARN =
         flag "consumer-a-r-n" (required string) ~doc:"STRING ConsumerARN"
       and shardId = flag "shard-id" (required string) ~doc:"STRING ShardId"
       and startingPosition =
         flag "starting-position" (required json_arg)
           ~doc:"JSON StartingPosition" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.subscribe_to_shard
           (Values.SubscribeToShardInput.make ?streamId ~consumerARN ~shardId
              ~startingPosition:(Values.StartingPosition.of_json
                                   startingPosition) ())
           (Some Values.SubscribeToShardOutput.to_json)
           (Some Values.SubscribeToShardOutput.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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and tags = flag "tags" (required json_arg) ~doc:"JSON TagMap"
       and resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceARN" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.tag_resource
           (Values.TagResourceInput.make ?streamId
              ~tags:(Values.TagMap.of_json tags) ~resourceARN ()) None None])
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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and tagKeys =
         flag "tag-keys" (required json_arg) ~doc:"JSON TagKeyList"
       and resourceARN =
         flag "resource-a-r-n" (required string) ~doc:"STRING ResourceARN" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.untag_resource
           (Values.UntagResourceInput.make ?streamId
              ~tagKeys:(Values.TagKeyList.of_json tagKeys) ~resourceARN ())
           None None])
let update_account_settings =
  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 minimumThroughputBillingCommitment =
         flag "minimum-throughput-billing-commitment" (required json_arg)
           ~doc:"JSON MinimumThroughputBillingCommitmentInput" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_account_settings
           (Values.UpdateAccountSettingsInput.make
              ~minimumThroughputBillingCommitment:(Values.MinimumThroughputBillingCommitmentInput.of_json
                                                     minimumThroughputBillingCommitment)
              ()) (Some Values.UpdateAccountSettingsOutput.to_json)
           (Some Values.UpdateAccountSettingsOutput.error_to_json)])
let update_max_record_size =
  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 streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and maxRecordSizeInKiB =
         flag "max-record-size-in-ki-b" (required int)
           ~doc:"INT MaxRecordSizeInKiB" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_max_record_size
           (Values.UpdateMaxRecordSizeInput.make ?streamARN ?streamId
              ~maxRecordSizeInKiB ()) None None])
let update_shard_count =
  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 streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and targetShardCount =
         flag "target-shard-count" (required int)
           ~doc:"INT PositiveIntegerObject"
       and scalingType =
         flag "scaling-type" (required json_arg) ~doc:"JSON ScalingType" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_shard_count
           (Values.UpdateShardCountInput.make ?streamName ?streamARN
              ?streamId ~targetShardCount
              ~scalingType:(Values.ScalingType.of_json scalingType) ())
           (Some Values.UpdateShardCountOutput.to_json)
           (Some Values.UpdateShardCountOutput.error_to_json)])
let update_stream_mode =
  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 streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and warmThroughputMiBps =
         flag "warm-throughput-mi-bps" (optional int)
           ~doc:"INT NaturalIntegerObject"
       and streamARN =
         flag "stream-a-r-n" (required string) ~doc:"STRING StreamARN"
       and streamModeDetails =
         flag "stream-mode-details" (required json_arg)
           ~doc:"JSON StreamModeDetails" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_stream_mode
           (Values.UpdateStreamModeInput.make ?streamId ?warmThroughputMiBps
              ~streamARN
              ~streamModeDetails:(Values.StreamModeDetails.of_json
                                    streamModeDetails) ()) None None])
let update_stream_warm_throughput =
  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 streamARN =
         flag "stream-a-r-n" (optional string) ~doc:"STRING StreamARN"
       and streamName =
         flag "stream-name" (optional string) ~doc:"STRING StreamName"
       and streamId =
         flag "stream-id" (optional string) ~doc:"STRING StreamId"
       and warmThroughputMiBps =
         flag "warm-throughput-mi-bps" (required int)
           ~doc:"INT NaturalIntegerObject" in
       fun () ->
         call ?endpoint_url ?profile:cli_profile ?region:cli_region
           Io.update_stream_warm_throughput
           (Values.UpdateStreamWarmThroughputInput.make ?streamARN
              ?streamName ?streamId ~warmThroughputMiBps ())
           (Some Values.UpdateStreamWarmThroughputOutput.to_json)
           (Some Values.UpdateStreamWarmThroughputOutput.error_to_json)])
let main =
  Command.group
    ~summary:((Awso.Service.to_string Values.service) ^ " commands")
    [("add-tags-to-stream", add_tags_to_stream);
    ("create-stream", create_stream);
    ("decrease-stream-retention-period", decrease_stream_retention_period);
    ("delete-resource-policy", delete_resource_policy);
    ("delete-stream", delete_stream);
    ("deregister-stream-consumer", deregister_stream_consumer);
    ("describe-account-settings", describe_account_settings);
    ("describe-limits", describe_limits);
    ("describe-stream", describe_stream);
    ("describe-stream-consumer", describe_stream_consumer);
    ("describe-stream-summary", describe_stream_summary);
    ("disable-enhanced-monitoring", disable_enhanced_monitoring);
    ("enable-enhanced-monitoring", enable_enhanced_monitoring);
    ("get-records", get_records);
    ("get-resource-policy", get_resource_policy);
    ("get-shard-iterator", get_shard_iterator);
    ("increase-stream-retention-period", increase_stream_retention_period);
    ("list-shards", list_shards);
    ("list-stream-consumers", list_stream_consumers);
    ("list-streams", list_streams);
    ("list-tags-for-resource", list_tags_for_resource);
    ("list-tags-for-stream", list_tags_for_stream);
    ("merge-shards", merge_shards);
    ("put-record", put_record);
    ("put-records", put_records);
    ("put-resource-policy", put_resource_policy);
    ("register-stream-consumer", register_stream_consumer);
    ("remove-tags-from-stream", remove_tags_from_stream);
    ("split-shard", split_shard);
    ("start-stream-encryption", start_stream_encryption);
    ("stop-stream-encryption", stop_stream_encryption);
    ("subscribe-to-shard", subscribe_to_shard);
    ("tag-resource", tag_resource);
    ("untag-resource", untag_resource);
    ("update-account-settings", update_account_settings);
    ("update-max-record-size", update_max_record_size);
    ("update-shard-count", update_shard_count);
    ("update-stream-mode", update_stream_mode);
    ("update-stream-warm-throughput", update_stream_warm_throughput)]