Class: AWSCDK::LambdaEventSources::SQSEventSourceProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::LambdaEventSources::SQSEventSourceProps
- Defined in:
- lambda_event_sources/sqs_event_source_props.rb
Instance Attribute Summary collapse
-
#batch_size ⇒ Numeric?
readonly
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
-
#enabled ⇒ Boolean?
readonly
If the SQS event source mapping should be enabled.
-
#filter_encryption ⇒ AWSCDK::KMS::IKey?
readonly
Add Customer managed KMS key to encrypt Filter Criteria.
-
#filters ⇒ Array<Hash{String => Object}>?
readonly
Add filter criteria option.
-
#max_batching_window ⇒ AWSCDK::Duration?
readonly
The maximum amount of time to gather records before invoking the function.
-
#max_concurrency ⇒ Numeric?
readonly
The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke.
-
#metrics_config ⇒ AWSCDK::Lambda::MetricsConfig?
readonly
Configuration for enhanced monitoring metrics collection When specified, enables collection of additional metrics for the stream event source.
-
#provisioned_poller_config ⇒ AWSCDK::Lambda::ProvisionedPollerConfig?
readonly
Configuration for provisioned pollers that read from the event source.
-
#report_batch_item_failures ⇒ Boolean?
readonly
Allow functions to return partially successful responses for a batch of records.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(batch_size: nil, enabled: nil, filter_encryption: nil, filters: nil, max_batching_window: nil, max_concurrency: nil, metrics_config: nil, provisioned_poller_config: nil, report_batch_item_failures: nil) ⇒ SQSEventSourceProps
constructor
A new instance of SQSEventSourceProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(batch_size: nil, enabled: nil, filter_encryption: nil, filters: nil, max_batching_window: nil, max_concurrency: nil, metrics_config: nil, provisioned_poller_config: nil, report_batch_item_failures: nil) ⇒ SQSEventSourceProps
Returns a new instance of SQSEventSourceProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 15 def initialize(batch_size: nil, enabled: nil, filter_encryption: nil, filters: nil, max_batching_window: nil, max_concurrency: nil, metrics_config: nil, provisioned_poller_config: nil, report_batch_item_failures: nil) @batch_size = batch_size Jsii::Type.check_type(@batch_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "batchSize") unless @batch_size.nil? @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil? @filter_encryption = filter_encryption Jsii::Type.check_type(@filter_encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "filterEncryption") unless @filter_encryption.nil? @filters = filters Jsii::Type.check_type(@filters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoiYW55In0sImtpbmQiOiJtYXAifX0sImtpbmQiOiJhcnJheSJ9fQ==")), "filters") unless @filters.nil? @max_batching_window = max_batching_window Jsii::Type.check_type(@max_batching_window, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxBatchingWindow") unless @max_batching_window.nil? @max_concurrency = max_concurrency Jsii::Type.check_type(@max_concurrency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxConcurrency") unless @max_concurrency.nil? @metrics_config = metrics_config.is_a?(Hash) ? ::AWSCDK::Lambda::MetricsConfig.new(**metrics_config.transform_keys(&:to_sym)) : metrics_config Jsii::Type.check_type(@metrics_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLk1ldHJpY3NDb25maWcifQ==")), "metricsConfig") unless @metrics_config.nil? @provisioned_poller_config = provisioned_poller_config.is_a?(Hash) ? ::AWSCDK::Lambda::ProvisionedPollerConfig.new(**provisioned_poller_config.transform_keys(&:to_sym)) : provisioned_poller_config Jsii::Type.check_type(@provisioned_poller_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlByb3Zpc2lvbmVkUG9sbGVyQ29uZmlnIn0=")), "provisionedPollerConfig") unless @provisioned_poller_config.nil? @report_batch_item_failures = report_batch_item_failures Jsii::Type.check_type(@report_batch_item_failures, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "reportBatchItemFailures") unless @report_batch_item_failures.nil? end |
Instance Attribute Details
#batch_size ⇒ Numeric? (readonly)
Default: 10
The largest number of records that AWS Lambda will retrieve from your event source at the time of invoking your function.
Your function receives an event with all the retrieved records.
Valid Range: Minimum value of 1. Maximum value of 10.
If max_batching_window is configured, this value can go up to 10,000.
46 47 48 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 46 def batch_size @batch_size end |
#enabled ⇒ Boolean? (readonly)
Default: true
If the SQS event source mapping should be enabled.
51 52 53 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 51 def enabled @enabled end |
#filter_encryption ⇒ AWSCDK::KMS::IKey? (readonly)
Default: - none
Add Customer managed KMS key to encrypt Filter Criteria.
57 58 59 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 57 def filter_encryption @filter_encryption end |
#filters ⇒ Array<Hash{String => Object}>? (readonly)
Default: - None
Add filter criteria option.
62 63 64 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 62 def filters @filters end |
#max_batching_window ⇒ AWSCDK::Duration? (readonly)
Default: - no batching window. The lambda function will be invoked immediately with the records that are available.
The maximum amount of time to gather records before invoking the function.
Valid Range: Minimum value of 0 minutes. Maximum value of 5 minutes.
69 70 71 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 69 def max_batching_window @max_batching_window end |
#max_concurrency ⇒ Numeric? (readonly)
Default: - No specific limit.
The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke.
75 76 77 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 75 def max_concurrency @max_concurrency end |
#metrics_config ⇒ AWSCDK::Lambda::MetricsConfig? (readonly)
Default: - Enhanced monitoring is disabled
Configuration for enhanced monitoring metrics collection When specified, enables collection of additional metrics for the stream event source.
80 81 82 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 80 def metrics_config @metrics_config end |
#provisioned_poller_config ⇒ AWSCDK::Lambda::ProvisionedPollerConfig? (readonly)
Default: - no provisioned pollers
Configuration for provisioned pollers that read from the event source.
When specified, allows control over the minimum and maximum number of pollers that can be provisioned to process events from the queue.
89 90 91 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 89 def provisioned_poller_config @provisioned_poller_config end |
#report_batch_item_failures ⇒ Boolean? (readonly)
Default: false
Allow functions to return partially successful responses for a batch of records.
95 96 97 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 95 def report_batch_item_failures @report_batch_item_failures end |
Class Method Details
.jsii_properties ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 97 def self.jsii_properties { :batch_size => "batchSize", :enabled => "enabled", :filter_encryption => "filterEncryption", :filters => "filters", :max_batching_window => "maxBatchingWindow", :max_concurrency => "maxConcurrency", :metrics_config => "metricsConfig", :provisioned_poller_config => "provisionedPollerConfig", :report_batch_item_failures => "reportBatchItemFailures", } end |
Instance Method Details
#to_jsii ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lambda_event_sources/sqs_event_source_props.rb', line 111 def to_jsii result = {} result.merge!({ "batchSize" => @batch_size, "enabled" => @enabled, "filterEncryption" => @filter_encryption, "filters" => @filters, "maxBatchingWindow" => @max_batching_window, "maxConcurrency" => @max_concurrency, "metricsConfig" => @metrics_config, "provisionedPollerConfig" => @provisioned_poller_config, "reportBatchItemFailures" => @report_batch_item_failures, }) result.compact end |