-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
api.go
5859 lines (5157 loc) · 206 KB
/
api.go
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
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package qldb
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
const opCancelJournalKinesisStream = "CancelJournalKinesisStream"
// CancelJournalKinesisStreamRequest generates a "aws/request.Request" representing the
// client's request for the CancelJournalKinesisStream operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CancelJournalKinesisStream for more information on using the CancelJournalKinesisStream
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CancelJournalKinesisStreamRequest method.
// req, resp := client.CancelJournalKinesisStreamRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/CancelJournalKinesisStream
func (c *QLDB) CancelJournalKinesisStreamRequest(input *CancelJournalKinesisStreamInput) (req *request.Request, output *CancelJournalKinesisStreamOutput) {
op := &request.Operation{
Name: opCancelJournalKinesisStream,
HTTPMethod: "DELETE",
HTTPPath: "/ledgers/{name}/journal-kinesis-streams/{streamId}",
}
if input == nil {
input = &CancelJournalKinesisStreamInput{}
}
output = &CancelJournalKinesisStreamOutput{}
req = c.newRequest(op, input, output)
return
}
// CancelJournalKinesisStream API operation for Amazon QLDB.
//
// Ends a given Amazon QLDB journal stream. Before a stream can be canceled,
// its current status must be ACTIVE.
//
// You can't restart a stream after you cancel it. Canceled QLDB stream resources
// are subject to a 7-day retention period, so they are automatically deleted
// after this limit expires.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation CancelJournalKinesisStream for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/CancelJournalKinesisStream
func (c *QLDB) CancelJournalKinesisStream(input *CancelJournalKinesisStreamInput) (*CancelJournalKinesisStreamOutput, error) {
req, out := c.CancelJournalKinesisStreamRequest(input)
return out, req.Send()
}
// CancelJournalKinesisStreamWithContext is the same as CancelJournalKinesisStream with the addition of
// the ability to pass a context and additional request options.
//
// See CancelJournalKinesisStream for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) CancelJournalKinesisStreamWithContext(ctx aws.Context, input *CancelJournalKinesisStreamInput, opts ...request.Option) (*CancelJournalKinesisStreamOutput, error) {
req, out := c.CancelJournalKinesisStreamRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateLedger = "CreateLedger"
// CreateLedgerRequest generates a "aws/request.Request" representing the
// client's request for the CreateLedger operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateLedger for more information on using the CreateLedger
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the CreateLedgerRequest method.
// req, resp := client.CreateLedgerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/CreateLedger
func (c *QLDB) CreateLedgerRequest(input *CreateLedgerInput) (req *request.Request, output *CreateLedgerOutput) {
op := &request.Operation{
Name: opCreateLedger,
HTTPMethod: "POST",
HTTPPath: "/ledgers",
}
if input == nil {
input = &CreateLedgerInput{}
}
output = &CreateLedgerOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateLedger API operation for Amazon QLDB.
//
// Creates a new ledger in your Amazon Web Services account in the current Region.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation CreateLedger for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceAlreadyExistsException
// The specified resource already exists.
//
// - LimitExceededException
// You have reached the limit on the maximum number of resources allowed.
//
// - ResourceInUseException
// The specified resource can't be modified at this time.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/CreateLedger
func (c *QLDB) CreateLedger(input *CreateLedgerInput) (*CreateLedgerOutput, error) {
req, out := c.CreateLedgerRequest(input)
return out, req.Send()
}
// CreateLedgerWithContext is the same as CreateLedger with the addition of
// the ability to pass a context and additional request options.
//
// See CreateLedger for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) CreateLedgerWithContext(ctx aws.Context, input *CreateLedgerInput, opts ...request.Option) (*CreateLedgerOutput, error) {
req, out := c.CreateLedgerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLedger = "DeleteLedger"
// DeleteLedgerRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLedger operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteLedger for more information on using the DeleteLedger
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DeleteLedgerRequest method.
// req, resp := client.DeleteLedgerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DeleteLedger
func (c *QLDB) DeleteLedgerRequest(input *DeleteLedgerInput) (req *request.Request, output *DeleteLedgerOutput) {
op := &request.Operation{
Name: opDeleteLedger,
HTTPMethod: "DELETE",
HTTPPath: "/ledgers/{name}",
}
if input == nil {
input = &DeleteLedgerInput{}
}
output = &DeleteLedgerOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// DeleteLedger API operation for Amazon QLDB.
//
// Deletes a ledger and all of its contents. This action is irreversible.
//
// If deletion protection is enabled, you must first disable it before you can
// delete the ledger. You can disable it by calling the UpdateLedger operation
// to set this parameter to false.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation DeleteLedger for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourceInUseException
// The specified resource can't be modified at this time.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DeleteLedger
func (c *QLDB) DeleteLedger(input *DeleteLedgerInput) (*DeleteLedgerOutput, error) {
req, out := c.DeleteLedgerRequest(input)
return out, req.Send()
}
// DeleteLedgerWithContext is the same as DeleteLedger with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLedger for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) DeleteLedgerWithContext(ctx aws.Context, input *DeleteLedgerInput, opts ...request.Option) (*DeleteLedgerOutput, error) {
req, out := c.DeleteLedgerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeJournalKinesisStream = "DescribeJournalKinesisStream"
// DescribeJournalKinesisStreamRequest generates a "aws/request.Request" representing the
// client's request for the DescribeJournalKinesisStream operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeJournalKinesisStream for more information on using the DescribeJournalKinesisStream
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DescribeJournalKinesisStreamRequest method.
// req, resp := client.DescribeJournalKinesisStreamRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeJournalKinesisStream
func (c *QLDB) DescribeJournalKinesisStreamRequest(input *DescribeJournalKinesisStreamInput) (req *request.Request, output *DescribeJournalKinesisStreamOutput) {
op := &request.Operation{
Name: opDescribeJournalKinesisStream,
HTTPMethod: "GET",
HTTPPath: "/ledgers/{name}/journal-kinesis-streams/{streamId}",
}
if input == nil {
input = &DescribeJournalKinesisStreamInput{}
}
output = &DescribeJournalKinesisStreamOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeJournalKinesisStream API operation for Amazon QLDB.
//
// Returns detailed information about a given Amazon QLDB journal stream. The
// output includes the Amazon Resource Name (ARN), stream name, current status,
// creation time, and the parameters of the original stream creation request.
//
// This action does not return any expired journal streams. For more information,
// see Expiration for terminal streams (https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration)
// in the Amazon QLDB Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation DescribeJournalKinesisStream for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeJournalKinesisStream
func (c *QLDB) DescribeJournalKinesisStream(input *DescribeJournalKinesisStreamInput) (*DescribeJournalKinesisStreamOutput, error) {
req, out := c.DescribeJournalKinesisStreamRequest(input)
return out, req.Send()
}
// DescribeJournalKinesisStreamWithContext is the same as DescribeJournalKinesisStream with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeJournalKinesisStream for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) DescribeJournalKinesisStreamWithContext(ctx aws.Context, input *DescribeJournalKinesisStreamInput, opts ...request.Option) (*DescribeJournalKinesisStreamOutput, error) {
req, out := c.DescribeJournalKinesisStreamRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeJournalS3Export = "DescribeJournalS3Export"
// DescribeJournalS3ExportRequest generates a "aws/request.Request" representing the
// client's request for the DescribeJournalS3Export operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeJournalS3Export for more information on using the DescribeJournalS3Export
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DescribeJournalS3ExportRequest method.
// req, resp := client.DescribeJournalS3ExportRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeJournalS3Export
func (c *QLDB) DescribeJournalS3ExportRequest(input *DescribeJournalS3ExportInput) (req *request.Request, output *DescribeJournalS3ExportOutput) {
op := &request.Operation{
Name: opDescribeJournalS3Export,
HTTPMethod: "GET",
HTTPPath: "/ledgers/{name}/journal-s3-exports/{exportId}",
}
if input == nil {
input = &DescribeJournalS3ExportInput{}
}
output = &DescribeJournalS3ExportOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeJournalS3Export API operation for Amazon QLDB.
//
// Returns information about a journal export job, including the ledger name,
// export ID, creation time, current status, and the parameters of the original
// export creation request.
//
// This action does not return any expired export jobs. For more information,
// see Export job expiration (https://docs.aws.amazon.com/qldb/latest/developerguide/export-journal.request.html#export-journal.request.expiration)
// in the Amazon QLDB Developer Guide.
//
// If the export job with the given ExportId doesn't exist, then throws ResourceNotFoundException.
//
// If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation DescribeJournalS3Export for usage and error information.
//
// Returned Error Types:
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeJournalS3Export
func (c *QLDB) DescribeJournalS3Export(input *DescribeJournalS3ExportInput) (*DescribeJournalS3ExportOutput, error) {
req, out := c.DescribeJournalS3ExportRequest(input)
return out, req.Send()
}
// DescribeJournalS3ExportWithContext is the same as DescribeJournalS3Export with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeJournalS3Export for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) DescribeJournalS3ExportWithContext(ctx aws.Context, input *DescribeJournalS3ExportInput, opts ...request.Option) (*DescribeJournalS3ExportOutput, error) {
req, out := c.DescribeJournalS3ExportRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeLedger = "DescribeLedger"
// DescribeLedgerRequest generates a "aws/request.Request" representing the
// client's request for the DescribeLedger operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeLedger for more information on using the DescribeLedger
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the DescribeLedgerRequest method.
// req, resp := client.DescribeLedgerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeLedger
func (c *QLDB) DescribeLedgerRequest(input *DescribeLedgerInput) (req *request.Request, output *DescribeLedgerOutput) {
op := &request.Operation{
Name: opDescribeLedger,
HTTPMethod: "GET",
HTTPPath: "/ledgers/{name}",
}
if input == nil {
input = &DescribeLedgerInput{}
}
output = &DescribeLedgerOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeLedger API operation for Amazon QLDB.
//
// Returns information about a ledger, including its state, permissions mode,
// encryption at rest settings, and when it was created.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation DescribeLedger for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/DescribeLedger
func (c *QLDB) DescribeLedger(input *DescribeLedgerInput) (*DescribeLedgerOutput, error) {
req, out := c.DescribeLedgerRequest(input)
return out, req.Send()
}
// DescribeLedgerWithContext is the same as DescribeLedger with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeLedger for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) DescribeLedgerWithContext(ctx aws.Context, input *DescribeLedgerInput, opts ...request.Option) (*DescribeLedgerOutput, error) {
req, out := c.DescribeLedgerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opExportJournalToS3 = "ExportJournalToS3"
// ExportJournalToS3Request generates a "aws/request.Request" representing the
// client's request for the ExportJournalToS3 operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ExportJournalToS3 for more information on using the ExportJournalToS3
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the ExportJournalToS3Request method.
// req, resp := client.ExportJournalToS3Request(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/ExportJournalToS3
func (c *QLDB) ExportJournalToS3Request(input *ExportJournalToS3Input) (req *request.Request, output *ExportJournalToS3Output) {
op := &request.Operation{
Name: opExportJournalToS3,
HTTPMethod: "POST",
HTTPPath: "/ledgers/{name}/journal-s3-exports",
}
if input == nil {
input = &ExportJournalToS3Input{}
}
output = &ExportJournalToS3Output{}
req = c.newRequest(op, input, output)
return
}
// ExportJournalToS3 API operation for Amazon QLDB.
//
// Exports journal contents within a date and time range from a ledger into
// a specified Amazon Simple Storage Service (Amazon S3) bucket. A journal export
// job can write the data objects in either the text or binary representation
// of Amazon Ion format, or in JSON Lines text format.
//
// If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException.
//
// If the ledger with the given Name is in CREATING status, then throws ResourcePreconditionNotMetException.
//
// You can initiate up to two concurrent journal export requests for each ledger.
// Beyond this limit, journal export requests throw LimitExceededException.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation ExportJournalToS3 for usage and error information.
//
// Returned Error Types:
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/ExportJournalToS3
func (c *QLDB) ExportJournalToS3(input *ExportJournalToS3Input) (*ExportJournalToS3Output, error) {
req, out := c.ExportJournalToS3Request(input)
return out, req.Send()
}
// ExportJournalToS3WithContext is the same as ExportJournalToS3 with the addition of
// the ability to pass a context and additional request options.
//
// See ExportJournalToS3 for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) ExportJournalToS3WithContext(ctx aws.Context, input *ExportJournalToS3Input, opts ...request.Option) (*ExportJournalToS3Output, error) {
req, out := c.ExportJournalToS3Request(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetBlock = "GetBlock"
// GetBlockRequest generates a "aws/request.Request" representing the
// client's request for the GetBlock operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetBlock for more information on using the GetBlock
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the GetBlockRequest method.
// req, resp := client.GetBlockRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/GetBlock
func (c *QLDB) GetBlockRequest(input *GetBlockInput) (req *request.Request, output *GetBlockOutput) {
op := &request.Operation{
Name: opGetBlock,
HTTPMethod: "POST",
HTTPPath: "/ledgers/{name}/block",
}
if input == nil {
input = &GetBlockInput{}
}
output = &GetBlockOutput{}
req = c.newRequest(op, input, output)
return
}
// GetBlock API operation for Amazon QLDB.
//
// Returns a block object at a specified address in a journal. Also returns
// a proof of the specified block for verification if DigestTipAddress is provided.
//
// For information about the data contents in a block, see Journal contents
// (https://docs.aws.amazon.com/qldb/latest/developerguide/journal-contents.html)
// in the Amazon QLDB Developer Guide.
//
// If the specified ledger doesn't exist or is in DELETING status, then throws
// ResourceNotFoundException.
//
// If the specified ledger is in CREATING status, then throws ResourcePreconditionNotMetException.
//
// If no block exists with the specified address, then throws InvalidParameterException.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation GetBlock for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/GetBlock
func (c *QLDB) GetBlock(input *GetBlockInput) (*GetBlockOutput, error) {
req, out := c.GetBlockRequest(input)
return out, req.Send()
}
// GetBlockWithContext is the same as GetBlock with the addition of
// the ability to pass a context and additional request options.
//
// See GetBlock for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) GetBlockWithContext(ctx aws.Context, input *GetBlockInput, opts ...request.Option) (*GetBlockOutput, error) {
req, out := c.GetBlockRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetDigest = "GetDigest"
// GetDigestRequest generates a "aws/request.Request" representing the
// client's request for the GetDigest operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetDigest for more information on using the GetDigest
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the GetDigestRequest method.
// req, resp := client.GetDigestRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/GetDigest
func (c *QLDB) GetDigestRequest(input *GetDigestInput) (req *request.Request, output *GetDigestOutput) {
op := &request.Operation{
Name: opGetDigest,
HTTPMethod: "POST",
HTTPPath: "/ledgers/{name}/digest",
}
if input == nil {
input = &GetDigestInput{}
}
output = &GetDigestOutput{}
req = c.newRequest(op, input, output)
return
}
// GetDigest API operation for Amazon QLDB.
//
// Returns the digest of a ledger at the latest committed block in the journal.
// The response includes a 256-bit hash value and a block address.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation GetDigest for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/GetDigest
func (c *QLDB) GetDigest(input *GetDigestInput) (*GetDigestOutput, error) {
req, out := c.GetDigestRequest(input)
return out, req.Send()
}
// GetDigestWithContext is the same as GetDigest with the addition of
// the ability to pass a context and additional request options.
//
// See GetDigest for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) GetDigestWithContext(ctx aws.Context, input *GetDigestInput, opts ...request.Option) (*GetDigestOutput, error) {
req, out := c.GetDigestRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetRevision = "GetRevision"
// GetRevisionRequest generates a "aws/request.Request" representing the
// client's request for the GetRevision operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetRevision for more information on using the GetRevision
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the GetRevisionRequest method.
// req, resp := client.GetRevisionRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/GetRevision
func (c *QLDB) GetRevisionRequest(input *GetRevisionInput) (req *request.Request, output *GetRevisionOutput) {
op := &request.Operation{
Name: opGetRevision,
HTTPMethod: "POST",
HTTPPath: "/ledgers/{name}/revision",
}
if input == nil {
input = &GetRevisionInput{}
}
output = &GetRevisionOutput{}
req = c.newRequest(op, input, output)
return
}
// GetRevision API operation for Amazon QLDB.
//
// Returns a revision data object for a specified document ID and block address.
// Also returns a proof of the specified revision for verification if DigestTipAddress
// is provided.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation GetRevision for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/GetRevision
func (c *QLDB) GetRevision(input *GetRevisionInput) (*GetRevisionOutput, error) {
req, out := c.GetRevisionRequest(input)
return out, req.Send()
}
// GetRevisionWithContext is the same as GetRevision with the addition of
// the ability to pass a context and additional request options.
//
// See GetRevision for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *QLDB) GetRevisionWithContext(ctx aws.Context, input *GetRevisionInput, opts ...request.Option) (*GetRevisionOutput, error) {
req, out := c.GetRevisionRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListJournalKinesisStreamsForLedger = "ListJournalKinesisStreamsForLedger"
// ListJournalKinesisStreamsForLedgerRequest generates a "aws/request.Request" representing the
// client's request for the ListJournalKinesisStreamsForLedger operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListJournalKinesisStreamsForLedger for more information on using the ListJournalKinesisStreamsForLedger
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// // Example sending a request using the ListJournalKinesisStreamsForLedgerRequest method.
// req, resp := client.ListJournalKinesisStreamsForLedgerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/ListJournalKinesisStreamsForLedger
func (c *QLDB) ListJournalKinesisStreamsForLedgerRequest(input *ListJournalKinesisStreamsForLedgerInput) (req *request.Request, output *ListJournalKinesisStreamsForLedgerOutput) {
op := &request.Operation{
Name: opListJournalKinesisStreamsForLedger,
HTTPMethod: "GET",
HTTPPath: "/ledgers/{name}/journal-kinesis-streams",
Paginator: &request.Paginator{
InputTokens: []string{"NextToken"},
OutputTokens: []string{"NextToken"},
LimitToken: "MaxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListJournalKinesisStreamsForLedgerInput{}
}
output = &ListJournalKinesisStreamsForLedgerOutput{}
req = c.newRequest(op, input, output)
return
}
// ListJournalKinesisStreamsForLedger API operation for Amazon QLDB.
//
// Returns all Amazon QLDB journal streams for a given ledger.
//
// This action does not return any expired journal streams. For more information,
// see Expiration for terminal streams (https://docs.aws.amazon.com/qldb/latest/developerguide/streams.create.html#streams.create.states.expiration)
// in the Amazon QLDB Developer Guide.
//
// This action returns a maximum of MaxResults items. It is paginated so that
// you can retrieve all the items by calling ListJournalKinesisStreamsForLedger
// multiple times.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon QLDB's
// API operation ListJournalKinesisStreamsForLedger for usage and error information.
//
// Returned Error Types:
//
// - InvalidParameterException
// One or more parameters in the request aren't valid.
//
// - ResourceNotFoundException
// The specified resource doesn't exist.
//
// - ResourcePreconditionNotMetException
// The operation failed because a condition wasn't satisfied in advance.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/ListJournalKinesisStreamsForLedger
func (c *QLDB) ListJournalKinesisStreamsForLedger(input *ListJournalKinesisStreamsForLedgerInput) (*ListJournalKinesisStreamsForLedgerOutput, error) {
req, out := c.ListJournalKinesisStreamsForLedgerRequest(input)
return out, req.Send()
}
// ListJournalKinesisStreamsForLedgerWithContext is the same as ListJournalKinesisStreamsForLedger with the addition of
// the ability to pass a context and additional request options.
//
// See ListJournalKinesisStreamsForLedger for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create