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

Implementations§

The identifier of the event source mapping.

Examples found in repository?
src/client.rs (line 8203)
8202
8203
8204
8205
        pub fn uuid(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.uuid(input.into());
            self
        }

The identifier of the event source mapping.

Examples found in repository?
src/client.rs (line 8208)
8207
8208
8209
8210
        pub fn set_uuid(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_uuid(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 8221)
8220
8221
8222
8223
        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 8237)
8233
8234
8235
8236
8237
8238
8239
        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 8243)
8242
8243
8244
8245
        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 8249)
8248
8249
8250
8251
        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 8262)
8261
8262
8263
8264
        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 8275)
8274
8275
8276
8277
        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 8280)
8279
8280
8281
8282
        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 8288)
8284
8285
8286
8287
8288
8289
8290
        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 8295)
8294
8295
8296
8297
        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 8305)
8301
8302
8303
8304
8305
8306
8307
        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) An Amazon SQS queue or Amazon SNS topic destination for discarded records.

Examples found in repository?
src/client.rs (line 8310)
8309
8310
8311
8312
        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 8318)
8314
8315
8316
8317
8318
8319
8320
        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 8323)
8322
8323
8324
8325
        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 8331)
8327
8328
8329
8330
8331
8332
8333
        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 8336)
8335
8336
8337
8338
        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 8344)
8340
8341
8342
8343
8344
8345
8346
        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 8349)
8348
8349
8350
8351
        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 8354)
8353
8354
8355
8356
        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 number of batches to process from each shard concurrently.

Examples found in repository?
src/client.rs (line 8359)
8358
8359
8360
8361
        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 8364)
8363
8364
8365
8366
        pub fn set_parallelization_factor(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_parallelization_factor(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 8376)
8372
8373
8374
8375
8376
8377
8378
        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 8384)
8380
8381
8382
8383
8384
8385
8386
        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
        }

(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 8389)
8388
8389
8390
8391
        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 8394)
8393
8394
8395
8396
        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 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 8406)
8402
8403
8404
8405
8406
8407
8408
        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 8414)
8410
8411
8412
8413
8414
8415
8416
        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
        }

Consumes the builder and constructs a UpdateEventSourceMappingInput.

Examples found in repository?
src/client.rs (line 8170)
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::UpdateEventSourceMapping,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::UpdateEventSourceMappingError>,
        > {
            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::UpdateEventSourceMappingOutput,
            aws_smithy_http::result::SdkError<crate::error::UpdateEventSourceMappingError>,
        > {
            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