pub struct Builder { /* private fields */ }
Expand description

Implementations§

The Amazon Resource Name (ARN) of the event source.

  • Amazon Kinesis - The ARN of the data stream or a stream consumer.

  • Amazon DynamoDB Streams - The ARN of the stream.

  • Amazon Simple Queue Service - The ARN of the queue.

  • Amazon Managed Streaming for Apache Kafka - The ARN of the cluster.

Examples found in repository?
src/client.rs (line 1990)
1989
1990
1991
1992
        pub fn event_source_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.event_source_arn(input.into());
            self
        }

The Amazon Resource Name (ARN) of the event source.

  • Amazon Kinesis - The ARN of the data stream or a stream consumer.

  • Amazon DynamoDB Streams - The ARN of the stream.

  • Amazon Simple Queue Service - The ARN of the queue.

  • Amazon Managed Streaming for Apache Kafka - The ARN of the cluster.

Examples found in repository?
src/client.rs (line 2004)
2000
2001
2002
2003
2004
2005
2006
        pub fn set_event_source_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_event_source_arn(input);
            self
        }

The name of the Lambda function.

Name formats

  • Function name - MyFunction.

  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.

  • Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.

  • Partial ARN - 123456789012:function:MyFunction.

The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.

Examples found in repository?
src/client.rs (line 2017)
2016
2017
2018
2019
        pub fn function_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.function_name(input.into());
            self
        }

The name of the Lambda function.

Name formats

  • Function name - MyFunction.

  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction.

  • Version or Alias ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD.

  • Partial ARN - 123456789012:function:MyFunction.

The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.

Examples found in repository?
src/client.rs (line 2033)
2029
2030
2031
2032
2033
2034
2035
        pub fn set_function_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_function_name(input);
            self
        }

When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

Default: True

Examples found in repository?
src/client.rs (line 2039)
2038
2039
2040
2041
        pub fn enabled(mut self, input: bool) -> Self {
            self.inner = self.inner.enabled(input);
            self
        }

When true, the event source mapping is active. When false, Lambda pauses polling and invocation.

Default: True

Examples found in repository?
src/client.rs (line 2045)
2044
2045
2046
2047
        pub fn set_enabled(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_enabled(input);
            self
        }

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).

  • Amazon Kinesis - Default 100. Max 10,000.

  • Amazon DynamoDB Streams - Default 100. Max 10,000.

  • Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

  • Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • Self-managed Apache Kafka - Default 100. Max 10,000.

  • Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

Examples found in repository?
src/client.rs (line 2058)
2057
2058
2059
2060
        pub fn batch_size(mut self, input: i32) -> Self {
            self.inner = self.inner.batch_size(input);
            self
        }

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).

  • Amazon Kinesis - Default 100. Max 10,000.

  • Amazon DynamoDB Streams - Default 100. Max 10,000.

  • Amazon Simple Queue Service - Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.

  • Amazon Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • Self-managed Apache Kafka - Default 100. Max 10,000.

  • Amazon MQ (ActiveMQ and RabbitMQ) - Default 100. Max 10,000.

Examples found in repository?
src/client.rs (line 2071)
2070
2071
2072
2073
        pub fn set_batch_size(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_batch_size(input);
            self
        }

(Streams and Amazon SQS) An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

Examples found in repository?
src/client.rs (line 2076)
2075
2076
2077
2078
        pub fn filter_criteria(mut self, input: crate::model::FilterCriteria) -> Self {
            self.inner = self.inner.filter_criteria(input);
            self
        }

(Streams and Amazon SQS) An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see Lambda event filtering.

Examples found in repository?
src/client.rs (line 2084)
2080
2081
2082
2083
2084
2085
2086
        pub fn set_filter_criteria(
            mut self,
            input: std::option::Option<crate::model::FilterCriteria>,
        ) -> Self {
            self.inner = self.inner.set_filter_criteria(input);
            self
        }

(Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

Default: 0

Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

Examples found in repository?
src/client.rs (line 2091)
2090
2091
2092
2093
        pub fn maximum_batching_window_in_seconds(mut self, input: i32) -> Self {
            self.inner = self.inner.maximum_batching_window_in_seconds(input);
            self
        }

(Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.

Default: 0

Related setting: When you set BatchSize to a value greater than 10, you must set MaximumBatchingWindowInSeconds to at least 1.

Examples found in repository?
src/client.rs (line 2101)
2097
2098
2099
2100
2101
2102
2103
        pub fn set_maximum_batching_window_in_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.inner = self.inner.set_maximum_batching_window_in_seconds(input);
            self
        }

(Streams only) The number of batches to process from each shard concurrently.

Examples found in repository?
src/client.rs (line 2106)
2105
2106
2107
2108
        pub fn parallelization_factor(mut self, input: i32) -> Self {
            self.inner = self.inner.parallelization_factor(input);
            self
        }

(Streams only) The number of batches to process from each shard concurrently.

Examples found in repository?
src/client.rs (line 2111)
2110
2111
2112
2113
        pub fn set_parallelization_factor(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_parallelization_factor(input);
            self
        }

The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams.

Examples found in repository?
src/client.rs (line 2116)
2115
2116
2117
2118
        pub fn starting_position(mut self, input: crate::model::EventSourcePosition) -> Self {
            self.inner = self.inner.starting_position(input);
            self
        }

The position in a stream from which to start reading. Required for Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. AT_TIMESTAMP is supported only for Amazon Kinesis streams.

Examples found in repository?
src/client.rs (line 2124)
2120
2121
2122
2123
2124
2125
2126
        pub fn set_starting_position(
            mut self,
            input: std::option::Option<crate::model::EventSourcePosition>,
        ) -> Self {
            self.inner = self.inner.set_starting_position(input);
            self
        }

With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.

Examples found in repository?
src/client.rs (line 2129)
2128
2129
2130
2131
        pub fn starting_position_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.starting_position_timestamp(input);
            self
        }

With StartingPosition set to AT_TIMESTAMP, the time from which to start reading.

Examples found in repository?
src/client.rs (line 2137)
2133
2134
2135
2136
2137
2138
2139
        pub fn set_starting_position_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_starting_position_timestamp(input);
            self
        }

(Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records.

Examples found in repository?
src/client.rs (line 2142)
2141
2142
2143
2144
        pub fn destination_config(mut self, input: crate::model::DestinationConfig) -> Self {
            self.inner = self.inner.destination_config(input);
            self
        }

(Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records.

Examples found in repository?
src/client.rs (line 2150)
2146
2147
2148
2149
2150
2151
2152
        pub fn set_destination_config(
            mut self,
            input: std::option::Option<crate::model::DestinationConfig>,
        ) -> Self {
            self.inner = self.inner.set_destination_config(input);
            self
        }

(Streams only) Discard records older than the specified age. The default value is infinite (-1).

Examples found in repository?
src/client.rs (line 2155)
2154
2155
2156
2157
        pub fn maximum_record_age_in_seconds(mut self, input: i32) -> Self {
            self.inner = self.inner.maximum_record_age_in_seconds(input);
            self
        }

(Streams only) Discard records older than the specified age. The default value is infinite (-1).

Examples found in repository?
src/client.rs (line 2163)
2159
2160
2161
2162
2163
2164
2165
        pub fn set_maximum_record_age_in_seconds(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.inner = self.inner.set_maximum_record_age_in_seconds(input);
            self
        }

(Streams only) If the function returns an error, split the batch in two and retry.

Examples found in repository?
src/client.rs (line 2168)
2167
2168
2169
2170
        pub fn bisect_batch_on_function_error(mut self, input: bool) -> Self {
            self.inner = self.inner.bisect_batch_on_function_error(input);
            self
        }

(Streams only) If the function returns an error, split the batch in two and retry.

Examples found in repository?
src/client.rs (line 2176)
2172
2173
2174
2175
2176
2177
2178
        pub fn set_bisect_batch_on_function_error(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.inner = self.inner.set_bisect_batch_on_function_error(input);
            self
        }

(Streams only) 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.

Examples found in repository?
src/client.rs (line 2181)
2180
2181
2182
2183
        pub fn maximum_retry_attempts(mut self, input: i32) -> Self {
            self.inner = self.inner.maximum_retry_attempts(input);
            self
        }

(Streams only) 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.

Examples found in repository?
src/client.rs (line 2186)
2185
2186
2187
2188
        pub fn set_maximum_retry_attempts(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_maximum_retry_attempts(input);
            self
        }

(Streams only) The duration in seconds of a processing window. The range is between 1 second and 900 seconds.

Examples found in repository?
src/client.rs (line 2191)
2190
2191
2192
2193
        pub fn tumbling_window_in_seconds(mut self, input: i32) -> Self {
            self.inner = self.inner.tumbling_window_in_seconds(input);
            self
        }

(Streams only) The duration in seconds of a processing window. The range is between 1 second and 900 seconds.

Examples found in repository?
src/client.rs (line 2196)
2195
2196
2197
2198
        pub fn set_tumbling_window_in_seconds(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_tumbling_window_in_seconds(input);
            self
        }

Appends an item to topics.

To override the contents of this collection use set_topics.

The name of the Kafka topic.

Examples found in repository?
src/client.rs (line 2205)
2204
2205
2206
2207
        pub fn topics(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.topics(input.into());
            self
        }

The name of the Kafka topic.

Examples found in repository?
src/client.rs (line 2213)
2209
2210
2211
2212
2213
2214
2215
        pub fn set_topics(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_topics(input);
            self
        }

Appends an item to queues.

To override the contents of this collection use set_queues.

(MQ) The name of the Amazon MQ broker destination queue to consume.

Examples found in repository?
src/client.rs (line 2222)
2221
2222
2223
2224
        pub fn queues(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.queues(input.into());
            self
        }

(MQ) The name of the Amazon MQ broker destination queue to consume.

Examples found in repository?
src/client.rs (line 2230)
2226
2227
2228
2229
2230
2231
2232
        pub fn set_queues(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_queues(input);
            self
        }

Appends an item to source_access_configurations.

To override the contents of this collection use set_source_access_configurations.

An array of authentication protocols or VPC components required to secure your event source.

Examples found in repository?
src/client.rs (line 2242)
2238
2239
2240
2241
2242
2243
2244
        pub fn source_access_configurations(
            mut self,
            input: crate::model::SourceAccessConfiguration,
        ) -> Self {
            self.inner = self.inner.source_access_configurations(input);
            self
        }

An array of authentication protocols or VPC components required to secure your event source.

Examples found in repository?
src/client.rs (line 2250)
2246
2247
2248
2249
2250
2251
2252
        pub fn set_source_access_configurations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SourceAccessConfiguration>>,
        ) -> Self {
            self.inner = self.inner.set_source_access_configurations(input);
            self
        }

The self-managed Apache Kafka cluster to receive records from.

Examples found in repository?
src/client.rs (line 2258)
2254
2255
2256
2257
2258
2259
2260
        pub fn self_managed_event_source(
            mut self,
            input: crate::model::SelfManagedEventSource,
        ) -> Self {
            self.inner = self.inner.self_managed_event_source(input);
            self
        }

The self-managed Apache Kafka cluster to receive records from.

Examples found in repository?
src/client.rs (line 2266)
2262
2263
2264
2265
2266
2267
2268
        pub fn set_self_managed_event_source(
            mut self,
            input: std::option::Option<crate::model::SelfManagedEventSource>,
        ) -> Self {
            self.inner = self.inner.set_self_managed_event_source(input);
            self
        }

Appends an item to function_response_types.

To override the contents of this collection use set_function_response_types.

(Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.

Examples found in repository?
src/client.rs (line 2278)
2274
2275
2276
2277
2278
2279
2280
        pub fn function_response_types(
            mut self,
            input: crate::model::FunctionResponseType,
        ) -> Self {
            self.inner = self.inner.function_response_types(input);
            self
        }

(Streams and Amazon SQS) A list of current response type enums applied to the event source mapping.

Examples found in repository?
src/client.rs (line 2286)
2282
2283
2284
2285
2286
2287
2288
        pub fn set_function_response_types(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::FunctionResponseType>>,
        ) -> Self {
            self.inner = self.inner.set_function_response_types(input);
            self
        }

Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

Examples found in repository?
src/client.rs (line 2294)
2290
2291
2292
2293
2294
2295
2296
        pub fn amazon_managed_kafka_event_source_config(
            mut self,
            input: crate::model::AmazonManagedKafkaEventSourceConfig,
        ) -> Self {
            self.inner = self.inner.amazon_managed_kafka_event_source_config(input);
            self
        }

Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.

Examples found in repository?
src/client.rs (line 2304)
2298
2299
2300
2301
2302
2303
2304
2305
2306
        pub fn set_amazon_managed_kafka_event_source_config(
            mut self,
            input: std::option::Option<crate::model::AmazonManagedKafkaEventSourceConfig>,
        ) -> Self {
            self.inner = self
                .inner
                .set_amazon_managed_kafka_event_source_config(input);
            self
        }

Specific configuration settings for a self-managed Apache Kafka event source.

Examples found in repository?
src/client.rs (line 2312)
2308
2309
2310
2311
2312
2313
2314
        pub fn self_managed_kafka_event_source_config(
            mut self,
            input: crate::model::SelfManagedKafkaEventSourceConfig,
        ) -> Self {
            self.inner = self.inner.self_managed_kafka_event_source_config(input);
            self
        }

Specific configuration settings for a self-managed Apache Kafka event source.

Examples found in repository?
src/client.rs (line 2320)
2316
2317
2318
2319
2320
2321
2322
        pub fn set_self_managed_kafka_event_source_config(
            mut self,
            input: std::option::Option<crate::model::SelfManagedKafkaEventSourceConfig>,
        ) -> Self {
            self.inner = self.inner.set_self_managed_kafka_event_source_config(input);
            self
        }

Consumes the builder and constructs a CreateEventSourceMappingInput.

Examples found in repository?
src/client.rs (line 1951)
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateEventSourceMapping,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateEventSourceMappingError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateEventSourceMappingOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateEventSourceMappingError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more