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
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_application_cloud_watch_logging_option =
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 currentApplicationVersionId =
flag "current-application-version-id" (optional json_arg)
~doc:"JSON ApplicationVersionId"
and conditionalToken =
flag "conditional-token" (optional string)
~doc:"STRING ConditionalToken"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and cloudWatchLoggingOption =
flag "cloud-watch-logging-option" (required json_arg)
~doc:"JSON CloudWatchLoggingOption" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.add_application_cloud_watch_logging_option
(Values.AddApplicationCloudWatchLoggingOptionRequest.make
?currentApplicationVersionId:(Option.map
~f:Values.ApplicationVersionId.of_json
currentApplicationVersionId)
?conditionalToken ~applicationName
~cloudWatchLoggingOption:(Values.CloudWatchLoggingOption.of_json
cloudWatchLoggingOption) ())
(Some Values.AddApplicationCloudWatchLoggingOptionResponse.to_json)
(Some
Values.AddApplicationCloudWatchLoggingOptionResponse.error_to_json)])
let add_application_input =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and input = flag "input" (required json_arg) ~doc:"JSON Input" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.add_application_input
(Values.AddApplicationInputRequest.make ~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~input:(Values.Input.of_json input) ())
(Some Values.AddApplicationInputResponse.to_json)
(Some Values.AddApplicationInputResponse.error_to_json)])
let add_application_input_processing_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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and inputId = flag "input-id" (required string) ~doc:"STRING Id"
and inputProcessingConfiguration =
flag "input-processing-configuration" (required json_arg)
~doc:"JSON InputProcessingConfiguration" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.add_application_input_processing_configuration
(Values.AddApplicationInputProcessingConfigurationRequest.make
~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~inputId
~inputProcessingConfiguration:(Values.InputProcessingConfiguration.of_json
inputProcessingConfiguration)
())
(Some
Values.AddApplicationInputProcessingConfigurationResponse.to_json)
(Some
Values.AddApplicationInputProcessingConfigurationResponse.error_to_json)])
let add_application_output =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and output = flag "output" (required json_arg) ~doc:"JSON Output" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.add_application_output
(Values.AddApplicationOutputRequest.make ~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~output:(Values.Output.of_json output) ())
(Some Values.AddApplicationOutputResponse.to_json)
(Some Values.AddApplicationOutputResponse.error_to_json)])
let add_application_reference_data_source =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and referenceDataSource =
flag "reference-data-source" (required json_arg)
~doc:"JSON ReferenceDataSource" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.add_application_reference_data_source
(Values.AddApplicationReferenceDataSourceRequest.make
~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~referenceDataSource:(Values.ReferenceDataSource.of_json
referenceDataSource) ())
(Some Values.AddApplicationReferenceDataSourceResponse.to_json)
(Some
Values.AddApplicationReferenceDataSourceResponse.error_to_json)])
let add_application_vpc_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 currentApplicationVersionId =
flag "current-application-version-id" (optional json_arg)
~doc:"JSON ApplicationVersionId"
and conditionalToken =
flag "conditional-token" (optional string)
~doc:"STRING ConditionalToken"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and vpcConfiguration =
flag "vpc-configuration" (required json_arg)
~doc:"JSON VpcConfiguration" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.add_application_vpc_configuration
(Values.AddApplicationVpcConfigurationRequest.make
?currentApplicationVersionId:(Option.map
~f:Values.ApplicationVersionId.of_json
currentApplicationVersionId)
?conditionalToken ~applicationName
~vpcConfiguration:(Values.VpcConfiguration.of_json
vpcConfiguration) ())
(Some Values.AddApplicationVpcConfigurationResponse.to_json)
(Some Values.AddApplicationVpcConfigurationResponse.error_to_json)])
let create_application =
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 applicationDescription =
flag "application-description" (optional string)
~doc:"STRING ApplicationDescription"
and applicationConfiguration =
flag "application-configuration" (optional json_arg)
~doc:"JSON ApplicationConfiguration"
and cloudWatchLoggingOptions =
flag "cloud-watch-logging-options" (optional json_arg)
~doc:"JSON CloudWatchLoggingOptions"
and tags = flag "tags" (optional json_arg) ~doc:"JSON Tags"
and applicationMode =
flag "application-mode" (optional json_arg)
~doc:"JSON ApplicationMode"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and runtimeEnvironment =
flag "runtime-environment" (required json_arg)
~doc:"JSON RuntimeEnvironment"
and serviceExecutionRole =
flag "service-execution-role" (required string)
~doc:"STRING RoleARN" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.create_application
(Values.CreateApplicationRequest.make ?applicationDescription
?applicationConfiguration:(Option.map
~f:Values.ApplicationConfiguration.of_json
applicationConfiguration)
?cloudWatchLoggingOptions:(Option.map
~f:Values.CloudWatchLoggingOptions.of_json
cloudWatchLoggingOptions)
?tags:(Option.map ~f:Values.Tags.of_json tags)
?applicationMode:(Option.map ~f:Values.ApplicationMode.of_json
applicationMode) ~applicationName
~runtimeEnvironment:(Values.RuntimeEnvironment.of_json
runtimeEnvironment)
~serviceExecutionRole ())
(Some Values.CreateApplicationResponse.to_json)
(Some Values.CreateApplicationResponse.error_to_json)])
let create_application_presigned_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 sessionExpirationDurationInSeconds =
flag "session-expiration-duration-in-seconds" (optional json_arg)
~doc:"JSON SessionExpirationDurationInSeconds"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and urlType = flag "url-type" (required json_arg) ~doc:"JSON UrlType" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.create_application_presigned_url
(Values.CreateApplicationPresignedUrlRequest.make
?sessionExpirationDurationInSeconds:(Option.map
~f:Values.SessionExpirationDurationInSeconds.of_json
sessionExpirationDurationInSeconds)
~applicationName ~urlType:(Values.UrlType.of_json urlType) ())
(Some Values.CreateApplicationPresignedUrlResponse.to_json)
(Some Values.CreateApplicationPresignedUrlResponse.error_to_json)])
let create_application_snapshot =
Command.async ~summary:""
([%map_open.Command
let cli_profile =
flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
and cli_region =
flag "-cli-region" (optional string) ~doc:"REGION override region"
and endpoint_url =
flag "-endpoint-url" (optional string)
~doc:"URL override endpoint url"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and snapshotName =
flag "snapshot-name" (required string) ~doc:"STRING SnapshotName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.create_application_snapshot
(Values.CreateApplicationSnapshotRequest.make ~applicationName
~snapshotName ())
(Some Values.CreateApplicationSnapshotResponse.to_json)
(Some Values.CreateApplicationSnapshotResponse.error_to_json)])
let delete_application =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and createTimestamp =
flag "create-timestamp" (required json_arg) ~doc:"JSON Timestamp" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application
(Values.DeleteApplicationRequest.make ~applicationName
~createTimestamp:(Values.Timestamp.of_json createTimestamp) ())
(Some Values.DeleteApplicationResponse.to_json)
(Some Values.DeleteApplicationResponse.error_to_json)])
let delete_application_cloud_watch_logging_option =
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 currentApplicationVersionId =
flag "current-application-version-id" (optional json_arg)
~doc:"JSON ApplicationVersionId"
and conditionalToken =
flag "conditional-token" (optional string)
~doc:"STRING ConditionalToken"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and cloudWatchLoggingOptionId =
flag "cloud-watch-logging-option-id" (required string)
~doc:"STRING Id" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application_cloud_watch_logging_option
(Values.DeleteApplicationCloudWatchLoggingOptionRequest.make
?currentApplicationVersionId:(Option.map
~f:Values.ApplicationVersionId.of_json
currentApplicationVersionId)
?conditionalToken ~applicationName ~cloudWatchLoggingOptionId
())
(Some
Values.DeleteApplicationCloudWatchLoggingOptionResponse.to_json)
(Some
Values.DeleteApplicationCloudWatchLoggingOptionResponse.error_to_json)])
let delete_application_input_processing_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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and inputId = flag "input-id" (required string) ~doc:"STRING Id" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application_input_processing_configuration
(Values.DeleteApplicationInputProcessingConfigurationRequest.make
~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~inputId ())
(Some
Values.DeleteApplicationInputProcessingConfigurationResponse.to_json)
(Some
Values.DeleteApplicationInputProcessingConfigurationResponse.error_to_json)])
let delete_application_output =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and outputId = flag "output-id" (required string) ~doc:"STRING Id" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application_output
(Values.DeleteApplicationOutputRequest.make ~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~outputId ())
(Some Values.DeleteApplicationOutputResponse.to_json)
(Some Values.DeleteApplicationOutputResponse.error_to_json)])
let delete_application_reference_data_source =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId"
and referenceId =
flag "reference-id" (required string) ~doc:"STRING Id" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application_reference_data_source
(Values.DeleteApplicationReferenceDataSourceRequest.make
~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId)
~referenceId ())
(Some Values.DeleteApplicationReferenceDataSourceResponse.to_json)
(Some
Values.DeleteApplicationReferenceDataSourceResponse.error_to_json)])
let delete_application_snapshot =
Command.async ~summary:""
([%map_open.Command
let cli_profile =
flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
and cli_region =
flag "-cli-region" (optional string) ~doc:"REGION override region"
and endpoint_url =
flag "-endpoint-url" (optional string)
~doc:"URL override endpoint url"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and snapshotName =
flag "snapshot-name" (required string) ~doc:"STRING SnapshotName"
and snapshotCreationTimestamp =
flag "snapshot-creation-timestamp" (required json_arg)
~doc:"JSON Timestamp" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application_snapshot
(Values.DeleteApplicationSnapshotRequest.make ~applicationName
~snapshotName
~snapshotCreationTimestamp:(Values.Timestamp.of_json
snapshotCreationTimestamp) ())
(Some Values.DeleteApplicationSnapshotResponse.to_json)
(Some Values.DeleteApplicationSnapshotResponse.error_to_json)])
let delete_application_vpc_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 currentApplicationVersionId =
flag "current-application-version-id" (optional json_arg)
~doc:"JSON ApplicationVersionId"
and conditionalToken =
flag "conditional-token" (optional string)
~doc:"STRING ConditionalToken"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and vpcConfigurationId =
flag "vpc-configuration-id" (required string) ~doc:"STRING Id" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.delete_application_vpc_configuration
(Values.DeleteApplicationVpcConfigurationRequest.make
?currentApplicationVersionId:(Option.map
~f:Values.ApplicationVersionId.of_json
currentApplicationVersionId)
?conditionalToken ~applicationName ~vpcConfigurationId ())
(Some Values.DeleteApplicationVpcConfigurationResponse.to_json)
(Some
Values.DeleteApplicationVpcConfigurationResponse.error_to_json)])
let describe_application =
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 includeAdditionalDetails =
flag "include-additional-details" (optional bool)
~doc:"BOOL BooleanObject"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.describe_application
(Values.DescribeApplicationRequest.make ?includeAdditionalDetails
~applicationName ())
(Some Values.DescribeApplicationResponse.to_json)
(Some Values.DescribeApplicationResponse.error_to_json)])
let describe_application_operation =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and operationId =
flag "operation-id" (required string) ~doc:"STRING OperationId" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.describe_application_operation
(Values.DescribeApplicationOperationRequest.make ~applicationName
~operationId ())
(Some Values.DescribeApplicationOperationResponse.to_json)
(Some Values.DescribeApplicationOperationResponse.error_to_json)])
let describe_application_snapshot =
Command.async ~summary:""
([%map_open.Command
let cli_profile =
flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
and cli_region =
flag "-cli-region" (optional string) ~doc:"REGION override region"
and endpoint_url =
flag "-endpoint-url" (optional string)
~doc:"URL override endpoint url"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and snapshotName =
flag "snapshot-name" (required string) ~doc:"STRING SnapshotName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.describe_application_snapshot
(Values.DescribeApplicationSnapshotRequest.make ~applicationName
~snapshotName ())
(Some Values.DescribeApplicationSnapshotResponse.to_json)
(Some Values.DescribeApplicationSnapshotResponse.error_to_json)])
let describe_application_version =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and applicationVersionId =
flag "application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.describe_application_version
(Values.DescribeApplicationVersionRequest.make ~applicationName
~applicationVersionId:(Values.ApplicationVersionId.of_json
applicationVersionId) ())
(Some Values.DescribeApplicationVersionResponse.to_json)
(Some Values.DescribeApplicationVersionResponse.error_to_json)])
let discover_input_schema =
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" (optional string) ~doc:"STRING ResourceARN"
and inputStartingPositionConfiguration =
flag "input-starting-position-configuration" (optional json_arg)
~doc:"JSON InputStartingPositionConfiguration"
and s3Configuration =
flag "s3-configuration" (optional json_arg)
~doc:"JSON S3Configuration"
and inputProcessingConfiguration =
flag "input-processing-configuration" (optional json_arg)
~doc:"JSON InputProcessingConfiguration"
and serviceExecutionRole =
flag "service-execution-role" (required string)
~doc:"STRING RoleARN" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.discover_input_schema
(Values.DiscoverInputSchemaRequest.make ?resourceARN
?inputStartingPositionConfiguration:(Option.map
~f:Values.InputStartingPositionConfiguration.of_json
inputStartingPositionConfiguration)
?s3Configuration:(Option.map ~f:Values.S3Configuration.of_json
s3Configuration)
?inputProcessingConfiguration:(Option.map
~f:Values.InputProcessingConfiguration.of_json
inputProcessingConfiguration)
~serviceExecutionRole ())
(Some Values.DiscoverInputSchemaResponse.to_json)
(Some Values.DiscoverInputSchemaResponse.error_to_json)])
let list_application_operations =
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 ListApplicationOperationsInputLimit"
and nextToken =
flag "next-token" (optional string) ~doc:"STRING NextToken"
and operation =
flag "operation" (optional string) ~doc:"STRING Operation"
and operationStatus =
flag "operation-status" (optional json_arg)
~doc:"JSON OperationStatus"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.list_application_operations
(Values.ListApplicationOperationsRequest.make ?limit ?nextToken
?operation
?operationStatus:(Option.map ~f:Values.OperationStatus.of_json
operationStatus) ~applicationName ())
(Some Values.ListApplicationOperationsResponse.to_json)
(Some Values.ListApplicationOperationsResponse.error_to_json)])
let list_application_snapshots =
Command.async ~summary:""
([%map_open.Command
let cli_profile =
flag "-cli-profile" (optional string) ~doc:"NAME aws profile to use"
and cli_region =
flag "-cli-region" (optional string) ~doc:"REGION override region"
and endpoint_url =
flag "-endpoint-url" (optional string)
~doc:"URL override endpoint url"
and limit =
flag "limit" (optional int) ~doc:"INT ListSnapshotsInputLimit"
and nextToken =
flag "next-token" (optional string) ~doc:"STRING NextToken"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.list_application_snapshots
(Values.ListApplicationSnapshotsRequest.make ?limit ?nextToken
~applicationName ())
(Some Values.ListApplicationSnapshotsResponse.to_json)
(Some Values.ListApplicationSnapshotsResponse.error_to_json)])
let list_application_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 limit =
flag "limit" (optional int)
~doc:"INT ListApplicationVersionsInputLimit"
and nextToken =
flag "next-token" (optional string) ~doc:"STRING NextToken"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.list_application_versions
(Values.ListApplicationVersionsRequest.make ?limit ?nextToken
~applicationName ())
(Some Values.ListApplicationVersionsResponse.to_json)
(Some Values.ListApplicationVersionsResponse.error_to_json)])
let list_applications =
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 ListApplicationsInputLimit"
and nextToken =
flag "next-token" (optional string) ~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.list_applications
(Values.ListApplicationsRequest.make ?limit ?nextToken ())
(Some Values.ListApplicationsResponse.to_json)
(Some Values.ListApplicationsResponse.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 resourceARN =
flag "resource-a-r-n" (required string)
~doc:"STRING KinesisAnalyticsARN" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.list_tags_for_resource
(Values.ListTagsForResourceRequest.make ~resourceARN ())
(Some Values.ListTagsForResourceResponse.to_json)
(Some Values.ListTagsForResourceResponse.error_to_json)])
let rollback_application =
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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and currentApplicationVersionId =
flag "current-application-version-id" (required json_arg)
~doc:"JSON ApplicationVersionId" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.rollback_application
(Values.RollbackApplicationRequest.make ~applicationName
~currentApplicationVersionId:(Values.ApplicationVersionId.of_json
currentApplicationVersionId) ())
(Some Values.RollbackApplicationResponse.to_json)
(Some Values.RollbackApplicationResponse.error_to_json)])
let start_application =
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 runConfiguration =
flag "run-configuration" (optional json_arg)
~doc:"JSON RunConfiguration"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.start_application
(Values.StartApplicationRequest.make
?runConfiguration:(Option.map
~f:Values.RunConfiguration.of_json
runConfiguration) ~applicationName ())
(Some Values.StartApplicationResponse.to_json)
(Some Values.StartApplicationResponse.error_to_json)])
let stop_application =
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 force = flag "force" (optional bool) ~doc:"BOOL BooleanObject"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.stop_application
(Values.StopApplicationRequest.make ?force ~applicationName ())
(Some Values.StopApplicationResponse.to_json)
(Some Values.StopApplicationResponse.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 KinesisAnalyticsARN"
and tags = flag "tags" (required json_arg) ~doc:"JSON Tags" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.tag_resource
(Values.TagResourceRequest.make ~resourceARN
~tags:(Values.Tags.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 KinesisAnalyticsARN"
and tagKeys = flag "tag-keys" (required json_arg) ~doc:"JSON TagKeys" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.untag_resource
(Values.UntagResourceRequest.make ~resourceARN
~tagKeys:(Values.TagKeys.of_json tagKeys) ())
(Some Values.UntagResourceResponse.to_json)
(Some Values.UntagResourceResponse.error_to_json)])
let update_application =
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 currentApplicationVersionId =
flag "current-application-version-id" (optional json_arg)
~doc:"JSON ApplicationVersionId"
and applicationConfigurationUpdate =
flag "application-configuration-update" (optional json_arg)
~doc:"JSON ApplicationConfigurationUpdate"
and serviceExecutionRoleUpdate =
flag "service-execution-role-update" (optional string)
~doc:"STRING RoleARN"
and runConfigurationUpdate =
flag "run-configuration-update" (optional json_arg)
~doc:"JSON RunConfigurationUpdate"
and cloudWatchLoggingOptionUpdates =
flag "cloud-watch-logging-option-updates" (optional json_arg)
~doc:"JSON CloudWatchLoggingOptionUpdates"
and conditionalToken =
flag "conditional-token" (optional string)
~doc:"STRING ConditionalToken"
and runtimeEnvironmentUpdate =
flag "runtime-environment-update" (optional json_arg)
~doc:"JSON RuntimeEnvironment"
and applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.update_application
(Values.UpdateApplicationRequest.make
?currentApplicationVersionId:(Option.map
~f:Values.ApplicationVersionId.of_json
currentApplicationVersionId)
?applicationConfigurationUpdate:(Option.map
~f:Values.ApplicationConfigurationUpdate.of_json
applicationConfigurationUpdate)
?serviceExecutionRoleUpdate
?runConfigurationUpdate:(Option.map
~f:Values.RunConfigurationUpdate.of_json
runConfigurationUpdate)
?cloudWatchLoggingOptionUpdates:(Option.map
~f:Values.CloudWatchLoggingOptionUpdates.of_json
cloudWatchLoggingOptionUpdates)
?conditionalToken
?runtimeEnvironmentUpdate:(Option.map
~f:Values.RuntimeEnvironment.of_json
runtimeEnvironmentUpdate)
~applicationName ())
(Some Values.UpdateApplicationResponse.to_json)
(Some Values.UpdateApplicationResponse.error_to_json)])
let update_application_maintenance_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 applicationName =
flag "application-name" (required string)
~doc:"STRING ApplicationName"
and applicationMaintenanceConfigurationUpdate =
flag "application-maintenance-configuration-update"
(required json_arg)
~doc:"JSON ApplicationMaintenanceConfigurationUpdate" in
fun () ->
call ?endpoint_url ?profile:cli_profile ?region:cli_region
Io.update_application_maintenance_configuration
(Values.UpdateApplicationMaintenanceConfigurationRequest.make
~applicationName
~applicationMaintenanceConfigurationUpdate:(Values.ApplicationMaintenanceConfigurationUpdate.of_json
applicationMaintenanceConfigurationUpdate)
())
(Some
Values.UpdateApplicationMaintenanceConfigurationResponse.to_json)
(Some
Values.UpdateApplicationMaintenanceConfigurationResponse.error_to_json)])
let main =
Command.group
~summary:((Awso.Service.to_string Values.service) ^ " commands")
[("add-application-cloud-watch-logging-option",
add_application_cloud_watch_logging_option);
("add-application-input", add_application_input);
("add-application-input-processing-configuration",
add_application_input_processing_configuration);
("add-application-output", add_application_output);
("add-application-reference-data-source",
add_application_reference_data_source);
("add-application-vpc-configuration", add_application_vpc_configuration);
("create-application", create_application);
("create-application-presigned-url", create_application_presigned_url);
("create-application-snapshot", create_application_snapshot);
("delete-application", delete_application);
("delete-application-cloud-watch-logging-option",
delete_application_cloud_watch_logging_option);
("delete-application-input-processing-configuration",
delete_application_input_processing_configuration);
("delete-application-output", delete_application_output);
("delete-application-reference-data-source",
delete_application_reference_data_source);
("delete-application-snapshot", delete_application_snapshot);
("delete-application-vpc-configuration",
delete_application_vpc_configuration);
("describe-application", describe_application);
("describe-application-operation", describe_application_operation);
("describe-application-snapshot", describe_application_snapshot);
("describe-application-version", describe_application_version);
("discover-input-schema", discover_input_schema);
("list-application-operations", list_application_operations);
("list-application-snapshots", list_application_snapshots);
("list-application-versions", list_application_versions);
("list-applications", list_applications);
("list-tags-for-resource", list_tags_for_resource);
("rollback-application", rollback_application);
("start-application", start_application);
("stop-application", stop_application);
("tag-resource", tag_resource);
("untag-resource", untag_resource);
("update-application", update_application);
("update-application-maintenance-configuration",
update_application_maintenance_configuration)]