aws_sdk_lambda/operation/update_event_source_mapping/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_event_source_mapping::_update_event_source_mapping_input::UpdateEventSourceMappingInputBuilder;
3
4pub use crate::operation::update_event_source_mapping::_update_event_source_mapping_output::UpdateEventSourceMappingOutputBuilder;
5
6impl crate::operation::update_event_source_mapping::builders::UpdateEventSourceMappingInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_event_source_mapping::UpdateEventSourceMappingOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_event_source_mapping::UpdateEventSourceMappingError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_event_source_mapping();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateEventSourceMapping`.
24///
25/// <p>Updates an event source mapping. You can change the function that Lambda invokes, or pause invocation and resume later from the same location.</p>
26/// <p>For details about how to configure different event sources, see the following topics.</p>
27/// <ul>
28/// <li>
29/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping"> Amazon DynamoDB Streams</a></p></li>
30/// <li>
31/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping"> Amazon Kinesis</a></p></li>
32/// <li>
33/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource"> Amazon SQS</a></p></li>
34/// <li>
35/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping"> Amazon MQ and RabbitMQ</a></p></li>
36/// <li>
37/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html"> Amazon MSK</a></p></li>
38/// <li>
39/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html"> Apache Kafka</a></p></li>
40/// <li>
41/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html"> Amazon DocumentDB</a></p></li>
42/// </ul>
43/// <p>The following error handling options are available for stream sources (DynamoDB, Kinesis, Amazon MSK, and self-managed Apache Kafka):</p>
44/// <ul>
45/// <li>
46/// <p><code>BisectBatchOnFunctionError</code> – If the function returns an error, split the batch in two and retry.</p></li>
47/// <li>
48/// <p><code>MaximumRecordAgeInSeconds</code> – Discard records older than the specified age. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires</p></li>
49/// <li>
50/// <p><code>MaximumRetryAttempts</code> – Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p></li>
51/// <li>
52/// <p><code>OnFailure</code> – Send discarded records to an Amazon SQS queue, Amazon SNS topic, Kafka topic, or Amazon S3 bucket. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations">Adding a destination</a>.</p></li>
53/// </ul>
54/// <p>The following option is available only for DynamoDB and Kinesis event sources:</p>
55/// <ul>
56/// <li>
57/// <p><code>ParallelizationFactor</code> – Process multiple batches from each shard concurrently.</p></li>
58/// </ul>
59/// <p>For information about which configuration parameters apply to each event source, see the following topics.</p>
60/// <ul>
61/// <li>
62/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-params"> Amazon DynamoDB Streams</a></p></li>
63/// <li>
64/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-params"> Amazon Kinesis</a></p></li>
65/// <li>
66/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-params"> Amazon SQS</a></p></li>
67/// <li>
68/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-params"> Amazon MQ and RabbitMQ</a></p></li>
69/// <li>
70/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-parms"> Amazon MSK</a></p></li>
71/// <li>
72/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-kafka-parms"> Apache Kafka</a></p></li>
73/// <li>
74/// <p><a href="https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html#docdb-configuration"> Amazon DocumentDB</a></p></li>
75/// </ul>
76#[derive(::std::clone::Clone, ::std::fmt::Debug)]
77pub struct UpdateEventSourceMappingFluentBuilder {
78 handle: ::std::sync::Arc<crate::client::Handle>,
79 inner: crate::operation::update_event_source_mapping::builders::UpdateEventSourceMappingInputBuilder,
80 config_override: ::std::option::Option<crate::config::Builder>,
81}
82impl
83 crate::client::customize::internal::CustomizableSend<
84 crate::operation::update_event_source_mapping::UpdateEventSourceMappingOutput,
85 crate::operation::update_event_source_mapping::UpdateEventSourceMappingError,
86 > for UpdateEventSourceMappingFluentBuilder
87{
88 fn send(
89 self,
90 config_override: crate::config::Builder,
91 ) -> crate::client::customize::internal::BoxFuture<
92 crate::client::customize::internal::SendResult<
93 crate::operation::update_event_source_mapping::UpdateEventSourceMappingOutput,
94 crate::operation::update_event_source_mapping::UpdateEventSourceMappingError,
95 >,
96 > {
97 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
98 }
99}
100impl UpdateEventSourceMappingFluentBuilder {
101 /// Creates a new `UpdateEventSourceMappingFluentBuilder`.
102 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
103 Self {
104 handle,
105 inner: ::std::default::Default::default(),
106 config_override: ::std::option::Option::None,
107 }
108 }
109 /// Access the UpdateEventSourceMapping as a reference.
110 pub fn as_input(&self) -> &crate::operation::update_event_source_mapping::builders::UpdateEventSourceMappingInputBuilder {
111 &self.inner
112 }
113 /// Sends the request and returns the response.
114 ///
115 /// If an error occurs, an `SdkError` will be returned with additional details that
116 /// can be matched against.
117 ///
118 /// By default, any retryable failures will be retried twice. Retry behavior
119 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
120 /// set when configuring the client.
121 pub async fn send(
122 self,
123 ) -> ::std::result::Result<
124 crate::operation::update_event_source_mapping::UpdateEventSourceMappingOutput,
125 ::aws_smithy_runtime_api::client::result::SdkError<
126 crate::operation::update_event_source_mapping::UpdateEventSourceMappingError,
127 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
128 >,
129 > {
130 let input = self
131 .inner
132 .build()
133 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
134 let runtime_plugins = crate::operation::update_event_source_mapping::UpdateEventSourceMapping::operation_runtime_plugins(
135 self.handle.runtime_plugins.clone(),
136 &self.handle.conf,
137 self.config_override,
138 );
139 crate::operation::update_event_source_mapping::UpdateEventSourceMapping::orchestrate(&runtime_plugins, input).await
140 }
141
142 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
143 pub fn customize(
144 self,
145 ) -> crate::client::customize::CustomizableOperation<
146 crate::operation::update_event_source_mapping::UpdateEventSourceMappingOutput,
147 crate::operation::update_event_source_mapping::UpdateEventSourceMappingError,
148 Self,
149 > {
150 crate::client::customize::CustomizableOperation::new(self)
151 }
152 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
153 self.set_config_override(::std::option::Option::Some(config_override.into()));
154 self
155 }
156
157 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
158 self.config_override = config_override;
159 self
160 }
161 /// <p>The identifier of the event source mapping.</p>
162 pub fn uuid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
163 self.inner = self.inner.uuid(input.into());
164 self
165 }
166 /// <p>The identifier of the event source mapping.</p>
167 pub fn set_uuid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
168 self.inner = self.inner.set_uuid(input);
169 self
170 }
171 /// <p>The identifier of the event source mapping.</p>
172 pub fn get_uuid(&self) -> &::std::option::Option<::std::string::String> {
173 self.inner.get_uuid()
174 }
175 /// <p>The name or ARN of the Lambda function.</p>
176 /// <p class="title"><b>Name formats</b></p>
177 /// <ul>
178 /// <li>
179 /// <p><b>Function name</b> – <code>MyFunction</code>.</p></li>
180 /// <li>
181 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p></li>
182 /// <li>
183 /// <p><b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p></li>
184 /// <li>
185 /// <p><b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p></li>
186 /// </ul>
187 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
188 pub fn function_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.inner = self.inner.function_name(input.into());
190 self
191 }
192 /// <p>The name or ARN of the Lambda function.</p>
193 /// <p class="title"><b>Name formats</b></p>
194 /// <ul>
195 /// <li>
196 /// <p><b>Function name</b> – <code>MyFunction</code>.</p></li>
197 /// <li>
198 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p></li>
199 /// <li>
200 /// <p><b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p></li>
201 /// <li>
202 /// <p><b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p></li>
203 /// </ul>
204 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
205 pub fn set_function_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
206 self.inner = self.inner.set_function_name(input);
207 self
208 }
209 /// <p>The name or ARN of the Lambda function.</p>
210 /// <p class="title"><b>Name formats</b></p>
211 /// <ul>
212 /// <li>
213 /// <p><b>Function name</b> – <code>MyFunction</code>.</p></li>
214 /// <li>
215 /// <p><b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p></li>
216 /// <li>
217 /// <p><b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p></li>
218 /// <li>
219 /// <p><b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p></li>
220 /// </ul>
221 /// <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p>
222 pub fn get_function_name(&self) -> &::std::option::Option<::std::string::String> {
223 self.inner.get_function_name()
224 }
225 /// <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p>
226 /// <p>Default: True</p>
227 pub fn enabled(mut self, input: bool) -> Self {
228 self.inner = self.inner.enabled(input);
229 self
230 }
231 /// <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p>
232 /// <p>Default: True</p>
233 pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
234 self.inner = self.inner.set_enabled(input);
235 self
236 }
237 /// <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p>
238 /// <p>Default: True</p>
239 pub fn get_enabled(&self) -> &::std::option::Option<bool> {
240 self.inner.get_enabled()
241 }
242 /// <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p>
243 /// <ul>
244 /// <li>
245 /// <p><b>Amazon Kinesis</b> – Default 100. Max 10,000.</p></li>
246 /// <li>
247 /// <p><b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p></li>
248 /// <li>
249 /// <p><b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p></li>
250 /// <li>
251 /// <p><b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p></li>
252 /// <li>
253 /// <p><b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p></li>
254 /// <li>
255 /// <p><b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p></li>
256 /// <li>
257 /// <p><b>DocumentDB</b> – Default 100. Max 10,000.</p></li>
258 /// </ul>
259 pub fn batch_size(mut self, input: i32) -> Self {
260 self.inner = self.inner.batch_size(input);
261 self
262 }
263 /// <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p>
264 /// <ul>
265 /// <li>
266 /// <p><b>Amazon Kinesis</b> – Default 100. Max 10,000.</p></li>
267 /// <li>
268 /// <p><b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p></li>
269 /// <li>
270 /// <p><b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p></li>
271 /// <li>
272 /// <p><b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p></li>
273 /// <li>
274 /// <p><b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p></li>
275 /// <li>
276 /// <p><b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p></li>
277 /// <li>
278 /// <p><b>DocumentDB</b> – Default 100. Max 10,000.</p></li>
279 /// </ul>
280 pub fn set_batch_size(mut self, input: ::std::option::Option<i32>) -> Self {
281 self.inner = self.inner.set_batch_size(input);
282 self
283 }
284 /// <p>The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).</p>
285 /// <ul>
286 /// <li>
287 /// <p><b>Amazon Kinesis</b> – Default 100. Max 10,000.</p></li>
288 /// <li>
289 /// <p><b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p></li>
290 /// <li>
291 /// <p><b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p></li>
292 /// <li>
293 /// <p><b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p></li>
294 /// <li>
295 /// <p><b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p></li>
296 /// <li>
297 /// <p><b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p></li>
298 /// <li>
299 /// <p><b>DocumentDB</b> – Default 100. Max 10,000.</p></li>
300 /// </ul>
301 pub fn get_batch_size(&self) -> &::std::option::Option<i32> {
302 self.inner.get_batch_size()
303 }
304 /// <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html">Lambda event filtering</a>.</p>
305 pub fn filter_criteria(mut self, input: crate::types::FilterCriteria) -> Self {
306 self.inner = self.inner.filter_criteria(input);
307 self
308 }
309 /// <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html">Lambda event filtering</a>.</p>
310 pub fn set_filter_criteria(mut self, input: ::std::option::Option<crate::types::FilterCriteria>) -> Self {
311 self.inner = self.inner.set_filter_criteria(input);
312 self
313 }
314 /// <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html">Lambda event filtering</a>.</p>
315 pub fn get_filter_criteria(&self) -> &::std::option::Option<crate::types::FilterCriteria> {
316 self.inner.get_filter_criteria()
317 }
318 /// <p>The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key.</p>
319 pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320 self.inner = self.inner.kms_key_arn(input.into());
321 self
322 }
323 /// <p>The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key.</p>
324 pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
325 self.inner = self.inner.set_kms_key_arn(input);
326 self
327 }
328 /// <p>The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key.</p>
329 pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
330 self.inner.get_kms_key_arn()
331 }
332 /// <p>The metrics configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics">Event source mapping metrics</a>.</p>
333 pub fn metrics_config(mut self, input: crate::types::EventSourceMappingMetricsConfig) -> Self {
334 self.inner = self.inner.metrics_config(input);
335 self
336 }
337 /// <p>The metrics configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics">Event source mapping metrics</a>.</p>
338 pub fn set_metrics_config(mut self, input: ::std::option::Option<crate::types::EventSourceMappingMetricsConfig>) -> Self {
339 self.inner = self.inner.set_metrics_config(input);
340 self
341 }
342 /// <p>The metrics configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics">Event source mapping metrics</a>.</p>
343 pub fn get_metrics_config(&self) -> &::std::option::Option<crate::types::EventSourceMappingMetricsConfig> {
344 self.inner.get_metrics_config()
345 }
346 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. Use this configuration object to define the level of logs for your event source mapping.</p>
347 pub fn logging_config(mut self, input: crate::types::EventSourceMappingLoggingConfig) -> Self {
348 self.inner = self.inner.logging_config(input);
349 self
350 }
351 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. Use this configuration object to define the level of logs for your event source mapping.</p>
352 pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::EventSourceMappingLoggingConfig>) -> Self {
353 self.inner = self.inner.set_logging_config(input);
354 self
355 }
356 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. Use this configuration object to define the level of logs for your event source mapping.</p>
357 pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::EventSourceMappingLoggingConfig> {
358 self.inner.get_logging_config()
359 }
360 /// <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
361 pub fn scaling_config(mut self, input: crate::types::ScalingConfig) -> Self {
362 self.inner = self.inner.scaling_config(input);
363 self
364 }
365 /// <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
366 pub fn set_scaling_config(mut self, input: ::std::option::Option<crate::types::ScalingConfig>) -> Self {
367 self.inner = self.inner.set_scaling_config(input);
368 self
369 }
370 /// <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency">Configuring maximum concurrency for Amazon SQS event sources</a>.</p>
371 pub fn get_scaling_config(&self) -> &::std::option::Option<crate::types::ScalingConfig> {
372 self.inner.get_scaling_config()
373 }
374 /// <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p>
375 /// <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p>
376 /// <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
377 /// <p>Not supported for Kafka event source mappings when <code>ConsumptionMode</code> is <code>Queue</code>.</p>
378 pub fn maximum_batching_window_in_seconds(mut self, input: i32) -> Self {
379 self.inner = self.inner.maximum_batching_window_in_seconds(input);
380 self
381 }
382 /// <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p>
383 /// <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p>
384 /// <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
385 /// <p>Not supported for Kafka event source mappings when <code>ConsumptionMode</code> is <code>Queue</code>.</p>
386 pub fn set_maximum_batching_window_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
387 self.inner = self.inner.set_maximum_batching_window_in_seconds(input);
388 self
389 }
390 /// <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p>
391 /// <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p>
392 /// <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
393 /// <p>Not supported for Kafka event source mappings when <code>ConsumptionMode</code> is <code>Queue</code>.</p>
394 pub fn get_maximum_batching_window_in_seconds(&self) -> &::std::option::Option<i32> {
395 self.inner.get_maximum_batching_window_in_seconds()
396 }
397 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
398 pub fn parallelization_factor(mut self, input: i32) -> Self {
399 self.inner = self.inner.parallelization_factor(input);
400 self
401 }
402 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
403 pub fn set_parallelization_factor(mut self, input: ::std::option::Option<i32>) -> Self {
404 self.inner = self.inner.set_parallelization_factor(input);
405 self
406 }
407 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p>
408 pub fn get_parallelization_factor(&self) -> &::std::option::Option<i32> {
409 self.inner.get_parallelization_factor()
410 }
411 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
412 pub fn destination_config(mut self, input: crate::types::DestinationConfig) -> Self {
413 self.inner = self.inner.destination_config(input);
414 self
415 }
416 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
417 pub fn set_destination_config(mut self, input: ::std::option::Option<crate::types::DestinationConfig>) -> Self {
418 self.inner = self.inner.set_destination_config(input);
419 self
420 }
421 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.</p>
422 pub fn get_destination_config(&self) -> &::std::option::Option<crate::types::DestinationConfig> {
423 self.inner.get_destination_config()
424 }
425 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
426 pub fn maximum_record_age_in_seconds(mut self, input: i32) -> Self {
427 self.inner = self.inner.maximum_record_age_in_seconds(input);
428 self
429 }
430 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
431 pub fn set_maximum_record_age_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
432 self.inner = self.inner.set_maximum_record_age_in_seconds(input);
433 self
434 }
435 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is infinite (-1).</p>
436 pub fn get_maximum_record_age_in_seconds(&self) -> &::std::option::Option<i32> {
437 self.inner.get_maximum_record_age_in_seconds()
438 }
439 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
440 pub fn bisect_batch_on_function_error(mut self, input: bool) -> Self {
441 self.inner = self.inner.bisect_batch_on_function_error(input);
442 self
443 }
444 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
445 pub fn set_bisect_batch_on_function_error(mut self, input: ::std::option::Option<bool>) -> Self {
446 self.inner = self.inner.set_bisect_batch_on_function_error(input);
447 self
448 }
449 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry.</p>
450 pub fn get_bisect_batch_on_function_error(&self) -> &::std::option::Option<bool> {
451 self.inner.get_bisect_batch_on_function_error()
452 }
453 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
454 /// <p>For Kafka <code>Stream</code> consumption mode, the default is <code>-1</code> (infinite retries; capped at 10 when an on-failure destination is configured). For Kafka <code>Queue</code> consumption mode, the default is <code>0</code>, and if no on-failure destination is configured the Kafka broker performs retries.</p>
455 pub fn maximum_retry_attempts(mut self, input: i32) -> Self {
456 self.inner = self.inner.maximum_retry_attempts(input);
457 self
458 }
459 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
460 /// <p>For Kafka <code>Stream</code> consumption mode, the default is <code>-1</code> (infinite retries; capped at 10 when an on-failure destination is configured). For Kafka <code>Queue</code> consumption mode, the default is <code>0</code>, and if no on-failure destination is configured the Kafka broker performs retries.</p>
461 pub fn set_maximum_retry_attempts(mut self, input: ::std::option::Option<i32>) -> Self {
462 self.inner = self.inner.set_maximum_retry_attempts(input);
463 self
464 }
465 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p>
466 /// <p>For Kafka <code>Stream</code> consumption mode, the default is <code>-1</code> (infinite retries; capped at 10 when an on-failure destination is configured). For Kafka <code>Queue</code> consumption mode, the default is <code>0</code>, and if no on-failure destination is configured the Kafka broker performs retries.</p>
467 pub fn get_maximum_retry_attempts(&self) -> &::std::option::Option<i32> {
468 self.inner.get_maximum_retry_attempts()
469 }
470 /// <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
471 pub fn tumbling_window_in_seconds(mut self, input: i32) -> Self {
472 self.inner = self.inner.tumbling_window_in_seconds(input);
473 self
474 }
475 /// <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
476 pub fn set_tumbling_window_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
477 self.inner = self.inner.set_tumbling_window_in_seconds(input);
478 self
479 }
480 /// <p>(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window.</p>
481 pub fn get_tumbling_window_in_seconds(&self) -> &::std::option::Option<i32> {
482 self.inner.get_tumbling_window_in_seconds()
483 }
484 ///
485 /// Appends an item to `SourceAccessConfigurations`.
486 ///
487 /// To override the contents of this collection use [`set_source_access_configurations`](Self::set_source_access_configurations).
488 ///
489 /// <p>An array of authentication protocols or VPC components required to secure your event source.</p>
490 pub fn source_access_configurations(mut self, input: crate::types::SourceAccessConfiguration) -> Self {
491 self.inner = self.inner.source_access_configurations(input);
492 self
493 }
494 /// <p>An array of authentication protocols or VPC components required to secure your event source.</p>
495 pub fn set_source_access_configurations(
496 mut self,
497 input: ::std::option::Option<::std::vec::Vec<crate::types::SourceAccessConfiguration>>,
498 ) -> Self {
499 self.inner = self.inner.set_source_access_configurations(input);
500 self
501 }
502 /// <p>An array of authentication protocols or VPC components required to secure your event source.</p>
503 pub fn get_source_access_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceAccessConfiguration>> {
504 self.inner.get_source_access_configurations()
505 }
506 ///
507 /// Appends an item to `FunctionResponseTypes`.
508 ///
509 /// To override the contents of this collection use [`set_function_response_types`](Self::set_function_response_types).
510 ///
511 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
512 pub fn function_response_types(mut self, input: crate::types::FunctionResponseType) -> Self {
513 self.inner = self.inner.function_response_types(input);
514 self
515 }
516 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
517 pub fn set_function_response_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FunctionResponseType>>) -> Self {
518 self.inner = self.inner.set_function_response_types(input);
519 self
520 }
521 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, self-managed Apache Kafka, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p>
522 pub fn get_function_response_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FunctionResponseType>> {
523 self.inner.get_function_response_types()
524 }
525 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
526 pub fn amazon_managed_kafka_event_source_config(mut self, input: crate::types::AmazonManagedKafkaEventSourceConfig) -> Self {
527 self.inner = self.inner.amazon_managed_kafka_event_source_config(input);
528 self
529 }
530 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
531 pub fn set_amazon_managed_kafka_event_source_config(
532 mut self,
533 input: ::std::option::Option<crate::types::AmazonManagedKafkaEventSourceConfig>,
534 ) -> Self {
535 self.inner = self.inner.set_amazon_managed_kafka_event_source_config(input);
536 self
537 }
538 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
539 pub fn get_amazon_managed_kafka_event_source_config(&self) -> &::std::option::Option<crate::types::AmazonManagedKafkaEventSourceConfig> {
540 self.inner.get_amazon_managed_kafka_event_source_config()
541 }
542 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
543 pub fn self_managed_kafka_event_source_config(mut self, input: crate::types::SelfManagedKafkaEventSourceConfig) -> Self {
544 self.inner = self.inner.self_managed_kafka_event_source_config(input);
545 self
546 }
547 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
548 pub fn set_self_managed_kafka_event_source_config(
549 mut self,
550 input: ::std::option::Option<crate::types::SelfManagedKafkaEventSourceConfig>,
551 ) -> Self {
552 self.inner = self.inner.set_self_managed_kafka_event_source_config(input);
553 self
554 }
555 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
556 pub fn get_self_managed_kafka_event_source_config(&self) -> &::std::option::Option<crate::types::SelfManagedKafkaEventSourceConfig> {
557 self.inner.get_self_managed_kafka_event_source_config()
558 }
559 /// <p>Specific configuration settings for a DocumentDB event source.</p>
560 pub fn document_db_event_source_config(mut self, input: crate::types::DocumentDbEventSourceConfig) -> Self {
561 self.inner = self.inner.document_db_event_source_config(input);
562 self
563 }
564 /// <p>Specific configuration settings for a DocumentDB event source.</p>
565 pub fn set_document_db_event_source_config(mut self, input: ::std::option::Option<crate::types::DocumentDbEventSourceConfig>) -> Self {
566 self.inner = self.inner.set_document_db_event_source_config(input);
567 self
568 }
569 /// <p>Specific configuration settings for a DocumentDB event source.</p>
570 pub fn get_document_db_event_source_config(&self) -> &::std::option::Option<crate::types::DocumentDbEventSourceConfig> {
571 self.inner.get_document_db_event_source_config()
572 }
573 /// <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">provisioned mode</a>.</p>
574 pub fn provisioned_poller_config(mut self, input: crate::types::ProvisionedPollerConfig) -> Self {
575 self.inner = self.inner.provisioned_poller_config(input);
576 self
577 }
578 /// <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">provisioned mode</a>.</p>
579 pub fn set_provisioned_poller_config(mut self, input: ::std::option::Option<crate::types::ProvisionedPollerConfig>) -> Self {
580 self.inner = self.inner.set_provisioned_poller_config(input);
581 self
582 }
583 /// <p>(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">provisioned mode</a>.</p>
584 pub fn get_provisioned_poller_config(&self) -> &::std::option::Option<crate::types::ProvisionedPollerConfig> {
585 self.inner.get_provisioned_poller_config()
586 }
587}