Class: AWSCDK::Lambda::CfnEventSourceMappingProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lambda::CfnEventSourceMappingProps
- Defined in:
- lambda/cfn_event_source_mapping_props.rb
Overview
Properties for defining a CfnEventSourceMapping.
Instance Attribute Summary collapse
-
#amazon_managed_kafka_event_source_config ⇒ AWSCDK::IResolvable, ...
readonly
Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
-
#batch_size ⇒ Numeric?
readonly
The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function.
-
#bisect_batch_on_function_error ⇒ Boolean, ...
readonly
(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
-
#destination_config ⇒ AWSCDK::IResolvable, ...
readonly
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.
-
#document_db_event_source_config ⇒ AWSCDK::IResolvable, ...
readonly
Specific configuration settings for a DocumentDB event source.
-
#enabled ⇒ Boolean, ...
readonly
When true, the event source mapping is active.
-
#event_source_arn ⇒ String, ...
readonly
The Amazon Resource Name (ARN) of the event source.
-
#filter_criteria ⇒ AWSCDK::IResolvable, ...
readonly
An object that defines the filter criteria that determine whether Lambda should process an event.
-
#function_name ⇒ String, ...
readonly
The name or ARN of the Lambda function.
-
#function_response_types ⇒ Array<String>?
readonly
(Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping.
-
#kms_key_arn ⇒ String?
readonly
The ARN of the AWS Key Management Service ( AWS ) customer managed key that Lambda uses to encrypt your function's filter criteria .
-
#logging_config ⇒ AWSCDK::IResolvable, ...
readonly
The function's Amazon CloudWatch Logs configuration settings.
-
#maximum_batching_window_in_seconds ⇒ Numeric?
readonly
The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function.
-
#maximum_record_age_in_seconds ⇒ Numeric?
readonly
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age.
-
#maximum_retry_attempts ⇒ Numeric?
readonly
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries.
-
#metrics_config ⇒ AWSCDK::IResolvable, ...
readonly
The metrics configuration for your event source.
-
#parallelization_factor ⇒ Numeric?
readonly
(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard.
-
#provisioned_poller_config ⇒ AWSCDK::IResolvable, ...
readonly
(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source.
-
#queues ⇒ Array<String>?
readonly
(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
-
#scaling_config ⇒ AWSCDK::IResolvable, ...
readonly
This property is for Amazon SQS event sources only.
-
#self_managed_event_source ⇒ AWSCDK::IResolvable, ...
readonly
The self-managed Apache Kafka cluster for your event source.
-
#self_managed_kafka_event_source_config ⇒ AWSCDK::IResolvable, ...
readonly
Specific configuration settings for a self-managed Apache Kafka event source.
-
#source_access_configurations ⇒ AWSCDK::IResolvable, ...
readonly
An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
-
#starting_position ⇒ String?
readonly
The position in a stream from which to start reading.
-
#starting_position_timestamp ⇒ Numeric?
readonly
With
StartingPositionset toAT_TIMESTAMP, the time from which to start reading, in Unix time seconds. -
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of tags to add to the event source mapping.
-
#topics ⇒ Array<String>?
readonly
The name of the Kafka topic.
-
#tumbling_window_in_seconds ⇒ Numeric?
readonly
(Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(function_name:, amazon_managed_kafka_event_source_config: nil, batch_size: nil, bisect_batch_on_function_error: nil, destination_config: nil, document_db_event_source_config: nil, enabled: nil, event_source_arn: nil, filter_criteria: nil, function_response_types: nil, kms_key_arn: nil, logging_config: nil, maximum_batching_window_in_seconds: nil, maximum_record_age_in_seconds: nil, maximum_retry_attempts: nil, metrics_config: nil, parallelization_factor: nil, provisioned_poller_config: nil, queues: nil, scaling_config: nil, self_managed_event_source: nil, self_managed_kafka_event_source_config: nil, source_access_configurations: nil, starting_position: nil, starting_position_timestamp: nil, tags: nil, topics: nil, tumbling_window_in_seconds: nil) ⇒ CfnEventSourceMappingProps
constructor
A new instance of CfnEventSourceMappingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(function_name:, amazon_managed_kafka_event_source_config: nil, batch_size: nil, bisect_batch_on_function_error: nil, destination_config: nil, document_db_event_source_config: nil, enabled: nil, event_source_arn: nil, filter_criteria: nil, function_response_types: nil, kms_key_arn: nil, logging_config: nil, maximum_batching_window_in_seconds: nil, maximum_record_age_in_seconds: nil, maximum_retry_attempts: nil, metrics_config: nil, parallelization_factor: nil, provisioned_poller_config: nil, queues: nil, scaling_config: nil, self_managed_event_source: nil, self_managed_kafka_event_source_config: nil, source_access_configurations: nil, starting_position: nil, starting_position_timestamp: nil, tags: nil, topics: nil, tumbling_window_in_seconds: nil) ⇒ CfnEventSourceMappingProps
Returns a new instance of CfnEventSourceMappingProps.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 37 def initialize(function_name:, amazon_managed_kafka_event_source_config: nil, batch_size: nil, bisect_batch_on_function_error: nil, destination_config: nil, document_db_event_source_config: nil, enabled: nil, event_source_arn: nil, filter_criteria: nil, function_response_types: nil, kms_key_arn: nil, logging_config: nil, maximum_batching_window_in_seconds: nil, maximum_record_age_in_seconds: nil, maximum_retry_attempts: nil, metrics_config: nil, parallelization_factor: nil, provisioned_poller_config: nil, queues: nil, scaling_config: nil, self_managed_event_source: nil, self_managed_kafka_event_source_config: nil, source_access_configurations: nil, starting_position: nil, starting_position_timestamp: nil, tags: nil, topics: nil, tumbling_window_in_seconds: nil) @function_name = function_name Jsii::Type.check_type(@function_name, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUZ1bmN0aW9uUmVmIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSVZlcnNpb25SZWYifV19fQ==")), "functionName") @amazon_managed_kafka_event_source_config = amazon_managed_kafka_event_source_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::AmazonManagedKafkaEventSourceConfigProperty.new(**amazon_managed_kafka_event_source_config.transform_keys(&:to_sym)) : amazon_managed_kafka_event_source_config Jsii::Type.check_type(@amazon_managed_kafka_event_source_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLkFtYXpvbk1hbmFnZWRLYWZrYUV2ZW50U291cmNlQ29uZmlnUHJvcGVydHkifV19fQ==")), "amazonManagedKafkaEventSourceConfig") unless @amazon_managed_kafka_event_source_config.nil? @batch_size = batch_size Jsii::Type.check_type(@batch_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "batchSize") unless @batch_size.nil? @bisect_batch_on_function_error = bisect_batch_on_function_error Jsii::Type.check_type(@bisect_batch_on_function_error, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "bisectBatchOnFunctionError") unless @bisect_batch_on_function_error.nil? @destination_config = destination_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::DestinationConfigProperty.new(**destination_config.transform_keys(&:to_sym)) : destination_config Jsii::Type.check_type(@destination_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLkRlc3RpbmF0aW9uQ29uZmlnUHJvcGVydHkifV19fQ==")), "destinationConfig") unless @destination_config.nil? @document_db_event_source_config = document_db_event_source_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::DocumentDBEventSourceConfigProperty.new(**document_db_event_source_config.transform_keys(&:to_sym)) : document_db_event_source_config Jsii::Type.check_type(@document_db_event_source_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLkRvY3VtZW50REJFdmVudFNvdXJjZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "documentDbEventSourceConfig") unless @document_db_event_source_config.nil? @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil? @event_source_arn = event_source_arn Jsii::Type.check_type(@event_source_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19raW5lc2lzLklTdHJlYW1SZWYifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX21zay5JQ2x1c3RlclJlZiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuaW50ZXJmYWNlcy5hd3Nfc3FzLklRdWV1ZVJlZiJ9XX19")), "eventSourceArn") unless @event_source_arn.nil? @filter_criteria = filter_criteria.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::FilterCriteriaProperty.new(**filter_criteria.transform_keys(&:to_sym)) : filter_criteria Jsii::Type.check_type(@filter_criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLkZpbHRlckNyaXRlcmlhUHJvcGVydHkifV19fQ==")), "filterCriteria") unless @filter_criteria.nil? @function_response_types = function_response_types Jsii::Type.check_type(@function_response_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "functionResponseTypes") unless @function_response_types.nil? @kms_key_arn = kms_key_arn Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless @kms_key_arn.nil? @logging_config = logging_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::LoggingConfigProperty.new(**logging_config.transform_keys(&:to_sym)) : logging_config Jsii::Type.check_type(@logging_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLkxvZ2dpbmdDb25maWdQcm9wZXJ0eSJ9XX19")), "loggingConfig") unless @logging_config.nil? @maximum_batching_window_in_seconds = maximum_batching_window_in_seconds Jsii::Type.check_type(@maximum_batching_window_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumBatchingWindowInSeconds") unless @maximum_batching_window_in_seconds.nil? @maximum_record_age_in_seconds = maximum_record_age_in_seconds Jsii::Type.check_type(@maximum_record_age_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumRecordAgeInSeconds") unless @maximum_record_age_in_seconds.nil? @maximum_retry_attempts = maximum_retry_attempts Jsii::Type.check_type(@maximum_retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumRetryAttempts") unless @maximum_retry_attempts.nil? @metrics_config = metrics_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::MetricsConfigProperty.new(**metrics_config.transform_keys(&:to_sym)) : metrics_config Jsii::Type.check_type(@metrics_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLk1ldHJpY3NDb25maWdQcm9wZXJ0eSJ9XX19")), "metricsConfig") unless @metrics_config.nil? @parallelization_factor = parallelization_factor Jsii::Type.check_type(@parallelization_factor, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "parallelizationFactor") unless @parallelization_factor.nil? @provisioned_poller_config = provisioned_poller_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::ProvisionedPollerConfigProperty.new(**provisioned_poller_config.transform_keys(&:to_sym)) : provisioned_poller_config Jsii::Type.check_type(@provisioned_poller_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLlByb3Zpc2lvbmVkUG9sbGVyQ29uZmlnUHJvcGVydHkifV19fQ==")), "provisionedPollerConfig") unless @provisioned_poller_config.nil? @queues = queues Jsii::Type.check_type(@queues, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "queues") unless @queues.nil? @scaling_config = scaling_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::ScalingConfigProperty.new(**scaling_config.transform_keys(&:to_sym)) : scaling_config Jsii::Type.check_type(@scaling_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLlNjYWxpbmdDb25maWdQcm9wZXJ0eSJ9XX19")), "scalingConfig") unless @scaling_config.nil? @self_managed_event_source = self_managed_event_source.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::SelfManagedEventSourceProperty.new(**self_managed_event_source.transform_keys(&:to_sym)) : self_managed_event_source Jsii::Type.check_type(@self_managed_event_source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLlNlbGZNYW5hZ2VkRXZlbnRTb3VyY2VQcm9wZXJ0eSJ9XX19")), "selfManagedEventSource") unless @self_managed_event_source.nil? @self_managed_kafka_event_source_config = self_managed_kafka_event_source_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnEventSourceMapping::SelfManagedKafkaEventSourceConfigProperty.new(**self_managed_kafka_event_source_config.transform_keys(&:to_sym)) : self_managed_kafka_event_source_config Jsii::Type.check_type(@self_managed_kafka_event_source_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRXZlbnRTb3VyY2VNYXBwaW5nLlNlbGZNYW5hZ2VkS2Fma2FFdmVudFNvdXJjZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "selfManagedKafkaEventSourceConfig") unless @self_managed_kafka_event_source_config.nil? @source_access_configurations = source_access_configurations Jsii::Type.check_type(@source_access_configurations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNmbkV2ZW50U291cmNlTWFwcGluZy5Tb3VyY2VBY2Nlc3NDb25maWd1cmF0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "sourceAccessConfigurations") unless @source_access_configurations.nil? @starting_position = starting_position Jsii::Type.check_type(@starting_position, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startingPosition") unless @starting_position.nil? @starting_position_timestamp = Jsii::Type.check_type(@starting_position_timestamp, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "startingPositionTimestamp") unless @starting_position_timestamp.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @topics = topics Jsii::Type.check_type(@topics, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "topics") unless @topics.nil? @tumbling_window_in_seconds = tumbling_window_in_seconds Jsii::Type.check_type(@tumbling_window_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "tumblingWindowInSeconds") unless @tumbling_window_in_seconds.nil? end |
Instance Attribute Details
#amazon_managed_kafka_event_source_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.
113 114 115 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 113 def amazon_managed_kafka_event_source_config @amazon_managed_kafka_event_source_config end |
#batch_size ⇒ Numeric? (readonly)
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.
- DocumentDB – Default 100. Max 10,000.
128 129 130 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 128 def batch_size @batch_size end |
#bisect_batch_on_function_error ⇒ Boolean, ... (readonly)
(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.
The default value is false.
When using
BisectBatchOnFunctionError, check theBatchSizeparameter in theOnFailuredestination message's metadata. TheBatchSizecould be greater than 1 since Lambda consolidates failed messages metadata when writing to theOnFailuredestination.
137 138 139 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 137 def bisect_batch_on_function_error @bisect_batch_on_function_error end |
#destination_config ⇒ AWSCDK::IResolvable, ... (readonly)
(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it.
142 143 144 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 142 def destination_config @destination_config end |
#document_db_event_source_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specific configuration settings for a DocumentDB event source.
147 148 149 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 147 def document_db_event_source_config @document_db_event_source_config end |
#enabled ⇒ Boolean, ... (readonly)
When true, the event source mapping is active. When false, Lambda pauses polling and invocation.
Default: True
154 155 156 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 154 def enabled @enabled end |
#event_source_arn ⇒ String, ... (readonly)
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 or the ARN of the VPC connection (for cross-account event source mappings ).
- Amazon MQ – The ARN of the broker.
- Amazon DocumentDB – The ARN of the DocumentDB change stream.
166 167 168 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 166 def event_source_arn @event_source_arn end |
#filter_criteria ⇒ AWSCDK::IResolvable, ... (readonly)
An object that defines the filter criteria that determine whether Lambda should process an event.
For more information, see Lambda event filtering .
173 174 175 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 173 def filter_criteria @filter_criteria end |
#function_name ⇒ String, ... (readonly)
The name or ARN 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.
108 109 110 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 108 def function_name @function_name end |
#function_response_types ⇒ Array<String>? (readonly)
(Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping.
Valid Values: ReportBatchItemFailures
180 181 182 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 180 def function_response_types @function_response_types end |
#kms_key_arn ⇒ String? (readonly)
The ARN of the AWS Key Management Service ( AWS ) customer managed key that Lambda uses to encrypt your function's filter criteria .
185 186 187 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 185 def kms_key_arn @kms_key_arn end |
#logging_config ⇒ AWSCDK::IResolvable, ... (readonly)
The function's Amazon CloudWatch Logs configuration settings.
190 191 192 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 190 def logging_config @logging_config end |
#maximum_batching_window_in_seconds ⇒ Numeric? (readonly)
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.
201 202 203 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 201 def maximum_batching_window_in_seconds @maximum_batching_window_in_seconds end |
#maximum_record_age_in_seconds ⇒ Numeric? (readonly)
(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.
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
211 212 213 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 211 def maximum_record_age_in_seconds @maximum_record_age_in_seconds end |
#maximum_retry_attempts ⇒ Numeric? (readonly)
(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.
219 220 221 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 219 def maximum_retry_attempts @maximum_retry_attempts end |
#metrics_config ⇒ AWSCDK::IResolvable, ... (readonly)
The metrics configuration for your event source.
For more information, see Event source mapping metrics .
226 227 228 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 226 def metrics_config @metrics_config end |
#parallelization_factor ⇒ Numeric? (readonly)
(Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard.
The default value is 1.
233 234 235 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 233 def parallelization_factor @parallelization_factor end |
#provisioned_poller_config ⇒ AWSCDK::IResolvable, ... (readonly)
(Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source.
For more information, see provisioned mode .
240 241 242 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 240 def provisioned_poller_config @provisioned_poller_config end |
#queues ⇒ Array<String>? (readonly)
(Amazon MQ) The name of the Amazon MQ broker destination queue to consume.
245 246 247 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 245 def queues @queues end |
#scaling_config ⇒ AWSCDK::IResolvable, ... (readonly)
This property is for Amazon SQS event sources only.
You cannot use ProvisionedPollerConfig while using ScalingConfig . These options are mutually exclusive. To remove the scaling configuration, pass an empty value.
252 253 254 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 252 def scaling_config @scaling_config end |
#self_managed_event_source ⇒ AWSCDK::IResolvable, ... (readonly)
The self-managed Apache Kafka cluster for your event source.
257 258 259 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 257 def self_managed_event_source @self_managed_event_source end |
#self_managed_kafka_event_source_config ⇒ AWSCDK::IResolvable, ... (readonly)
Specific configuration settings for a self-managed Apache Kafka event source.
262 263 264 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 262 def self_managed_kafka_event_source_config @self_managed_kafka_event_source_config end |
#source_access_configurations ⇒ AWSCDK::IResolvable, ... (readonly)
An array of the authentication protocol, VPC components, or virtual host to secure and define your event source.
267 268 269 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 267 def source_access_configurations @source_access_configurations end |
#starting_position ⇒ String? (readonly)
The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB.
- LATEST - Read only new records.
- TRIM_HORIZON - Process all available records.
- AT_TIMESTAMP - Specify a time from which to start reading records.
276 277 278 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 276 def starting_position @starting_position end |
#starting_position_timestamp ⇒ Numeric? (readonly)
With StartingPosition set to AT_TIMESTAMP , the time from which to start reading, in Unix time seconds.
StartingPositionTimestamp cannot be in the future.
283 284 285 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 283 def @starting_position_timestamp end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A list of tags to add to the event source mapping.
You must have the
lambda:TagResource,lambda:UntagResource, andlambda:ListTagspermissions for your IAM principal to manage the CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.
290 291 292 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 290 def @tags end |
#topics ⇒ Array<String>? (readonly)
The name of the Kafka topic.
295 296 297 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 295 def topics @topics end |
#tumbling_window_in_seconds ⇒ Numeric? (readonly)
(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.
302 303 304 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 302 def tumbling_window_in_seconds @tumbling_window_in_seconds end |
Class Method Details
.jsii_properties ⇒ Object
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 304 def self.jsii_properties { :function_name => "functionName", :amazon_managed_kafka_event_source_config => "amazonManagedKafkaEventSourceConfig", :batch_size => "batchSize", :bisect_batch_on_function_error => "bisectBatchOnFunctionError", :destination_config => "destinationConfig", :document_db_event_source_config => "documentDbEventSourceConfig", :enabled => "enabled", :event_source_arn => "eventSourceArn", :filter_criteria => "filterCriteria", :function_response_types => "functionResponseTypes", :kms_key_arn => "kmsKeyArn", :logging_config => "loggingConfig", :maximum_batching_window_in_seconds => "maximumBatchingWindowInSeconds", :maximum_record_age_in_seconds => "maximumRecordAgeInSeconds", :maximum_retry_attempts => "maximumRetryAttempts", :metrics_config => "metricsConfig", :parallelization_factor => "parallelizationFactor", :provisioned_poller_config => "provisionedPollerConfig", :queues => "queues", :scaling_config => "scalingConfig", :self_managed_event_source => "selfManagedEventSource", :self_managed_kafka_event_source_config => "selfManagedKafkaEventSourceConfig", :source_access_configurations => "sourceAccessConfigurations", :starting_position => "startingPosition", :starting_position_timestamp => "startingPositionTimestamp", :tags => "tags", :topics => "topics", :tumbling_window_in_seconds => "tumblingWindowInSeconds", } end |
Instance Method Details
#to_jsii ⇒ Object
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lambda/cfn_event_source_mapping_props.rb', line 337 def to_jsii result = {} result.merge!({ "functionName" => @function_name, "amazonManagedKafkaEventSourceConfig" => @amazon_managed_kafka_event_source_config, "batchSize" => @batch_size, "bisectBatchOnFunctionError" => @bisect_batch_on_function_error, "destinationConfig" => @destination_config, "documentDbEventSourceConfig" => @document_db_event_source_config, "enabled" => @enabled, "eventSourceArn" => @event_source_arn, "filterCriteria" => @filter_criteria, "functionResponseTypes" => @function_response_types, "kmsKeyArn" => @kms_key_arn, "loggingConfig" => @logging_config, "maximumBatchingWindowInSeconds" => @maximum_batching_window_in_seconds, "maximumRecordAgeInSeconds" => @maximum_record_age_in_seconds, "maximumRetryAttempts" => @maximum_retry_attempts, "metricsConfig" => @metrics_config, "parallelizationFactor" => @parallelization_factor, "provisionedPollerConfig" => @provisioned_poller_config, "queues" => @queues, "scalingConfig" => @scaling_config, "selfManagedEventSource" => @self_managed_event_source, "selfManagedKafkaEventSourceConfig" => @self_managed_kafka_event_source_config, "sourceAccessConfigurations" => @source_access_configurations, "startingPosition" => @starting_position, "startingPositionTimestamp" => @starting_position_timestamp, "tags" => @tags, "topics" => @topics, "tumblingWindowInSeconds" => @tumbling_window_in_seconds, }) result.compact end |