public static final class CfnEventSourceMappingProps.Builder
extends java.lang.Object
CfnEventSourceMappingProps
Constructor and Description |
---|
Builder() |
public CfnEventSourceMappingProps.Builder functionName(java.lang.String functionName)
CfnEventSourceMappingProps.getFunctionName()
functionName
- The name of the Lambda function. This parameter is required.
Name formats - Function name – MyFunction
.
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD
.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.
this
public CfnEventSourceMappingProps.Builder amazonManagedKafkaEventSourceConfig(IResolvable amazonManagedKafkaEventSourceConfig)
CfnEventSourceMappingProps.getAmazonManagedKafkaEventSourceConfig()
amazonManagedKafkaEventSourceConfig
- Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.this
public CfnEventSourceMappingProps.Builder amazonManagedKafkaEventSourceConfig(CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty amazonManagedKafkaEventSourceConfig)
CfnEventSourceMappingProps.getAmazonManagedKafkaEventSourceConfig()
amazonManagedKafkaEventSourceConfig
- Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.this
public CfnEventSourceMappingProps.Builder batchSize(java.lang.Number batchSize)
CfnEventSourceMappingProps.getBatchSize()
batchSize
- 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).
this
public CfnEventSourceMappingProps.Builder bisectBatchOnFunctionError(java.lang.Boolean bisectBatchOnFunctionError)
CfnEventSourceMappingProps.getBisectBatchOnFunctionError()
bisectBatchOnFunctionError
- (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
The default value is false.this
public CfnEventSourceMappingProps.Builder bisectBatchOnFunctionError(IResolvable bisectBatchOnFunctionError)
CfnEventSourceMappingProps.getBisectBatchOnFunctionError()
bisectBatchOnFunctionError
- (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
The default value is false.this
public CfnEventSourceMappingProps.Builder destinationConfig(IResolvable destinationConfig)
CfnEventSourceMappingProps.getDestinationConfig()
destinationConfig
- (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records.this
public CfnEventSourceMappingProps.Builder destinationConfig(CfnEventSourceMapping.DestinationConfigProperty destinationConfig)
CfnEventSourceMappingProps.getDestinationConfig()
destinationConfig
- (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records.this
public CfnEventSourceMappingProps.Builder documentDbEventSourceConfig(IResolvable documentDbEventSourceConfig)
CfnEventSourceMappingProps.getDocumentDbEventSourceConfig()
documentDbEventSourceConfig
- Specific configuration settings for a DocumentDB event source.this
public CfnEventSourceMappingProps.Builder documentDbEventSourceConfig(CfnEventSourceMapping.DocumentDBEventSourceConfigProperty documentDbEventSourceConfig)
CfnEventSourceMappingProps.getDocumentDbEventSourceConfig()
documentDbEventSourceConfig
- Specific configuration settings for a DocumentDB event source.this
public CfnEventSourceMappingProps.Builder enabled(java.lang.Boolean enabled)
CfnEventSourceMappingProps.getEnabled()
enabled
- When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
Default: Truethis
public CfnEventSourceMappingProps.Builder enabled(IResolvable enabled)
CfnEventSourceMappingProps.getEnabled()
enabled
- When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
Default: Truethis
public CfnEventSourceMappingProps.Builder eventSourceArn(java.lang.String eventSourceArn)
CfnEventSourceMappingProps.getEventSourceArn()
eventSourceArn
- The Amazon Resource Name (ARN) of the event source.
this
public CfnEventSourceMappingProps.Builder filterCriteria(IResolvable filterCriteria)
CfnEventSourceMappingProps.getFilterCriteria()
filterCriteria
- An object that defines the filter criteria that determine whether Lambda should process an event.
For more information, see Lambda event filtering .this
public CfnEventSourceMappingProps.Builder filterCriteria(CfnEventSourceMapping.FilterCriteriaProperty filterCriteria)
CfnEventSourceMappingProps.getFilterCriteria()
filterCriteria
- An object that defines the filter criteria that determine whether Lambda should process an event.
For more information, see Lambda event filtering .this
public CfnEventSourceMappingProps.Builder functionResponseTypes(java.util.List<java.lang.String> functionResponseTypes)
CfnEventSourceMappingProps.getFunctionResponseTypes()
functionResponseTypes
- (Streams and SQS) A list of current response type enums applied to the event source mapping.
Valid Values: ReportBatchItemFailures
this
public CfnEventSourceMappingProps.Builder maximumBatchingWindowInSeconds(java.lang.Number maximumBatchingWindowInSeconds)
CfnEventSourceMappingProps.getMaximumBatchingWindowInSeconds()
maximumBatchingWindowInSeconds
- The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.
Default ( Kinesis , DynamoDB , Amazon SQS event sources) : 0
Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources) : 500 ms
Related setting: For Amazon SQS event sources, when you set BatchSize
to a value greater than 10, you must set MaximumBatchingWindowInSeconds
to at least 1.
this
public CfnEventSourceMappingProps.Builder maximumRecordAgeInSeconds(java.lang.Number maximumRecordAgeInSeconds)
CfnEventSourceMappingProps.getMaximumRecordAgeInSeconds()
maximumRecordAgeInSeconds
- (Kinesis and DynamoDB Streams only) 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.this
public CfnEventSourceMappingProps.Builder maximumRetryAttempts(java.lang.Number maximumRetryAttempts)
CfnEventSourceMappingProps.getMaximumRetryAttempts()
maximumRetryAttempts
- (Kinesis and DynamoDB Streams only) 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.this
public CfnEventSourceMappingProps.Builder parallelizationFactor(java.lang.Number parallelizationFactor)
CfnEventSourceMappingProps.getParallelizationFactor()
parallelizationFactor
- (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard.
The default value is 1.this
public CfnEventSourceMappingProps.Builder queues(java.util.List<java.lang.String> queues)
CfnEventSourceMappingProps.getQueues()
queues
- (Amazon MQ) The name of the Amazon MQ broker destination queue to consume.this
public CfnEventSourceMappingProps.Builder scalingConfig(IResolvable scalingConfig)
CfnEventSourceMappingProps.getScalingConfig()
scalingConfig
- ( Amazon Simple Queue Service only) The scaling configuration for the event source.
For more information, see Configuring maximum concurrency for Amazon SQS event sources .this
public CfnEventSourceMappingProps.Builder scalingConfig(CfnEventSourceMapping.ScalingConfigProperty scalingConfig)
CfnEventSourceMappingProps.getScalingConfig()
scalingConfig
- ( Amazon Simple Queue Service only) The scaling configuration for the event source.
For more information, see Configuring maximum concurrency for Amazon SQS event sources .this
public CfnEventSourceMappingProps.Builder selfManagedEventSource(IResolvable selfManagedEventSource)
CfnEventSourceMappingProps.getSelfManagedEventSource()
selfManagedEventSource
- The self-managed Apache Kafka cluster for your event source.this
public CfnEventSourceMappingProps.Builder selfManagedEventSource(CfnEventSourceMapping.SelfManagedEventSourceProperty selfManagedEventSource)
CfnEventSourceMappingProps.getSelfManagedEventSource()
selfManagedEventSource
- The self-managed Apache Kafka cluster for your event source.this
public CfnEventSourceMappingProps.Builder selfManagedKafkaEventSourceConfig(IResolvable selfManagedKafkaEventSourceConfig)
CfnEventSourceMappingProps.getSelfManagedKafkaEventSourceConfig()
selfManagedKafkaEventSourceConfig
- Specific configuration settings for a self-managed Apache Kafka event source.this
public CfnEventSourceMappingProps.Builder selfManagedKafkaEventSourceConfig(CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty selfManagedKafkaEventSourceConfig)
CfnEventSourceMappingProps.getSelfManagedKafkaEventSourceConfig()
selfManagedKafkaEventSourceConfig
- Specific configuration settings for a self-managed Apache Kafka event source.this
public CfnEventSourceMappingProps.Builder sourceAccessConfigurations(IResolvable sourceAccessConfigurations)
CfnEventSourceMappingProps.getSourceAccessConfigurations()
sourceAccessConfigurations
- An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.this
public CfnEventSourceMappingProps.Builder sourceAccessConfigurations(java.util.List<? extends java.lang.Object> sourceAccessConfigurations)
CfnEventSourceMappingProps.getSourceAccessConfigurations()
sourceAccessConfigurations
- An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.this
public CfnEventSourceMappingProps.Builder startingPosition(java.lang.String startingPosition)
CfnEventSourceMappingProps.getStartingPosition()
startingPosition
- The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.
this
public CfnEventSourceMappingProps.Builder startingPositionTimestamp(java.lang.Number startingPositionTimestamp)
CfnEventSourceMappingProps.getStartingPositionTimestamp()
startingPositionTimestamp
- With `StartingPosition` set to `AT_TIMESTAMP` , the time from which to start reading, in Unix time seconds.this
public CfnEventSourceMappingProps.Builder topics(java.util.List<java.lang.String> topics)
CfnEventSourceMappingProps.getTopics()
topics
- The name of the Kafka topic.this
public CfnEventSourceMappingProps.Builder tumblingWindowInSeconds(java.lang.Number tumblingWindowInSeconds)
CfnEventSourceMappingProps.getTumblingWindowInSeconds()
tumblingWindowInSeconds
- (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.this
public CfnEventSourceMappingProps build()
CfnEventSourceMappingProps
java.lang.NullPointerException
- if any required attribute was not provided