aws_sdk_lambda/types/_event_source_mapping_configuration.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A mapping between an Amazon Web Services resource and a Lambda function. For details, see <code>CreateEventSourceMapping</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct EventSourceMappingConfiguration {
7 /// <p>The identifier of the event source mapping.</p>
8 pub uuid: ::std::option::Option<::std::string::String>,
9 /// <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
10 pub starting_position: ::std::option::Option<crate::types::EventSourcePosition>,
11 /// <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
12 pub starting_position_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
13 /// <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>
14 /// <p>Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.</p>
15 /// <p>Related setting: When you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
16 pub batch_size: ::std::option::Option<i32>,
17 /// <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>
18 /// <p>For streams 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>
19 /// <p>Related setting: For streams 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>
20 pub maximum_batching_window_in_seconds: ::std::option::Option<i32>,
21 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.</p>
22 pub parallelization_factor: ::std::option::Option<i32>,
23 /// <p>The Amazon Resource Name (ARN) of the event source.</p>
24 pub event_source_arn: ::std::option::Option<::std::string::String>,
25 /// <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>
26 /// <p>If filter criteria is encrypted, this field shows up as <code>null</code> in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have <code>kms:Decrypt</code> permissions for the correct KMS key.</p>
27 pub filter_criteria: ::std::option::Option<crate::types::FilterCriteria>,
28 /// <p>The ARN of the Lambda function.</p>
29 pub function_arn: ::std::option::Option<::std::string::String>,
30 /// <p>The date that the event source mapping was last updated or that its state changed.</p>
31 pub last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
32 /// <p>The result of the event source mapping's last processing attempt.</p>
33 pub last_processing_result: ::std::option::Option<::std::string::String>,
34 /// <p>The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.</p>
35 pub state: ::std::option::Option<::std::string::String>,
36 /// <p>Indicates whether a user or Lambda made the last change to the event source mapping.</p>
37 pub state_transition_reason: ::std::option::Option<::std::string::String>,
38 /// <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>
39 pub destination_config: ::std::option::Option<crate::types::DestinationConfig>,
40 /// <p>The name of the Kafka topic.</p>
41 pub topics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
42 /// <p>(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.</p>
43 pub queues: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
44 /// <p>An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.</p>
45 pub source_access_configurations: ::std::option::Option<::std::vec::Vec<crate::types::SourceAccessConfiguration>>,
46 /// <p>The self-managed Apache Kafka cluster for your event source.</p>
47 pub self_managed_event_source: ::std::option::Option<crate::types::SelfManagedEventSource>,
48 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.</p><note>
49 /// <p>The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed</p>
50 /// </note>
51 pub maximum_record_age_in_seconds: ::std::option::Option<i32>,
52 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry. The default value is false.</p>
53 pub bisect_batch_on_function_error: ::std::option::Option<bool>,
54 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.</p>
55 pub maximum_retry_attempts: ::std::option::Option<i32>,
56 /// <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>
57 pub tumbling_window_in_seconds: ::std::option::Option<i32>,
58 /// <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>
59 pub function_response_types: ::std::option::Option<::std::vec::Vec<crate::types::FunctionResponseType>>,
60 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
61 pub amazon_managed_kafka_event_source_config: ::std::option::Option<crate::types::AmazonManagedKafkaEventSourceConfig>,
62 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
63 pub self_managed_kafka_event_source_config: ::std::option::Option<crate::types::SelfManagedKafkaEventSourceConfig>,
64 /// <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>
65 pub scaling_config: ::std::option::Option<crate::types::ScalingConfig>,
66 /// <p>Specific configuration settings for a DocumentDB event source.</p>
67 pub document_db_event_source_config: ::std::option::Option<crate::types::DocumentDbEventSourceConfig>,
68 /// <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>.</p>
69 pub kms_key_arn: ::std::option::Option<::std::string::String>,
70 /// <p>An object that contains details about an error related to filter criteria encryption.</p>
71 pub filter_criteria_error: ::std::option::Option<crate::types::FilterCriteriaError>,
72 /// <p>The Amazon Resource Name (ARN) of the event source mapping.</p>
73 pub event_source_mapping_arn: ::std::option::Option<::std::string::String>,
74 /// <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>
75 pub metrics_config: ::std::option::Option<crate::types::EventSourceMappingMetricsConfig>,
76 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html">Event source mapping logging</a>.</p>
77 pub logging_config: ::std::option::Option<crate::types::EventSourceMappingLoggingConfig>,
78 /// <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>
79 pub provisioned_poller_config: ::std::option::Option<crate::types::ProvisionedPollerConfig>,
80}
81impl EventSourceMappingConfiguration {
82 /// <p>The identifier of the event source mapping.</p>
83 pub fn uuid(&self) -> ::std::option::Option<&str> {
84 self.uuid.as_deref()
85 }
86 /// <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
87 pub fn starting_position(&self) -> ::std::option::Option<&crate::types::EventSourcePosition> {
88 self.starting_position.as_ref()
89 }
90 /// <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
91 pub fn starting_position_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
92 self.starting_position_timestamp.as_ref()
93 }
94 /// <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>
95 /// <p>Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.</p>
96 /// <p>Related setting: When you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
97 pub fn batch_size(&self) -> ::std::option::Option<i32> {
98 self.batch_size
99 }
100 /// <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>
101 /// <p>For streams 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>
102 /// <p>Related setting: For streams 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>
103 pub fn maximum_batching_window_in_seconds(&self) -> ::std::option::Option<i32> {
104 self.maximum_batching_window_in_seconds
105 }
106 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.</p>
107 pub fn parallelization_factor(&self) -> ::std::option::Option<i32> {
108 self.parallelization_factor
109 }
110 /// <p>The Amazon Resource Name (ARN) of the event source.</p>
111 pub fn event_source_arn(&self) -> ::std::option::Option<&str> {
112 self.event_source_arn.as_deref()
113 }
114 /// <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>
115 /// <p>If filter criteria is encrypted, this field shows up as <code>null</code> in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have <code>kms:Decrypt</code> permissions for the correct KMS key.</p>
116 pub fn filter_criteria(&self) -> ::std::option::Option<&crate::types::FilterCriteria> {
117 self.filter_criteria.as_ref()
118 }
119 /// <p>The ARN of the Lambda function.</p>
120 pub fn function_arn(&self) -> ::std::option::Option<&str> {
121 self.function_arn.as_deref()
122 }
123 /// <p>The date that the event source mapping was last updated or that its state changed.</p>
124 pub fn last_modified(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
125 self.last_modified.as_ref()
126 }
127 /// <p>The result of the event source mapping's last processing attempt.</p>
128 pub fn last_processing_result(&self) -> ::std::option::Option<&str> {
129 self.last_processing_result.as_deref()
130 }
131 /// <p>The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.</p>
132 pub fn state(&self) -> ::std::option::Option<&str> {
133 self.state.as_deref()
134 }
135 /// <p>Indicates whether a user or Lambda made the last change to the event source mapping.</p>
136 pub fn state_transition_reason(&self) -> ::std::option::Option<&str> {
137 self.state_transition_reason.as_deref()
138 }
139 /// <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>
140 pub fn destination_config(&self) -> ::std::option::Option<&crate::types::DestinationConfig> {
141 self.destination_config.as_ref()
142 }
143 /// <p>The name of the Kafka topic.</p>
144 ///
145 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.topics.is_none()`.
146 pub fn topics(&self) -> &[::std::string::String] {
147 self.topics.as_deref().unwrap_or_default()
148 }
149 /// <p>(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.</p>
150 ///
151 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.queues.is_none()`.
152 pub fn queues(&self) -> &[::std::string::String] {
153 self.queues.as_deref().unwrap_or_default()
154 }
155 /// <p>An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.</p>
156 ///
157 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.source_access_configurations.is_none()`.
158 pub fn source_access_configurations(&self) -> &[crate::types::SourceAccessConfiguration] {
159 self.source_access_configurations.as_deref().unwrap_or_default()
160 }
161 /// <p>The self-managed Apache Kafka cluster for your event source.</p>
162 pub fn self_managed_event_source(&self) -> ::std::option::Option<&crate::types::SelfManagedEventSource> {
163 self.self_managed_event_source.as_ref()
164 }
165 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.</p><note>
166 /// <p>The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed</p>
167 /// </note>
168 pub fn maximum_record_age_in_seconds(&self) -> ::std::option::Option<i32> {
169 self.maximum_record_age_in_seconds
170 }
171 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry. The default value is false.</p>
172 pub fn bisect_batch_on_function_error(&self) -> ::std::option::Option<bool> {
173 self.bisect_batch_on_function_error
174 }
175 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.</p>
176 pub fn maximum_retry_attempts(&self) -> ::std::option::Option<i32> {
177 self.maximum_retry_attempts
178 }
179 /// <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>
180 pub fn tumbling_window_in_seconds(&self) -> ::std::option::Option<i32> {
181 self.tumbling_window_in_seconds
182 }
183 /// <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>
184 ///
185 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.function_response_types.is_none()`.
186 pub fn function_response_types(&self) -> &[crate::types::FunctionResponseType] {
187 self.function_response_types.as_deref().unwrap_or_default()
188 }
189 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
190 pub fn amazon_managed_kafka_event_source_config(&self) -> ::std::option::Option<&crate::types::AmazonManagedKafkaEventSourceConfig> {
191 self.amazon_managed_kafka_event_source_config.as_ref()
192 }
193 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
194 pub fn self_managed_kafka_event_source_config(&self) -> ::std::option::Option<&crate::types::SelfManagedKafkaEventSourceConfig> {
195 self.self_managed_kafka_event_source_config.as_ref()
196 }
197 /// <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>
198 pub fn scaling_config(&self) -> ::std::option::Option<&crate::types::ScalingConfig> {
199 self.scaling_config.as_ref()
200 }
201 /// <p>Specific configuration settings for a DocumentDB event source.</p>
202 pub fn document_db_event_source_config(&self) -> ::std::option::Option<&crate::types::DocumentDbEventSourceConfig> {
203 self.document_db_event_source_config.as_ref()
204 }
205 /// <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>.</p>
206 pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
207 self.kms_key_arn.as_deref()
208 }
209 /// <p>An object that contains details about an error related to filter criteria encryption.</p>
210 pub fn filter_criteria_error(&self) -> ::std::option::Option<&crate::types::FilterCriteriaError> {
211 self.filter_criteria_error.as_ref()
212 }
213 /// <p>The Amazon Resource Name (ARN) of the event source mapping.</p>
214 pub fn event_source_mapping_arn(&self) -> ::std::option::Option<&str> {
215 self.event_source_mapping_arn.as_deref()
216 }
217 /// <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>
218 pub fn metrics_config(&self) -> ::std::option::Option<&crate::types::EventSourceMappingMetricsConfig> {
219 self.metrics_config.as_ref()
220 }
221 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html">Event source mapping logging</a>.</p>
222 pub fn logging_config(&self) -> ::std::option::Option<&crate::types::EventSourceMappingLoggingConfig> {
223 self.logging_config.as_ref()
224 }
225 /// <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>
226 pub fn provisioned_poller_config(&self) -> ::std::option::Option<&crate::types::ProvisionedPollerConfig> {
227 self.provisioned_poller_config.as_ref()
228 }
229}
230impl EventSourceMappingConfiguration {
231 /// Creates a new builder-style object to manufacture [`EventSourceMappingConfiguration`](crate::types::EventSourceMappingConfiguration).
232 pub fn builder() -> crate::types::builders::EventSourceMappingConfigurationBuilder {
233 crate::types::builders::EventSourceMappingConfigurationBuilder::default()
234 }
235}
236
237/// A builder for [`EventSourceMappingConfiguration`](crate::types::EventSourceMappingConfiguration).
238#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
239#[non_exhaustive]
240pub struct EventSourceMappingConfigurationBuilder {
241 pub(crate) uuid: ::std::option::Option<::std::string::String>,
242 pub(crate) starting_position: ::std::option::Option<crate::types::EventSourcePosition>,
243 pub(crate) starting_position_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
244 pub(crate) batch_size: ::std::option::Option<i32>,
245 pub(crate) maximum_batching_window_in_seconds: ::std::option::Option<i32>,
246 pub(crate) parallelization_factor: ::std::option::Option<i32>,
247 pub(crate) event_source_arn: ::std::option::Option<::std::string::String>,
248 pub(crate) filter_criteria: ::std::option::Option<crate::types::FilterCriteria>,
249 pub(crate) function_arn: ::std::option::Option<::std::string::String>,
250 pub(crate) last_modified: ::std::option::Option<::aws_smithy_types::DateTime>,
251 pub(crate) last_processing_result: ::std::option::Option<::std::string::String>,
252 pub(crate) state: ::std::option::Option<::std::string::String>,
253 pub(crate) state_transition_reason: ::std::option::Option<::std::string::String>,
254 pub(crate) destination_config: ::std::option::Option<crate::types::DestinationConfig>,
255 pub(crate) topics: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
256 pub(crate) queues: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
257 pub(crate) source_access_configurations: ::std::option::Option<::std::vec::Vec<crate::types::SourceAccessConfiguration>>,
258 pub(crate) self_managed_event_source: ::std::option::Option<crate::types::SelfManagedEventSource>,
259 pub(crate) maximum_record_age_in_seconds: ::std::option::Option<i32>,
260 pub(crate) bisect_batch_on_function_error: ::std::option::Option<bool>,
261 pub(crate) maximum_retry_attempts: ::std::option::Option<i32>,
262 pub(crate) tumbling_window_in_seconds: ::std::option::Option<i32>,
263 pub(crate) function_response_types: ::std::option::Option<::std::vec::Vec<crate::types::FunctionResponseType>>,
264 pub(crate) amazon_managed_kafka_event_source_config: ::std::option::Option<crate::types::AmazonManagedKafkaEventSourceConfig>,
265 pub(crate) self_managed_kafka_event_source_config: ::std::option::Option<crate::types::SelfManagedKafkaEventSourceConfig>,
266 pub(crate) scaling_config: ::std::option::Option<crate::types::ScalingConfig>,
267 pub(crate) document_db_event_source_config: ::std::option::Option<crate::types::DocumentDbEventSourceConfig>,
268 pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
269 pub(crate) filter_criteria_error: ::std::option::Option<crate::types::FilterCriteriaError>,
270 pub(crate) event_source_mapping_arn: ::std::option::Option<::std::string::String>,
271 pub(crate) metrics_config: ::std::option::Option<crate::types::EventSourceMappingMetricsConfig>,
272 pub(crate) logging_config: ::std::option::Option<crate::types::EventSourceMappingLoggingConfig>,
273 pub(crate) provisioned_poller_config: ::std::option::Option<crate::types::ProvisionedPollerConfig>,
274}
275impl EventSourceMappingConfigurationBuilder {
276 /// <p>The identifier of the event source mapping.</p>
277 pub fn uuid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
278 self.uuid = ::std::option::Option::Some(input.into());
279 self
280 }
281 /// <p>The identifier of the event source mapping.</p>
282 pub fn set_uuid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
283 self.uuid = input;
284 self
285 }
286 /// <p>The identifier of the event source mapping.</p>
287 pub fn get_uuid(&self) -> &::std::option::Option<::std::string::String> {
288 &self.uuid
289 }
290 /// <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
291 pub fn starting_position(mut self, input: crate::types::EventSourcePosition) -> Self {
292 self.starting_position = ::std::option::Option::Some(input);
293 self
294 }
295 /// <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
296 pub fn set_starting_position(mut self, input: ::std::option::Option<crate::types::EventSourcePosition>) -> Self {
297 self.starting_position = input;
298 self
299 }
300 /// <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p>
301 pub fn get_starting_position(&self) -> &::std::option::Option<crate::types::EventSourcePosition> {
302 &self.starting_position
303 }
304 /// <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
305 pub fn starting_position_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
306 self.starting_position_timestamp = ::std::option::Option::Some(input);
307 self
308 }
309 /// <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
310 pub fn set_starting_position_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
311 self.starting_position_timestamp = input;
312 self
313 }
314 /// <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p>
315 pub fn get_starting_position_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
316 &self.starting_position_timestamp
317 }
318 /// <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>
319 /// <p>Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.</p>
320 /// <p>Related setting: When you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
321 pub fn batch_size(mut self, input: i32) -> Self {
322 self.batch_size = ::std::option::Option::Some(input);
323 self
324 }
325 /// <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>
326 /// <p>Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.</p>
327 /// <p>Related setting: When you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
328 pub fn set_batch_size(mut self, input: ::std::option::Option<i32>) -> Self {
329 self.batch_size = input;
330 self
331 }
332 /// <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>
333 /// <p>Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.</p>
334 /// <p>Related setting: When you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p>
335 pub fn get_batch_size(&self) -> &::std::option::Option<i32> {
336 &self.batch_size
337 }
338 /// <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>
339 /// <p>For streams 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>
340 /// <p>Related setting: For streams 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>
341 pub fn maximum_batching_window_in_seconds(mut self, input: i32) -> Self {
342 self.maximum_batching_window_in_seconds = ::std::option::Option::Some(input);
343 self
344 }
345 /// <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>
346 /// <p>For streams 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>
347 /// <p>Related setting: For streams 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>
348 pub fn set_maximum_batching_window_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
349 self.maximum_batching_window_in_seconds = input;
350 self
351 }
352 /// <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>
353 /// <p>For streams 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>
354 /// <p>Related setting: For streams 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>
355 pub fn get_maximum_batching_window_in_seconds(&self) -> &::std::option::Option<i32> {
356 &self.maximum_batching_window_in_seconds
357 }
358 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.</p>
359 pub fn parallelization_factor(mut self, input: i32) -> Self {
360 self.parallelization_factor = ::std::option::Option::Some(input);
361 self
362 }
363 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.</p>
364 pub fn set_parallelization_factor(mut self, input: ::std::option::Option<i32>) -> Self {
365 self.parallelization_factor = input;
366 self
367 }
368 /// <p>(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1.</p>
369 pub fn get_parallelization_factor(&self) -> &::std::option::Option<i32> {
370 &self.parallelization_factor
371 }
372 /// <p>The Amazon Resource Name (ARN) of the event source.</p>
373 pub fn event_source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
374 self.event_source_arn = ::std::option::Option::Some(input.into());
375 self
376 }
377 /// <p>The Amazon Resource Name (ARN) of the event source.</p>
378 pub fn set_event_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
379 self.event_source_arn = input;
380 self
381 }
382 /// <p>The Amazon Resource Name (ARN) of the event source.</p>
383 pub fn get_event_source_arn(&self) -> &::std::option::Option<::std::string::String> {
384 &self.event_source_arn
385 }
386 /// <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>
387 /// <p>If filter criteria is encrypted, this field shows up as <code>null</code> in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have <code>kms:Decrypt</code> permissions for the correct KMS key.</p>
388 pub fn filter_criteria(mut self, input: crate::types::FilterCriteria) -> Self {
389 self.filter_criteria = ::std::option::Option::Some(input);
390 self
391 }
392 /// <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>
393 /// <p>If filter criteria is encrypted, this field shows up as <code>null</code> in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have <code>kms:Decrypt</code> permissions for the correct KMS key.</p>
394 pub fn set_filter_criteria(mut self, input: ::std::option::Option<crate::types::FilterCriteria>) -> Self {
395 self.filter_criteria = input;
396 self
397 }
398 /// <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>
399 /// <p>If filter criteria is encrypted, this field shows up as <code>null</code> in the response of ListEventSourceMapping API calls. You can view this field in plaintext in the response of GetEventSourceMapping and DeleteEventSourceMapping calls if you have <code>kms:Decrypt</code> permissions for the correct KMS key.</p>
400 pub fn get_filter_criteria(&self) -> &::std::option::Option<crate::types::FilterCriteria> {
401 &self.filter_criteria
402 }
403 /// <p>The ARN of the Lambda function.</p>
404 pub fn function_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
405 self.function_arn = ::std::option::Option::Some(input.into());
406 self
407 }
408 /// <p>The ARN of the Lambda function.</p>
409 pub fn set_function_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410 self.function_arn = input;
411 self
412 }
413 /// <p>The ARN of the Lambda function.</p>
414 pub fn get_function_arn(&self) -> &::std::option::Option<::std::string::String> {
415 &self.function_arn
416 }
417 /// <p>The date that the event source mapping was last updated or that its state changed.</p>
418 pub fn last_modified(mut self, input: ::aws_smithy_types::DateTime) -> Self {
419 self.last_modified = ::std::option::Option::Some(input);
420 self
421 }
422 /// <p>The date that the event source mapping was last updated or that its state changed.</p>
423 pub fn set_last_modified(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
424 self.last_modified = input;
425 self
426 }
427 /// <p>The date that the event source mapping was last updated or that its state changed.</p>
428 pub fn get_last_modified(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
429 &self.last_modified
430 }
431 /// <p>The result of the event source mapping's last processing attempt.</p>
432 pub fn last_processing_result(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
433 self.last_processing_result = ::std::option::Option::Some(input.into());
434 self
435 }
436 /// <p>The result of the event source mapping's last processing attempt.</p>
437 pub fn set_last_processing_result(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
438 self.last_processing_result = input;
439 self
440 }
441 /// <p>The result of the event source mapping's last processing attempt.</p>
442 pub fn get_last_processing_result(&self) -> &::std::option::Option<::std::string::String> {
443 &self.last_processing_result
444 }
445 /// <p>The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.</p>
446 pub fn state(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
447 self.state = ::std::option::Option::Some(input.into());
448 self
449 }
450 /// <p>The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.</p>
451 pub fn set_state(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
452 self.state = input;
453 self
454 }
455 /// <p>The state of the event source mapping. It can be one of the following: <code>Creating</code>, <code>Enabling</code>, <code>Enabled</code>, <code>Disabling</code>, <code>Disabled</code>, <code>Updating</code>, or <code>Deleting</code>.</p>
456 pub fn get_state(&self) -> &::std::option::Option<::std::string::String> {
457 &self.state
458 }
459 /// <p>Indicates whether a user or Lambda made the last change to the event source mapping.</p>
460 pub fn state_transition_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
461 self.state_transition_reason = ::std::option::Option::Some(input.into());
462 self
463 }
464 /// <p>Indicates whether a user or Lambda made the last change to the event source mapping.</p>
465 pub fn set_state_transition_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
466 self.state_transition_reason = input;
467 self
468 }
469 /// <p>Indicates whether a user or Lambda made the last change to the event source mapping.</p>
470 pub fn get_state_transition_reason(&self) -> &::std::option::Option<::std::string::String> {
471 &self.state_transition_reason
472 }
473 /// <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>
474 pub fn destination_config(mut self, input: crate::types::DestinationConfig) -> Self {
475 self.destination_config = ::std::option::Option::Some(input);
476 self
477 }
478 /// <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>
479 pub fn set_destination_config(mut self, input: ::std::option::Option<crate::types::DestinationConfig>) -> Self {
480 self.destination_config = input;
481 self
482 }
483 /// <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>
484 pub fn get_destination_config(&self) -> &::std::option::Option<crate::types::DestinationConfig> {
485 &self.destination_config
486 }
487 /// Appends an item to `topics`.
488 ///
489 /// To override the contents of this collection use [`set_topics`](Self::set_topics).
490 ///
491 /// <p>The name of the Kafka topic.</p>
492 pub fn topics(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
493 let mut v = self.topics.unwrap_or_default();
494 v.push(input.into());
495 self.topics = ::std::option::Option::Some(v);
496 self
497 }
498 /// <p>The name of the Kafka topic.</p>
499 pub fn set_topics(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
500 self.topics = input;
501 self
502 }
503 /// <p>The name of the Kafka topic.</p>
504 pub fn get_topics(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
505 &self.topics
506 }
507 /// Appends an item to `queues`.
508 ///
509 /// To override the contents of this collection use [`set_queues`](Self::set_queues).
510 ///
511 /// <p>(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.</p>
512 pub fn queues(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
513 let mut v = self.queues.unwrap_or_default();
514 v.push(input.into());
515 self.queues = ::std::option::Option::Some(v);
516 self
517 }
518 /// <p>(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.</p>
519 pub fn set_queues(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
520 self.queues = input;
521 self
522 }
523 /// <p>(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.</p>
524 pub fn get_queues(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
525 &self.queues
526 }
527 /// Appends an item to `source_access_configurations`.
528 ///
529 /// To override the contents of this collection use [`set_source_access_configurations`](Self::set_source_access_configurations).
530 ///
531 /// <p>An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.</p>
532 pub fn source_access_configurations(mut self, input: crate::types::SourceAccessConfiguration) -> Self {
533 let mut v = self.source_access_configurations.unwrap_or_default();
534 v.push(input);
535 self.source_access_configurations = ::std::option::Option::Some(v);
536 self
537 }
538 /// <p>An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.</p>
539 pub fn set_source_access_configurations(
540 mut self,
541 input: ::std::option::Option<::std::vec::Vec<crate::types::SourceAccessConfiguration>>,
542 ) -> Self {
543 self.source_access_configurations = input;
544 self
545 }
546 /// <p>An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.</p>
547 pub fn get_source_access_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceAccessConfiguration>> {
548 &self.source_access_configurations
549 }
550 /// <p>The self-managed Apache Kafka cluster for your event source.</p>
551 pub fn self_managed_event_source(mut self, input: crate::types::SelfManagedEventSource) -> Self {
552 self.self_managed_event_source = ::std::option::Option::Some(input);
553 self
554 }
555 /// <p>The self-managed Apache Kafka cluster for your event source.</p>
556 pub fn set_self_managed_event_source(mut self, input: ::std::option::Option<crate::types::SelfManagedEventSource>) -> Self {
557 self.self_managed_event_source = input;
558 self
559 }
560 /// <p>The self-managed Apache Kafka cluster for your event source.</p>
561 pub fn get_self_managed_event_source(&self) -> &::std::option::Option<crate::types::SelfManagedEventSource> {
562 &self.self_managed_event_source
563 }
564 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.</p><note>
565 /// <p>The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed</p>
566 /// </note>
567 pub fn maximum_record_age_in_seconds(mut self, input: i32) -> Self {
568 self.maximum_record_age_in_seconds = ::std::option::Option::Some(input);
569 self
570 }
571 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.</p><note>
572 /// <p>The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed</p>
573 /// </note>
574 pub fn set_maximum_record_age_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
575 self.maximum_record_age_in_seconds = input;
576 self
577 }
578 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. The default value is -1, which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records.</p><note>
579 /// <p>The minimum valid value for maximum record age is 60s. Although values less than 60 and greater than -1 fall within the parameter's absolute range, they are not allowed</p>
580 /// </note>
581 pub fn get_maximum_record_age_in_seconds(&self) -> &::std::option::Option<i32> {
582 &self.maximum_record_age_in_seconds
583 }
584 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry. The default value is false.</p>
585 pub fn bisect_batch_on_function_error(mut self, input: bool) -> Self {
586 self.bisect_batch_on_function_error = ::std::option::Option::Some(input);
587 self
588 }
589 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry. The default value is false.</p>
590 pub fn set_bisect_batch_on_function_error(mut self, input: ::std::option::Option<bool>) -> Self {
591 self.bisect_batch_on_function_error = input;
592 self
593 }
594 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) If the function returns an error, split the batch in two and retry. The default value is false.</p>
595 pub fn get_bisect_batch_on_function_error(&self) -> &::std::option::Option<bool> {
596 &self.bisect_batch_on_function_error
597 }
598 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.</p>
599 pub fn maximum_retry_attempts(mut self, input: i32) -> Self {
600 self.maximum_retry_attempts = ::std::option::Option::Some(input);
601 self
602 }
603 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.</p>
604 pub fn set_maximum_retry_attempts(mut self, input: ::std::option::Option<i32>) -> Self {
605 self.maximum_retry_attempts = input;
606 self
607 }
608 /// <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. The default value is -1, which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.</p>
609 pub fn get_maximum_retry_attempts(&self) -> &::std::option::Option<i32> {
610 &self.maximum_retry_attempts
611 }
612 /// <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>
613 pub fn tumbling_window_in_seconds(mut self, input: i32) -> Self {
614 self.tumbling_window_in_seconds = ::std::option::Option::Some(input);
615 self
616 }
617 /// <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>
618 pub fn set_tumbling_window_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
619 self.tumbling_window_in_seconds = input;
620 self
621 }
622 /// <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>
623 pub fn get_tumbling_window_in_seconds(&self) -> &::std::option::Option<i32> {
624 &self.tumbling_window_in_seconds
625 }
626 /// Appends an item to `function_response_types`.
627 ///
628 /// To override the contents of this collection use [`set_function_response_types`](Self::set_function_response_types).
629 ///
630 /// <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>
631 pub fn function_response_types(mut self, input: crate::types::FunctionResponseType) -> Self {
632 let mut v = self.function_response_types.unwrap_or_default();
633 v.push(input);
634 self.function_response_types = ::std::option::Option::Some(v);
635 self
636 }
637 /// <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>
638 pub fn set_function_response_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FunctionResponseType>>) -> Self {
639 self.function_response_types = input;
640 self
641 }
642 /// <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>
643 pub fn get_function_response_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FunctionResponseType>> {
644 &self.function_response_types
645 }
646 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
647 pub fn amazon_managed_kafka_event_source_config(mut self, input: crate::types::AmazonManagedKafkaEventSourceConfig) -> Self {
648 self.amazon_managed_kafka_event_source_config = ::std::option::Option::Some(input);
649 self
650 }
651 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
652 pub fn set_amazon_managed_kafka_event_source_config(
653 mut self,
654 input: ::std::option::Option<crate::types::AmazonManagedKafkaEventSourceConfig>,
655 ) -> Self {
656 self.amazon_managed_kafka_event_source_config = input;
657 self
658 }
659 /// <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p>
660 pub fn get_amazon_managed_kafka_event_source_config(&self) -> &::std::option::Option<crate::types::AmazonManagedKafkaEventSourceConfig> {
661 &self.amazon_managed_kafka_event_source_config
662 }
663 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
664 pub fn self_managed_kafka_event_source_config(mut self, input: crate::types::SelfManagedKafkaEventSourceConfig) -> Self {
665 self.self_managed_kafka_event_source_config = ::std::option::Option::Some(input);
666 self
667 }
668 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
669 pub fn set_self_managed_kafka_event_source_config(
670 mut self,
671 input: ::std::option::Option<crate::types::SelfManagedKafkaEventSourceConfig>,
672 ) -> Self {
673 self.self_managed_kafka_event_source_config = input;
674 self
675 }
676 /// <p>Specific configuration settings for a self-managed Apache Kafka event source.</p>
677 pub fn get_self_managed_kafka_event_source_config(&self) -> &::std::option::Option<crate::types::SelfManagedKafkaEventSourceConfig> {
678 &self.self_managed_kafka_event_source_config
679 }
680 /// <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>
681 pub fn scaling_config(mut self, input: crate::types::ScalingConfig) -> Self {
682 self.scaling_config = ::std::option::Option::Some(input);
683 self
684 }
685 /// <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>
686 pub fn set_scaling_config(mut self, input: ::std::option::Option<crate::types::ScalingConfig>) -> Self {
687 self.scaling_config = input;
688 self
689 }
690 /// <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>
691 pub fn get_scaling_config(&self) -> &::std::option::Option<crate::types::ScalingConfig> {
692 &self.scaling_config
693 }
694 /// <p>Specific configuration settings for a DocumentDB event source.</p>
695 pub fn document_db_event_source_config(mut self, input: crate::types::DocumentDbEventSourceConfig) -> Self {
696 self.document_db_event_source_config = ::std::option::Option::Some(input);
697 self
698 }
699 /// <p>Specific configuration settings for a DocumentDB event source.</p>
700 pub fn set_document_db_event_source_config(mut self, input: ::std::option::Option<crate::types::DocumentDbEventSourceConfig>) -> Self {
701 self.document_db_event_source_config = input;
702 self
703 }
704 /// <p>Specific configuration settings for a DocumentDB event source.</p>
705 pub fn get_document_db_event_source_config(&self) -> &::std::option::Option<crate::types::DocumentDbEventSourceConfig> {
706 &self.document_db_event_source_config
707 }
708 /// <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>.</p>
709 pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
710 self.kms_key_arn = ::std::option::Option::Some(input.into());
711 self
712 }
713 /// <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>.</p>
714 pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
715 self.kms_key_arn = input;
716 self
717 }
718 /// <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>.</p>
719 pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
720 &self.kms_key_arn
721 }
722 /// <p>An object that contains details about an error related to filter criteria encryption.</p>
723 pub fn filter_criteria_error(mut self, input: crate::types::FilterCriteriaError) -> Self {
724 self.filter_criteria_error = ::std::option::Option::Some(input);
725 self
726 }
727 /// <p>An object that contains details about an error related to filter criteria encryption.</p>
728 pub fn set_filter_criteria_error(mut self, input: ::std::option::Option<crate::types::FilterCriteriaError>) -> Self {
729 self.filter_criteria_error = input;
730 self
731 }
732 /// <p>An object that contains details about an error related to filter criteria encryption.</p>
733 pub fn get_filter_criteria_error(&self) -> &::std::option::Option<crate::types::FilterCriteriaError> {
734 &self.filter_criteria_error
735 }
736 /// <p>The Amazon Resource Name (ARN) of the event source mapping.</p>
737 pub fn event_source_mapping_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
738 self.event_source_mapping_arn = ::std::option::Option::Some(input.into());
739 self
740 }
741 /// <p>The Amazon Resource Name (ARN) of the event source mapping.</p>
742 pub fn set_event_source_mapping_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
743 self.event_source_mapping_arn = input;
744 self
745 }
746 /// <p>The Amazon Resource Name (ARN) of the event source mapping.</p>
747 pub fn get_event_source_mapping_arn(&self) -> &::std::option::Option<::std::string::String> {
748 &self.event_source_mapping_arn
749 }
750 /// <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>
751 pub fn metrics_config(mut self, input: crate::types::EventSourceMappingMetricsConfig) -> Self {
752 self.metrics_config = ::std::option::Option::Some(input);
753 self
754 }
755 /// <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>
756 pub fn set_metrics_config(mut self, input: ::std::option::Option<crate::types::EventSourceMappingMetricsConfig>) -> Self {
757 self.metrics_config = input;
758 self
759 }
760 /// <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>
761 pub fn get_metrics_config(&self) -> &::std::option::Option<crate::types::EventSourceMappingMetricsConfig> {
762 &self.metrics_config
763 }
764 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html">Event source mapping logging</a>.</p>
765 pub fn logging_config(mut self, input: crate::types::EventSourceMappingLoggingConfig) -> Self {
766 self.logging_config = ::std::option::Option::Some(input);
767 self
768 }
769 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html">Event source mapping logging</a>.</p>
770 pub fn set_logging_config(mut self, input: ::std::option::Option<crate::types::EventSourceMappingLoggingConfig>) -> Self {
771 self.logging_config = input;
772 self
773 }
774 /// <p>(Amazon MSK, and self-managed Apache Kafka only) The logging configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/esm-logging.html">Event source mapping logging</a>.</p>
775 pub fn get_logging_config(&self) -> &::std::option::Option<crate::types::EventSourceMappingLoggingConfig> {
776 &self.logging_config
777 }
778 /// <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>
779 pub fn provisioned_poller_config(mut self, input: crate::types::ProvisionedPollerConfig) -> Self {
780 self.provisioned_poller_config = ::std::option::Option::Some(input);
781 self
782 }
783 /// <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>
784 pub fn set_provisioned_poller_config(mut self, input: ::std::option::Option<crate::types::ProvisionedPollerConfig>) -> Self {
785 self.provisioned_poller_config = input;
786 self
787 }
788 /// <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>
789 pub fn get_provisioned_poller_config(&self) -> &::std::option::Option<crate::types::ProvisionedPollerConfig> {
790 &self.provisioned_poller_config
791 }
792 /// Consumes the builder and constructs a [`EventSourceMappingConfiguration`](crate::types::EventSourceMappingConfiguration).
793 pub fn build(self) -> crate::types::EventSourceMappingConfiguration {
794 crate::types::EventSourceMappingConfiguration {
795 uuid: self.uuid,
796 starting_position: self.starting_position,
797 starting_position_timestamp: self.starting_position_timestamp,
798 batch_size: self.batch_size,
799 maximum_batching_window_in_seconds: self.maximum_batching_window_in_seconds,
800 parallelization_factor: self.parallelization_factor,
801 event_source_arn: self.event_source_arn,
802 filter_criteria: self.filter_criteria,
803 function_arn: self.function_arn,
804 last_modified: self.last_modified,
805 last_processing_result: self.last_processing_result,
806 state: self.state,
807 state_transition_reason: self.state_transition_reason,
808 destination_config: self.destination_config,
809 topics: self.topics,
810 queues: self.queues,
811 source_access_configurations: self.source_access_configurations,
812 self_managed_event_source: self.self_managed_event_source,
813 maximum_record_age_in_seconds: self.maximum_record_age_in_seconds,
814 bisect_batch_on_function_error: self.bisect_batch_on_function_error,
815 maximum_retry_attempts: self.maximum_retry_attempts,
816 tumbling_window_in_seconds: self.tumbling_window_in_seconds,
817 function_response_types: self.function_response_types,
818 amazon_managed_kafka_event_source_config: self.amazon_managed_kafka_event_source_config,
819 self_managed_kafka_event_source_config: self.self_managed_kafka_event_source_config,
820 scaling_config: self.scaling_config,
821 document_db_event_source_config: self.document_db_event_source_config,
822 kms_key_arn: self.kms_key_arn,
823 filter_criteria_error: self.filter_criteria_error,
824 event_source_mapping_arn: self.event_source_mapping_arn,
825 metrics_config: self.metrics_config,
826 logging_config: self.logging_config,
827 provisioned_poller_config: self.provisioned_poller_config,
828 }
829 }
830}