-
Notifications
You must be signed in to change notification settings - Fork 243
/
client.rs
1765 lines (1738 loc) · 116 KB
/
client.rs
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 software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
pub(crate) client: aws_smithy_client::Client<C, M, R>,
pub(crate) conf: crate::Config,
}
/// Client for Amazon Kinesis Firehose
///
/// Client for invoking operations on Amazon Kinesis Firehose. Each operation on Amazon Kinesis Firehose is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
/// // create a shared configuration. This can be used & shared between multiple service clients.
/// let shared_config = aws_config::load_from_env().await;
/// let client = aws_sdk_firehose::Client::new(&shared_config);
/// // invoke an operation
/// /* let rsp = client
/// .<operation_name>().
/// .<param>("some value")
/// .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_firehose::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_firehose::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<Handle<C, M, R>>,
}
impl<C, M, R> std::clone::Clone for Client<C, M, R> {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl<C, M, R> From<aws_smithy_client::Client<C, M, R>> for Client<C, M, R> {
fn from(client: aws_smithy_client::Client<C, M, R>) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl<C, M, R> Client<C, M, R> {
/// Creates a client with the given service configuration.
pub fn with_config(client: aws_smithy_client::Client<C, M, R>, conf: crate::Config) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl<C, M, R> Client<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Constructs a fluent builder for the [`CreateDeliveryStream`](crate::client::fluent_builders::CreateDeliveryStream) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::CreateDeliveryStream::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::CreateDeliveryStream::set_delivery_stream_name): <p>The name of the delivery stream. This name must be unique per AWS account in the same AWS Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.</p>
/// - [`delivery_stream_type(DeliveryStreamType)`](crate::client::fluent_builders::CreateDeliveryStream::delivery_stream_type) / [`set_delivery_stream_type(Option<DeliveryStreamType>)`](crate::client::fluent_builders::CreateDeliveryStream::set_delivery_stream_type): <p>The delivery stream type. This parameter can be one of the following values:</p> <ul> <li> <p> <code>DirectPut</code>: Provider applications access the delivery stream directly.</p> </li> <li> <p> <code>KinesisStreamAsSource</code>: The delivery stream uses a Kinesis data stream as a source.</p> </li> </ul>
/// - [`kinesis_stream_source_configuration(KinesisStreamSourceConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::kinesis_stream_source_configuration) / [`set_kinesis_stream_source_configuration(Option<KinesisStreamSourceConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_kinesis_stream_source_configuration): <p>When a Kinesis data stream is used as the source for the delivery stream, a <code>KinesisStreamSourceConfiguration</code> containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.</p>
/// - [`delivery_stream_encryption_configuration_input(DeliveryStreamEncryptionConfigurationInput)`](crate::client::fluent_builders::CreateDeliveryStream::delivery_stream_encryption_configuration_input) / [`set_delivery_stream_encryption_configuration_input(Option<DeliveryStreamEncryptionConfigurationInput>)`](crate::client::fluent_builders::CreateDeliveryStream::set_delivery_stream_encryption_configuration_input): <p>Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).</p>
/// - [`s3_destination_configuration(S3DestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::s3_destination_configuration) / [`set_s3_destination_configuration(Option<S3DestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_s3_destination_configuration): <p>[Deprecated] The destination in Amazon S3. You can specify only one destination.</p>
/// - [`extended_s3_destination_configuration(ExtendedS3DestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::extended_s3_destination_configuration) / [`set_extended_s3_destination_configuration(Option<ExtendedS3DestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_extended_s3_destination_configuration): <p>The destination in Amazon S3. You can specify only one destination.</p>
/// - [`redshift_destination_configuration(RedshiftDestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::redshift_destination_configuration) / [`set_redshift_destination_configuration(Option<RedshiftDestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_redshift_destination_configuration): <p>The destination in Amazon Redshift. You can specify only one destination.</p>
/// - [`elasticsearch_destination_configuration(ElasticsearchDestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::elasticsearch_destination_configuration) / [`set_elasticsearch_destination_configuration(Option<ElasticsearchDestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_elasticsearch_destination_configuration): <p>The destination in Amazon ES. You can specify only one destination.</p>
/// - [`amazonopensearchservice_destination_configuration(AmazonopensearchserviceDestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::amazonopensearchservice_destination_configuration) / [`set_amazonopensearchservice_destination_configuration(Option<AmazonopensearchserviceDestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_amazonopensearchservice_destination_configuration): (undocumented)
/// - [`splunk_destination_configuration(SplunkDestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::splunk_destination_configuration) / [`set_splunk_destination_configuration(Option<SplunkDestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_splunk_destination_configuration): <p>The destination in Splunk. You can specify only one destination.</p>
/// - [`http_endpoint_destination_configuration(HttpEndpointDestinationConfiguration)`](crate::client::fluent_builders::CreateDeliveryStream::http_endpoint_destination_configuration) / [`set_http_endpoint_destination_configuration(Option<HttpEndpointDestinationConfiguration>)`](crate::client::fluent_builders::CreateDeliveryStream::set_http_endpoint_destination_configuration): <p>Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreateDeliveryStream::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreateDeliveryStream::set_tags): <p>A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to AWS resources. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the AWS Billing and Cost Management User Guide.</p> <p>You can specify up to 50 tags when creating a delivery stream.</p>
/// - On success, responds with [`CreateDeliveryStreamOutput`](crate::output::CreateDeliveryStreamOutput) with field(s):
/// - [`delivery_stream_arn(Option<String>)`](crate::output::CreateDeliveryStreamOutput::delivery_stream_arn): <p>The ARN of the delivery stream.</p>
/// - On failure, responds with [`SdkError<CreateDeliveryStreamError>`](crate::error::CreateDeliveryStreamError)
pub fn create_delivery_stream(&self) -> fluent_builders::CreateDeliveryStream<C, M, R> {
fluent_builders::CreateDeliveryStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteDeliveryStream`](crate::client::fluent_builders::DeleteDeliveryStream) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::DeleteDeliveryStream::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::DeleteDeliveryStream::set_delivery_stream_name): <p>The name of the delivery stream.</p>
/// - [`allow_force_delete(bool)`](crate::client::fluent_builders::DeleteDeliveryStream::allow_force_delete) / [`set_allow_force_delete(Option<bool>)`](crate::client::fluent_builders::DeleteDeliveryStream::set_allow_force_delete): <p>Set this to true if you want to delete the delivery stream even if Kinesis Data Firehose is unable to retire the grant for the CMK. Kinesis Data Firehose might be unable to retire the grant due to a customer error, such as when the CMK or the grant are in an invalid state. If you force deletion, you can then use the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html">RevokeGrant</a> operation to revoke the grant you gave to Kinesis Data Firehose. If a failure to retire the grant happens due to an AWS KMS issue, Kinesis Data Firehose keeps retrying the delete operation.</p> <p>The default value is false.</p>
/// - On success, responds with [`DeleteDeliveryStreamOutput`](crate::output::DeleteDeliveryStreamOutput)
/// - On failure, responds with [`SdkError<DeleteDeliveryStreamError>`](crate::error::DeleteDeliveryStreamError)
pub fn delete_delivery_stream(&self) -> fluent_builders::DeleteDeliveryStream<C, M, R> {
fluent_builders::DeleteDeliveryStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DescribeDeliveryStream`](crate::client::fluent_builders::DescribeDeliveryStream) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::DescribeDeliveryStream::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::DescribeDeliveryStream::set_delivery_stream_name): <p>The name of the delivery stream.</p>
/// - [`limit(i32)`](crate::client::fluent_builders::DescribeDeliveryStream::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::DescribeDeliveryStream::set_limit): <p>The limit on the number of destinations to return. You can have one destination per delivery stream.</p>
/// - [`exclusive_start_destination_id(impl Into<String>)`](crate::client::fluent_builders::DescribeDeliveryStream::exclusive_start_destination_id) / [`set_exclusive_start_destination_id(Option<String>)`](crate::client::fluent_builders::DescribeDeliveryStream::set_exclusive_start_destination_id): <p>The ID of the destination to start returning the destination information. Kinesis Data Firehose supports one destination per delivery stream.</p>
/// - On success, responds with [`DescribeDeliveryStreamOutput`](crate::output::DescribeDeliveryStreamOutput) with field(s):
/// - [`delivery_stream_description(Option<DeliveryStreamDescription>)`](crate::output::DescribeDeliveryStreamOutput::delivery_stream_description): <p>Information about the delivery stream.</p>
/// - On failure, responds with [`SdkError<DescribeDeliveryStreamError>`](crate::error::DescribeDeliveryStreamError)
pub fn describe_delivery_stream(&self) -> fluent_builders::DescribeDeliveryStream<C, M, R> {
fluent_builders::DescribeDeliveryStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListDeliveryStreams`](crate::client::fluent_builders::ListDeliveryStreams) operation.
///
/// - The fluent builder is configurable:
/// - [`limit(i32)`](crate::client::fluent_builders::ListDeliveryStreams::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListDeliveryStreams::set_limit): <p>The maximum number of delivery streams to list. The default value is 10.</p>
/// - [`delivery_stream_type(DeliveryStreamType)`](crate::client::fluent_builders::ListDeliveryStreams::delivery_stream_type) / [`set_delivery_stream_type(Option<DeliveryStreamType>)`](crate::client::fluent_builders::ListDeliveryStreams::set_delivery_stream_type): <p>The delivery stream type. This can be one of the following values:</p> <ul> <li> <p> <code>DirectPut</code>: Provider applications access the delivery stream directly.</p> </li> <li> <p> <code>KinesisStreamAsSource</code>: The delivery stream uses a Kinesis data stream as a source.</p> </li> </ul> <p>This parameter is optional. If this parameter is omitted, delivery streams of all types are returned.</p>
/// - [`exclusive_start_delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::ListDeliveryStreams::exclusive_start_delivery_stream_name) / [`set_exclusive_start_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::ListDeliveryStreams::set_exclusive_start_delivery_stream_name): <p>The list of delivery streams returned by this call to <code>ListDeliveryStreams</code> will start with the delivery stream whose name comes alphabetically immediately after the name you specify in <code>ExclusiveStartDeliveryStreamName</code>.</p>
/// - On success, responds with [`ListDeliveryStreamsOutput`](crate::output::ListDeliveryStreamsOutput) with field(s):
/// - [`delivery_stream_names(Option<Vec<String>>)`](crate::output::ListDeliveryStreamsOutput::delivery_stream_names): <p>The names of the delivery streams.</p>
/// - [`has_more_delivery_streams(Option<bool>)`](crate::output::ListDeliveryStreamsOutput::has_more_delivery_streams): <p>Indicates whether there are more delivery streams available to list.</p>
/// - On failure, responds with [`SdkError<ListDeliveryStreamsError>`](crate::error::ListDeliveryStreamsError)
pub fn list_delivery_streams(&self) -> fluent_builders::ListDeliveryStreams<C, M, R> {
fluent_builders::ListDeliveryStreams::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListTagsForDeliveryStream`](crate::client::fluent_builders::ListTagsForDeliveryStream) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::ListTagsForDeliveryStream::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::ListTagsForDeliveryStream::set_delivery_stream_name): <p>The name of the delivery stream whose tags you want to list.</p>
/// - [`exclusive_start_tag_key(impl Into<String>)`](crate::client::fluent_builders::ListTagsForDeliveryStream::exclusive_start_tag_key) / [`set_exclusive_start_tag_key(Option<String>)`](crate::client::fluent_builders::ListTagsForDeliveryStream::set_exclusive_start_tag_key): <p>The key to use as the starting point for the list of tags. If you set this parameter, <code>ListTagsForDeliveryStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>.</p>
/// - [`limit(i32)`](crate::client::fluent_builders::ListTagsForDeliveryStream::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListTagsForDeliveryStream::set_limit): <p>The number of tags to return. If this number is less than the total number of tags associated with the delivery stream, <code>HasMoreTags</code> is set to <code>true</code> in the response. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response. </p>
/// - On success, responds with [`ListTagsForDeliveryStreamOutput`](crate::output::ListTagsForDeliveryStreamOutput) with field(s):
/// - [`tags(Option<Vec<Tag>>)`](crate::output::ListTagsForDeliveryStreamOutput::tags): <p>A list of tags associated with <code>DeliveryStreamName</code>, starting with the first tag after <code>ExclusiveStartTagKey</code> and up to the specified <code>Limit</code>.</p>
/// - [`has_more_tags(Option<bool>)`](crate::output::ListTagsForDeliveryStreamOutput::has_more_tags): <p>If this is <code>true</code> in the response, more tags are available. To list the remaining tags, set <code>ExclusiveStartTagKey</code> to the key of the last tag returned and call <code>ListTagsForDeliveryStream</code> again.</p>
/// - On failure, responds with [`SdkError<ListTagsForDeliveryStreamError>`](crate::error::ListTagsForDeliveryStreamError)
pub fn list_tags_for_delivery_stream(
&self,
) -> fluent_builders::ListTagsForDeliveryStream<C, M, R> {
fluent_builders::ListTagsForDeliveryStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PutRecord`](crate::client::fluent_builders::PutRecord) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::PutRecord::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::PutRecord::set_delivery_stream_name): <p>The name of the delivery stream.</p>
/// - [`record(Record)`](crate::client::fluent_builders::PutRecord::record) / [`set_record(Option<Record>)`](crate::client::fluent_builders::PutRecord::set_record): <p>The record.</p>
/// - On success, responds with [`PutRecordOutput`](crate::output::PutRecordOutput) with field(s):
/// - [`record_id(Option<String>)`](crate::output::PutRecordOutput::record_id): <p>The ID of the record.</p>
/// - [`encrypted(Option<bool>)`](crate::output::PutRecordOutput::encrypted): <p>Indicates whether server-side encryption (SSE) was enabled during this operation.</p>
/// - On failure, responds with [`SdkError<PutRecordError>`](crate::error::PutRecordError)
pub fn put_record(&self) -> fluent_builders::PutRecord<C, M, R> {
fluent_builders::PutRecord::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`PutRecordBatch`](crate::client::fluent_builders::PutRecordBatch) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::PutRecordBatch::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::PutRecordBatch::set_delivery_stream_name): <p>The name of the delivery stream.</p>
/// - [`records(Vec<Record>)`](crate::client::fluent_builders::PutRecordBatch::records) / [`set_records(Option<Vec<Record>>)`](crate::client::fluent_builders::PutRecordBatch::set_records): <p>One or more records.</p>
/// - On success, responds with [`PutRecordBatchOutput`](crate::output::PutRecordBatchOutput) with field(s):
/// - [`failed_put_count(Option<i32>)`](crate::output::PutRecordBatchOutput::failed_put_count): <p>The number of records that might have failed processing. This number might be greater than 0 even if the <code>PutRecordBatch</code> call succeeds. Check <code>FailedPutCount</code> to determine whether there are records that you need to resend.</p>
/// - [`encrypted(Option<bool>)`](crate::output::PutRecordBatchOutput::encrypted): <p>Indicates whether server-side encryption (SSE) was enabled during this operation.</p>
/// - [`request_responses(Option<Vec<PutRecordBatchResponseEntry>>)`](crate::output::PutRecordBatchOutput::request_responses): <p>The results array. For each record, the index of the response element is the same as the index used in the request array.</p>
/// - On failure, responds with [`SdkError<PutRecordBatchError>`](crate::error::PutRecordBatchError)
pub fn put_record_batch(&self) -> fluent_builders::PutRecordBatch<C, M, R> {
fluent_builders::PutRecordBatch::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StartDeliveryStreamEncryption`](crate::client::fluent_builders::StartDeliveryStreamEncryption) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::StartDeliveryStreamEncryption::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::StartDeliveryStreamEncryption::set_delivery_stream_name): <p>The name of the delivery stream for which you want to enable server-side encryption (SSE).</p>
/// - [`delivery_stream_encryption_configuration_input(DeliveryStreamEncryptionConfigurationInput)`](crate::client::fluent_builders::StartDeliveryStreamEncryption::delivery_stream_encryption_configuration_input) / [`set_delivery_stream_encryption_configuration_input(Option<DeliveryStreamEncryptionConfigurationInput>)`](crate::client::fluent_builders::StartDeliveryStreamEncryption::set_delivery_stream_encryption_configuration_input): <p>Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).</p>
/// - On success, responds with [`StartDeliveryStreamEncryptionOutput`](crate::output::StartDeliveryStreamEncryptionOutput)
/// - On failure, responds with [`SdkError<StartDeliveryStreamEncryptionError>`](crate::error::StartDeliveryStreamEncryptionError)
pub fn start_delivery_stream_encryption(
&self,
) -> fluent_builders::StartDeliveryStreamEncryption<C, M, R> {
fluent_builders::StartDeliveryStreamEncryption::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StopDeliveryStreamEncryption`](crate::client::fluent_builders::StopDeliveryStreamEncryption) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::StopDeliveryStreamEncryption::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::StopDeliveryStreamEncryption::set_delivery_stream_name): <p>The name of the delivery stream for which you want to disable server-side encryption (SSE).</p>
/// - On success, responds with [`StopDeliveryStreamEncryptionOutput`](crate::output::StopDeliveryStreamEncryptionOutput)
/// - On failure, responds with [`SdkError<StopDeliveryStreamEncryptionError>`](crate::error::StopDeliveryStreamEncryptionError)
pub fn stop_delivery_stream_encryption(
&self,
) -> fluent_builders::StopDeliveryStreamEncryption<C, M, R> {
fluent_builders::StopDeliveryStreamEncryption::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`TagDeliveryStream`](crate::client::fluent_builders::TagDeliveryStream) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::TagDeliveryStream::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::TagDeliveryStream::set_delivery_stream_name): <p>The name of the delivery stream to which you want to add the tags.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::TagDeliveryStream::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::TagDeliveryStream::set_tags): <p>A set of key-value pairs to use to create the tags.</p>
/// - On success, responds with [`TagDeliveryStreamOutput`](crate::output::TagDeliveryStreamOutput)
/// - On failure, responds with [`SdkError<TagDeliveryStreamError>`](crate::error::TagDeliveryStreamError)
pub fn tag_delivery_stream(&self) -> fluent_builders::TagDeliveryStream<C, M, R> {
fluent_builders::TagDeliveryStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UntagDeliveryStream`](crate::client::fluent_builders::UntagDeliveryStream) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::UntagDeliveryStream::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::UntagDeliveryStream::set_delivery_stream_name): <p>The name of the delivery stream.</p>
/// - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::UntagDeliveryStream::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::UntagDeliveryStream::set_tag_keys): <p>A list of tag keys. Each corresponding tag is removed from the delivery stream.</p>
/// - On success, responds with [`UntagDeliveryStreamOutput`](crate::output::UntagDeliveryStreamOutput)
/// - On failure, responds with [`SdkError<UntagDeliveryStreamError>`](crate::error::UntagDeliveryStreamError)
pub fn untag_delivery_stream(&self) -> fluent_builders::UntagDeliveryStream<C, M, R> {
fluent_builders::UntagDeliveryStream::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateDestination`](crate::client::fluent_builders::UpdateDestination) operation.
///
/// - The fluent builder is configurable:
/// - [`delivery_stream_name(impl Into<String>)`](crate::client::fluent_builders::UpdateDestination::delivery_stream_name) / [`set_delivery_stream_name(Option<String>)`](crate::client::fluent_builders::UpdateDestination::set_delivery_stream_name): <p>The name of the delivery stream.</p>
/// - [`current_delivery_stream_version_id(impl Into<String>)`](crate::client::fluent_builders::UpdateDestination::current_delivery_stream_version_id) / [`set_current_delivery_stream_version_id(Option<String>)`](crate::client::fluent_builders::UpdateDestination::set_current_delivery_stream_version_id): <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
/// - [`destination_id(impl Into<String>)`](crate::client::fluent_builders::UpdateDestination::destination_id) / [`set_destination_id(Option<String>)`](crate::client::fluent_builders::UpdateDestination::set_destination_id): <p>The ID of the destination.</p>
/// - [`s3_destination_update(S3DestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::s3_destination_update) / [`set_s3_destination_update(Option<S3DestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_s3_destination_update): <p>[Deprecated] Describes an update for a destination in Amazon S3.</p>
/// - [`extended_s3_destination_update(ExtendedS3DestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::extended_s3_destination_update) / [`set_extended_s3_destination_update(Option<ExtendedS3DestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_extended_s3_destination_update): <p>Describes an update for a destination in Amazon S3.</p>
/// - [`redshift_destination_update(RedshiftDestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::redshift_destination_update) / [`set_redshift_destination_update(Option<RedshiftDestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_redshift_destination_update): <p>Describes an update for a destination in Amazon Redshift.</p>
/// - [`elasticsearch_destination_update(ElasticsearchDestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::elasticsearch_destination_update) / [`set_elasticsearch_destination_update(Option<ElasticsearchDestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_elasticsearch_destination_update): <p>Describes an update for a destination in Amazon ES.</p>
/// - [`amazonopensearchservice_destination_update(AmazonopensearchserviceDestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::amazonopensearchservice_destination_update) / [`set_amazonopensearchservice_destination_update(Option<AmazonopensearchserviceDestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_amazonopensearchservice_destination_update): (undocumented)
/// - [`splunk_destination_update(SplunkDestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::splunk_destination_update) / [`set_splunk_destination_update(Option<SplunkDestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_splunk_destination_update): <p>Describes an update for a destination in Splunk.</p>
/// - [`http_endpoint_destination_update(HttpEndpointDestinationUpdate)`](crate::client::fluent_builders::UpdateDestination::http_endpoint_destination_update) / [`set_http_endpoint_destination_update(Option<HttpEndpointDestinationUpdate>)`](crate::client::fluent_builders::UpdateDestination::set_http_endpoint_destination_update): <p>Describes an update to the specified HTTP endpoint destination.</p>
/// - On success, responds with [`UpdateDestinationOutput`](crate::output::UpdateDestinationOutput)
/// - On failure, responds with [`SdkError<UpdateDestinationError>`](crate::error::UpdateDestinationError)
pub fn update_destination(&self) -> fluent_builders::UpdateDestination<C, M, R> {
fluent_builders::UpdateDestination::new(self.handle.clone())
}
}
pub mod fluent_builders {
//!
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
//!
/// Fluent builder constructing a request to `CreateDeliveryStream`.
///
/// <p>Creates a Kinesis Data Firehose delivery stream.</p>
/// <p>By default, you can create up to 50 delivery streams per AWS Region.</p>
/// <p>This is an asynchronous operation that immediately returns. The initial status of the delivery stream is <code>CREATING</code>. After the delivery stream is created, its status is <code>ACTIVE</code> and it now accepts data. If the delivery stream creation fails, the status transitions to <code>CREATING_FAILED</code>. Attempts to send data to a delivery stream that is not in the <code>ACTIVE</code> state cause an exception. To check the state of a delivery stream, use <code>DescribeDeliveryStream</code>.</p>
/// <p>If the status of a delivery stream is <code>CREATING_FAILED</code>, this status doesn't change, and you can't invoke <code>CreateDeliveryStream</code> again on it. However, you can invoke the <code>DeleteDeliveryStream</code> operation to delete it.</p>
/// <p>A Kinesis Data Firehose delivery stream can be configured to receive records directly from providers using <code>PutRecord</code> or <code>PutRecordBatch</code>, or it can be configured to use an existing Kinesis stream as its source. To specify a Kinesis data stream as input, set the <code>DeliveryStreamType</code> parameter to <code>KinesisStreamAsSource</code>, and provide the Kinesis stream Amazon Resource Name (ARN) and role ARN in the <code>KinesisStreamSourceConfiguration</code> parameter.</p>
/// <p>To create a delivery stream with server-side encryption (SSE) enabled, include <code>DeliveryStreamEncryptionConfigurationInput</code> in your request. This is optional. You can also invoke <code>StartDeliveryStreamEncryption</code> to turn on SSE for an existing delivery stream that doesn't have SSE enabled.</p>
/// <p>A delivery stream is configured with a single destination: Amazon S3, Amazon ES, Amazon Redshift, or Splunk. You must specify only one of the following destination configuration parameters: <code>ExtendedS3DestinationConfiguration</code>, <code>S3DestinationConfiguration</code>, <code>ElasticsearchDestinationConfiguration</code>, <code>RedshiftDestinationConfiguration</code>, or <code>SplunkDestinationConfiguration</code>.</p>
/// <p>When you specify <code>S3DestinationConfiguration</code>, you can also provide the following optional values: BufferingHints, <code>EncryptionConfiguration</code>, and <code>CompressionFormat</code>. By default, if no <code>BufferingHints</code> value is provided, Kinesis Data Firehose buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied first. <code>BufferingHints</code> is a hint, so there are some cases where the service cannot adhere to these conditions strictly. For example, record boundaries might be such that the size is a little over or under the configured buffering size. By default, no encryption is performed. We strongly recommend that you enable encryption to ensure secure data storage in Amazon S3.</p>
/// <p>A few notes about Amazon Redshift as a destination:</p>
/// <ul>
/// <li> <p>An Amazon Redshift destination requires an S3 bucket as intermediate location. Kinesis Data Firehose first delivers data to Amazon S3 and then uses <code>COPY</code> syntax to load data into an Amazon Redshift table. This is specified in the <code>RedshiftDestinationConfiguration.S3Configuration</code> parameter.</p> </li>
/// <li> <p>The compression formats <code>SNAPPY</code> or <code>ZIP</code> cannot be specified in <code>RedshiftDestinationConfiguration.S3Configuration</code> because the Amazon Redshift <code>COPY</code> operation that reads from the S3 bucket doesn't support these compression formats.</p> </li>
/// <li> <p>We strongly recommend that you use the user name and password you provide exclusively with Kinesis Data Firehose, and that the permissions for the account are restricted for Amazon Redshift <code>INSERT</code> permissions.</p> </li>
/// </ul>
/// <p>Kinesis Data Firehose assumes the IAM role that is configured as part of the destination. The role should allow the Kinesis Data Firehose principal to assume the role, and the role should have permissions that allow the service to deliver the data. For more information, see <a href="https://docs.aws.amazon.com/firehose/latest/dev/controlling-access.html#using-iam-s3">Grant Kinesis Data Firehose Access to an Amazon S3 Destination</a> in the <i>Amazon Kinesis Data Firehose Developer Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateDeliveryStream<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::create_delivery_stream_input::Builder,
}
impl<C, M, R> CreateDeliveryStream<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `CreateDeliveryStream`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateDeliveryStreamOutput,
aws_smithy_http::result::SdkError<crate::error::CreateDeliveryStreamError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::CreateDeliveryStreamInputOperationOutputAlias,
crate::output::CreateDeliveryStreamOutput,
crate::error::CreateDeliveryStreamError,
crate::input::CreateDeliveryStreamInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the delivery stream. This name must be unique per AWS account in the same AWS Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.</p>
pub fn delivery_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.delivery_stream_name(input.into());
self
}
/// <p>The name of the delivery stream. This name must be unique per AWS account in the same AWS Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.</p>
pub fn set_delivery_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_delivery_stream_name(input);
self
}
/// <p>The delivery stream type. This parameter can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>DirectPut</code>: Provider applications access the delivery stream directly.</p> </li>
/// <li> <p> <code>KinesisStreamAsSource</code>: The delivery stream uses a Kinesis data stream as a source.</p> </li>
/// </ul>
pub fn delivery_stream_type(mut self, input: crate::model::DeliveryStreamType) -> Self {
self.inner = self.inner.delivery_stream_type(input);
self
}
/// <p>The delivery stream type. This parameter can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>DirectPut</code>: Provider applications access the delivery stream directly.</p> </li>
/// <li> <p> <code>KinesisStreamAsSource</code>: The delivery stream uses a Kinesis data stream as a source.</p> </li>
/// </ul>
pub fn set_delivery_stream_type(
mut self,
input: std::option::Option<crate::model::DeliveryStreamType>,
) -> Self {
self.inner = self.inner.set_delivery_stream_type(input);
self
}
/// <p>When a Kinesis data stream is used as the source for the delivery stream, a <code>KinesisStreamSourceConfiguration</code> containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.</p>
pub fn kinesis_stream_source_configuration(
mut self,
input: crate::model::KinesisStreamSourceConfiguration,
) -> Self {
self.inner = self.inner.kinesis_stream_source_configuration(input);
self
}
/// <p>When a Kinesis data stream is used as the source for the delivery stream, a <code>KinesisStreamSourceConfiguration</code> containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.</p>
pub fn set_kinesis_stream_source_configuration(
mut self,
input: std::option::Option<crate::model::KinesisStreamSourceConfiguration>,
) -> Self {
self.inner = self.inner.set_kinesis_stream_source_configuration(input);
self
}
/// <p>Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).</p>
pub fn delivery_stream_encryption_configuration_input(
mut self,
input: crate::model::DeliveryStreamEncryptionConfigurationInput,
) -> Self {
self.inner = self
.inner
.delivery_stream_encryption_configuration_input(input);
self
}
/// <p>Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).</p>
pub fn set_delivery_stream_encryption_configuration_input(
mut self,
input: std::option::Option<crate::model::DeliveryStreamEncryptionConfigurationInput>,
) -> Self {
self.inner = self
.inner
.set_delivery_stream_encryption_configuration_input(input);
self
}
/// <p>[Deprecated] The destination in Amazon S3. You can specify only one destination.</p>
pub fn s3_destination_configuration(
mut self,
input: crate::model::S3DestinationConfiguration,
) -> Self {
self.inner = self.inner.s3_destination_configuration(input);
self
}
/// <p>[Deprecated] The destination in Amazon S3. You can specify only one destination.</p>
pub fn set_s3_destination_configuration(
mut self,
input: std::option::Option<crate::model::S3DestinationConfiguration>,
) -> Self {
self.inner = self.inner.set_s3_destination_configuration(input);
self
}
/// <p>The destination in Amazon S3. You can specify only one destination.</p>
pub fn extended_s3_destination_configuration(
mut self,
input: crate::model::ExtendedS3DestinationConfiguration,
) -> Self {
self.inner = self.inner.extended_s3_destination_configuration(input);
self
}
/// <p>The destination in Amazon S3. You can specify only one destination.</p>
pub fn set_extended_s3_destination_configuration(
mut self,
input: std::option::Option<crate::model::ExtendedS3DestinationConfiguration>,
) -> Self {
self.inner = self.inner.set_extended_s3_destination_configuration(input);
self
}
/// <p>The destination in Amazon Redshift. You can specify only one destination.</p>
pub fn redshift_destination_configuration(
mut self,
input: crate::model::RedshiftDestinationConfiguration,
) -> Self {
self.inner = self.inner.redshift_destination_configuration(input);
self
}
/// <p>The destination in Amazon Redshift. You can specify only one destination.</p>
pub fn set_redshift_destination_configuration(
mut self,
input: std::option::Option<crate::model::RedshiftDestinationConfiguration>,
) -> Self {
self.inner = self.inner.set_redshift_destination_configuration(input);
self
}
/// <p>The destination in Amazon ES. You can specify only one destination.</p>
pub fn elasticsearch_destination_configuration(
mut self,
input: crate::model::ElasticsearchDestinationConfiguration,
) -> Self {
self.inner = self.inner.elasticsearch_destination_configuration(input);
self
}
/// <p>The destination in Amazon ES. You can specify only one destination.</p>
pub fn set_elasticsearch_destination_configuration(
mut self,
input: std::option::Option<crate::model::ElasticsearchDestinationConfiguration>,
) -> Self {
self.inner = self
.inner
.set_elasticsearch_destination_configuration(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn amazonopensearchservice_destination_configuration(
mut self,
input: crate::model::AmazonopensearchserviceDestinationConfiguration,
) -> Self {
self.inner = self
.inner
.amazonopensearchservice_destination_configuration(input);
self
}
#[allow(missing_docs)] // documentation missing in model
pub fn set_amazonopensearchservice_destination_configuration(
mut self,
input: std::option::Option<
crate::model::AmazonopensearchserviceDestinationConfiguration,
>,
) -> Self {
self.inner = self
.inner
.set_amazonopensearchservice_destination_configuration(input);
self
}
/// <p>The destination in Splunk. You can specify only one destination.</p>
pub fn splunk_destination_configuration(
mut self,
input: crate::model::SplunkDestinationConfiguration,
) -> Self {
self.inner = self.inner.splunk_destination_configuration(input);
self
}
/// <p>The destination in Splunk. You can specify only one destination.</p>
pub fn set_splunk_destination_configuration(
mut self,
input: std::option::Option<crate::model::SplunkDestinationConfiguration>,
) -> Self {
self.inner = self.inner.set_splunk_destination_configuration(input);
self
}
/// <p>Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.</p>
pub fn http_endpoint_destination_configuration(
mut self,
input: crate::model::HttpEndpointDestinationConfiguration,
) -> Self {
self.inner = self.inner.http_endpoint_destination_configuration(input);
self
}
/// <p>Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.</p>
pub fn set_http_endpoint_destination_configuration(
mut self,
input: std::option::Option<crate::model::HttpEndpointDestinationConfiguration>,
) -> Self {
self.inner = self
.inner
.set_http_endpoint_destination_configuration(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to AWS resources. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the AWS Billing and Cost Management User Guide.</p>
/// <p>You can specify up to 50 tags when creating a delivery stream.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to AWS resources. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the AWS Billing and Cost Management User Guide.</p>
/// <p>You can specify up to 50 tags when creating a delivery stream.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `DeleteDeliveryStream`.
///
/// <p>Deletes a delivery stream and its data.</p>
/// <p>To check the state of a delivery stream, use <code>DescribeDeliveryStream</code>. You can delete a delivery stream only if it is in one of the following states: <code>ACTIVE</code>, <code>DELETING</code>, <code>CREATING_FAILED</code>, or <code>DELETING_FAILED</code>. You can't delete a delivery stream that is in the <code>CREATING</code> state. While the deletion request is in process, the delivery stream is in the <code>DELETING</code> state.</p>
/// <p>While the delivery stream is in the <code>DELETING</code> state, the service might continue to accept records, but it doesn't make any guarantees with respect to delivering the data. Therefore, as a best practice, first stop any applications that are sending records before you delete a delivery stream.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DeleteDeliveryStream<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::delete_delivery_stream_input::Builder,
}
impl<C, M, R> DeleteDeliveryStream<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DeleteDeliveryStream`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DeleteDeliveryStreamOutput,
aws_smithy_http::result::SdkError<crate::error::DeleteDeliveryStreamError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DeleteDeliveryStreamInputOperationOutputAlias,
crate::output::DeleteDeliveryStreamOutput,
crate::error::DeleteDeliveryStreamError,
crate::input::DeleteDeliveryStreamInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the delivery stream.</p>
pub fn delivery_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.delivery_stream_name(input.into());
self
}
/// <p>The name of the delivery stream.</p>
pub fn set_delivery_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_delivery_stream_name(input);
self
}
/// <p>Set this to true if you want to delete the delivery stream even if Kinesis Data Firehose is unable to retire the grant for the CMK. Kinesis Data Firehose might be unable to retire the grant due to a customer error, such as when the CMK or the grant are in an invalid state. If you force deletion, you can then use the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html">RevokeGrant</a> operation to revoke the grant you gave to Kinesis Data Firehose. If a failure to retire the grant happens due to an AWS KMS issue, Kinesis Data Firehose keeps retrying the delete operation.</p>
/// <p>The default value is false.</p>
pub fn allow_force_delete(mut self, input: bool) -> Self {
self.inner = self.inner.allow_force_delete(input);
self
}
/// <p>Set this to true if you want to delete the delivery stream even if Kinesis Data Firehose is unable to retire the grant for the CMK. Kinesis Data Firehose might be unable to retire the grant due to a customer error, such as when the CMK or the grant are in an invalid state. If you force deletion, you can then use the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html">RevokeGrant</a> operation to revoke the grant you gave to Kinesis Data Firehose. If a failure to retire the grant happens due to an AWS KMS issue, Kinesis Data Firehose keeps retrying the delete operation.</p>
/// <p>The default value is false.</p>
pub fn set_allow_force_delete(mut self, input: std::option::Option<bool>) -> Self {
self.inner = self.inner.set_allow_force_delete(input);
self
}
}
/// Fluent builder constructing a request to `DescribeDeliveryStream`.
///
/// <p>Describes the specified delivery stream and its status. For example, after your delivery stream is created, call <code>DescribeDeliveryStream</code> to see whether the delivery stream is <code>ACTIVE</code> and therefore ready for data to be sent to it. </p>
/// <p>If the status of a delivery stream is <code>CREATING_FAILED</code>, this status doesn't change, and you can't invoke <code>CreateDeliveryStream</code> again on it. However, you can invoke the <code>DeleteDeliveryStream</code> operation to delete it. If the status is <code>DELETING_FAILED</code>, you can force deletion by invoking <code>DeleteDeliveryStream</code> again but with <code>DeleteDeliveryStreamInput$AllowForceDelete</code> set to true.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct DescribeDeliveryStream<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::describe_delivery_stream_input::Builder,
}
impl<C, M, R> DescribeDeliveryStream<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `DescribeDeliveryStream`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::DescribeDeliveryStreamOutput,
aws_smithy_http::result::SdkError<crate::error::DescribeDeliveryStreamError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::DescribeDeliveryStreamInputOperationOutputAlias,
crate::output::DescribeDeliveryStreamOutput,
crate::error::DescribeDeliveryStreamError,
crate::input::DescribeDeliveryStreamInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the delivery stream.</p>
pub fn delivery_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.delivery_stream_name(input.into());
self
}
/// <p>The name of the delivery stream.</p>
pub fn set_delivery_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_delivery_stream_name(input);
self
}
/// <p>The limit on the number of destinations to return. You can have one destination per delivery stream.</p>
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// <p>The limit on the number of destinations to return. You can have one destination per delivery stream.</p>
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
/// <p>The ID of the destination to start returning the destination information. Kinesis Data Firehose supports one destination per delivery stream.</p>
pub fn exclusive_start_destination_id(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.exclusive_start_destination_id(input.into());
self
}
/// <p>The ID of the destination to start returning the destination information. Kinesis Data Firehose supports one destination per delivery stream.</p>
pub fn set_exclusive_start_destination_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_exclusive_start_destination_id(input);
self
}
}
/// Fluent builder constructing a request to `ListDeliveryStreams`.
///
/// <p>Lists your delivery streams in alphabetical order of their names.</p>
/// <p>The number of delivery streams might be too large to return using a single call to <code>ListDeliveryStreams</code>. You can limit the number of delivery streams returned, using the <code>Limit</code> parameter. To determine whether there are more delivery streams to list, check the value of <code>HasMoreDeliveryStreams</code> in the output. If there are more delivery streams to list, you can request them by calling this operation again and setting the <code>ExclusiveStartDeliveryStreamName</code> parameter to the name of the last delivery stream returned in the last call.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListDeliveryStreams<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_delivery_streams_input::Builder,
}
impl<C, M, R> ListDeliveryStreams<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListDeliveryStreams`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListDeliveryStreamsOutput,
aws_smithy_http::result::SdkError<crate::error::ListDeliveryStreamsError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListDeliveryStreamsInputOperationOutputAlias,
crate::output::ListDeliveryStreamsOutput,
crate::error::ListDeliveryStreamsError,
crate::input::ListDeliveryStreamsInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The maximum number of delivery streams to list. The default value is 10.</p>
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// <p>The maximum number of delivery streams to list. The default value is 10.</p>
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
/// <p>The delivery stream type. This can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>DirectPut</code>: Provider applications access the delivery stream directly.</p> </li>
/// <li> <p> <code>KinesisStreamAsSource</code>: The delivery stream uses a Kinesis data stream as a source.</p> </li>
/// </ul>
/// <p>This parameter is optional. If this parameter is omitted, delivery streams of all types are returned.</p>
pub fn delivery_stream_type(mut self, input: crate::model::DeliveryStreamType) -> Self {
self.inner = self.inner.delivery_stream_type(input);
self
}
/// <p>The delivery stream type. This can be one of the following values:</p>
/// <ul>
/// <li> <p> <code>DirectPut</code>: Provider applications access the delivery stream directly.</p> </li>
/// <li> <p> <code>KinesisStreamAsSource</code>: The delivery stream uses a Kinesis data stream as a source.</p> </li>
/// </ul>
/// <p>This parameter is optional. If this parameter is omitted, delivery streams of all types are returned.</p>
pub fn set_delivery_stream_type(
mut self,
input: std::option::Option<crate::model::DeliveryStreamType>,
) -> Self {
self.inner = self.inner.set_delivery_stream_type(input);
self
}
/// <p>The list of delivery streams returned by this call to <code>ListDeliveryStreams</code> will start with the delivery stream whose name comes alphabetically immediately after the name you specify in <code>ExclusiveStartDeliveryStreamName</code>.</p>
pub fn exclusive_start_delivery_stream_name(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.inner = self
.inner
.exclusive_start_delivery_stream_name(input.into());
self
}
/// <p>The list of delivery streams returned by this call to <code>ListDeliveryStreams</code> will start with the delivery stream whose name comes alphabetically immediately after the name you specify in <code>ExclusiveStartDeliveryStreamName</code>.</p>
pub fn set_exclusive_start_delivery_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_exclusive_start_delivery_stream_name(input);
self
}
}
/// Fluent builder constructing a request to `ListTagsForDeliveryStream`.
///
/// <p>Lists the tags for the specified delivery stream. This operation has a limit of five transactions per second per account. </p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct ListTagsForDeliveryStream<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::list_tags_for_delivery_stream_input::Builder,
}
impl<C, M, R> ListTagsForDeliveryStream<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `ListTagsForDeliveryStream`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::ListTagsForDeliveryStreamOutput,
aws_smithy_http::result::SdkError<crate::error::ListTagsForDeliveryStreamError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::ListTagsForDeliveryStreamInputOperationOutputAlias,
crate::output::ListTagsForDeliveryStreamOutput,
crate::error::ListTagsForDeliveryStreamError,
crate::input::ListTagsForDeliveryStreamInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the delivery stream whose tags you want to list.</p>
pub fn delivery_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.delivery_stream_name(input.into());
self
}
/// <p>The name of the delivery stream whose tags you want to list.</p>
pub fn set_delivery_stream_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_delivery_stream_name(input);
self
}
/// <p>The key to use as the starting point for the list of tags. If you set this parameter, <code>ListTagsForDeliveryStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>.</p>
pub fn exclusive_start_tag_key(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.exclusive_start_tag_key(input.into());
self
}
/// <p>The key to use as the starting point for the list of tags. If you set this parameter, <code>ListTagsForDeliveryStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>.</p>
pub fn set_exclusive_start_tag_key(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_exclusive_start_tag_key(input);
self
}
/// <p>The number of tags to return. If this number is less than the total number of tags associated with the delivery stream, <code>HasMoreTags</code> is set to <code>true</code> in the response. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response. </p>
pub fn limit(mut self, input: i32) -> Self {
self.inner = self.inner.limit(input);
self
}
/// <p>The number of tags to return. If this number is less than the total number of tags associated with the delivery stream, <code>HasMoreTags</code> is set to <code>true</code> in the response. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response. </p>
pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
self.inner = self.inner.set_limit(input);
self
}
}
/// Fluent builder constructing a request to `PutRecord`.
///
/// <p>Writes a single data record into an Amazon Kinesis Data Firehose delivery stream. To write multiple data records into a delivery stream, use <code>PutRecordBatch</code>. Applications using these operations are referred to as producers.</p>
/// <p>By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB per second. If you use <code>PutRecord</code> and <code>PutRecordBatch</code>, the limits are an aggregate across these two operations for each delivery stream. For more information about limits and how to request an increase, see <a href="https://docs.aws.amazon.com/firehose/latest/dev/limits.html">Amazon Kinesis Data Firehose Limits</a>. </p>
/// <p>You must specify the name of the delivery stream and the data record when using <code>PutRecord</code>. The data record consists of a data blob that can be up to 1,000 KiB in size, and any kind of data. For example, it can be a segment from a log file, geographic location data, website clickstream data, and so on.</p>
/// <p>Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the destination, a common solution is to use delimiters in the data, such as a newline (<code>\n</code>) or some other character unique within the data. This allows the consumer application to parse individual data items when reading the data from the destination.</p>
/// <p>The <code>PutRecord</code> operation returns a <code>RecordId</code>, which is a unique string assigned to each record. Producer applications can use this ID for purposes such as auditability and investigation.</p>
/// <p>If the <code>PutRecord</code> operation throws a <code>ServiceUnavailableException</code>, back off and retry. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery stream. </p>
/// <p>Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream as it tries to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no longer available.</p> <important>
/// <p>Don't concatenate two or more base64 strings to form the data fields of your records. Instead, concatenate the raw data, then perform base64 encoding.</p>
/// </important>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct PutRecord<
C = aws_smithy_client::erase::DynConnector,
M = crate::middleware::DefaultMiddleware,
R = aws_smithy_client::retry::Standard,
> {
handle: std::sync::Arc<super::Handle<C, M, R>>,
inner: crate::input::put_record_input::Builder,
}
impl<C, M, R> PutRecord<C, M, R>
where
C: aws_smithy_client::bounds::SmithyConnector,
M: aws_smithy_client::bounds::SmithyMiddleware<C>,
R: aws_smithy_client::retry::NewRequestPolicy,
{
/// Creates a new `PutRecord`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle<C, M, R>>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::PutRecordOutput,
aws_smithy_http::result::SdkError<crate::error::PutRecordError>,
>
where
R::Policy: aws_smithy_client::bounds::SmithyRetryPolicy<
crate::input::PutRecordInputOperationOutputAlias,
crate::output::PutRecordOutput,
crate::error::PutRecordError,
crate::input::PutRecordInputOperationRetryAlias,
>,
{
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {