Class: AWSCDK::Pipes::CfnPipe::PipeSourceDynamoDBStreamParametersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipes::CfnPipe::PipeSourceDynamoDBStreamParametersProperty
- Defined in:
- pipes/cfn_pipe.rb
Overview
The parameters for using a DynamoDB stream as a source.
Instance Attribute Summary collapse
-
#batch_size ⇒ Numeric?
readonly
The maximum number of records to include in each batch.
-
#dead_letter_config ⇒ AWSCDK::IResolvable, ...
readonly
Define the target queue to send dead-letter queue events to.
-
#maximum_batching_window_in_seconds ⇒ Numeric?
readonly
The maximum length of a time to wait for events.
-
#maximum_record_age_in_seconds ⇒ Numeric?
readonly
Discard records older than the specified age.
-
#maximum_retry_attempts ⇒ Numeric?
readonly
Discard records after the specified number of retries.
-
#on_partial_batch_item_failure ⇒ String?
readonly
Define how to handle item process failures.
-
#parallelization_factor ⇒ Numeric?
readonly
The number of batches to process concurrently from each shard.
-
#starting_position ⇒ String
readonly
(Streams only) The position in a stream from which to start reading.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(starting_position:, batch_size: nil, dead_letter_config: nil, maximum_batching_window_in_seconds: nil, maximum_record_age_in_seconds: nil, maximum_retry_attempts: nil, on_partial_batch_item_failure: nil, parallelization_factor: nil) ⇒ PipeSourceDynamoDBStreamParametersProperty
constructor
A new instance of PipeSourceDynamoDBStreamParametersProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(starting_position:, batch_size: nil, dead_letter_config: nil, maximum_batching_window_in_seconds: nil, maximum_record_age_in_seconds: nil, maximum_retry_attempts: nil, on_partial_batch_item_failure: nil, parallelization_factor: nil) ⇒ PipeSourceDynamoDBStreamParametersProperty
Returns a new instance of PipeSourceDynamoDBStreamParametersProperty.
2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 |
# File 'pipes/cfn_pipe.rb', line 2314 def initialize(starting_position:, batch_size: nil, dead_letter_config: nil, maximum_batching_window_in_seconds: nil, maximum_record_age_in_seconds: nil, maximum_retry_attempts: nil, on_partial_batch_item_failure: nil, parallelization_factor: nil) @starting_position = starting_position Jsii::Type.check_type(@starting_position, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "startingPosition") @batch_size = batch_size Jsii::Type.check_type(@batch_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "batchSize") unless @batch_size.nil? @dead_letter_config = dead_letter_config.is_a?(Hash) ? ::AWSCDK::Pipes::CfnPipe::DeadLetterConfigProperty.new(**dead_letter_config.transform_keys(&:to_sym)) : dead_letter_config Jsii::Type.check_type(@dead_letter_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLkRlYWRMZXR0ZXJDb25maWdQcm9wZXJ0eSJ9XX19")), "deadLetterConfig") unless @dead_letter_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? @on_partial_batch_item_failure = on_partial_batch_item_failure Jsii::Type.check_type(@on_partial_batch_item_failure, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "onPartialBatchItemFailure") unless @on_partial_batch_item_failure.nil? @parallelization_factor = parallelization_factor Jsii::Type.check_type(@parallelization_factor, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "parallelizationFactor") unless @parallelization_factor.nil? end |
Instance Attribute Details
#batch_size ⇒ Numeric? (readonly)
The maximum number of records to include in each batch.
2344 2345 2346 |
# File 'pipes/cfn_pipe.rb', line 2344 def batch_size @batch_size end |
#dead_letter_config ⇒ AWSCDK::IResolvable, ... (readonly)
Define the target queue to send dead-letter queue events to.
2349 2350 2351 |
# File 'pipes/cfn_pipe.rb', line 2349 def dead_letter_config @dead_letter_config end |
#maximum_batching_window_in_seconds ⇒ Numeric? (readonly)
The maximum length of a time to wait for events.
2354 2355 2356 |
# File 'pipes/cfn_pipe.rb', line 2354 def maximum_batching_window_in_seconds @maximum_batching_window_in_seconds end |
#maximum_record_age_in_seconds ⇒ Numeric? (readonly)
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, EventBridge never discards old records.
2361 2362 2363 |
# File 'pipes/cfn_pipe.rb', line 2361 def maximum_record_age_in_seconds @maximum_record_age_in_seconds end |
#maximum_retry_attempts ⇒ Numeric? (readonly)
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, EventBridge retries failed records until the record expires in the event source.
2368 2369 2370 |
# File 'pipes/cfn_pipe.rb', line 2368 def maximum_retry_attempts @maximum_retry_attempts end |
#on_partial_batch_item_failure ⇒ String? (readonly)
Define how to handle item process failures.
AUTOMATIC_BISECT halves each batch and retry each half until all the records are processed or there is one failed message left in the batch.
2375 2376 2377 |
# File 'pipes/cfn_pipe.rb', line 2375 def on_partial_batch_item_failure @on_partial_batch_item_failure end |
#parallelization_factor ⇒ Numeric? (readonly)
The number of batches to process concurrently from each shard.
The default value is 1.
2382 2383 2384 |
# File 'pipes/cfn_pipe.rb', line 2382 def parallelization_factor @parallelization_factor end |
#starting_position ⇒ String (readonly)
(Streams only) The position in a stream from which to start reading.
Valid values : TRIM_HORIZON | LATEST
2339 2340 2341 |
# File 'pipes/cfn_pipe.rb', line 2339 def starting_position @starting_position end |
Class Method Details
.jsii_properties ⇒ Object
2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 |
# File 'pipes/cfn_pipe.rb', line 2384 def self.jsii_properties { :starting_position => "startingPosition", :batch_size => "batchSize", :dead_letter_config => "deadLetterConfig", :maximum_batching_window_in_seconds => "maximumBatchingWindowInSeconds", :maximum_record_age_in_seconds => "maximumRecordAgeInSeconds", :maximum_retry_attempts => "maximumRetryAttempts", :on_partial_batch_item_failure => "onPartialBatchItemFailure", :parallelization_factor => "parallelizationFactor", } end |
Instance Method Details
#to_jsii ⇒ Object
2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 |
# File 'pipes/cfn_pipe.rb', line 2397 def to_jsii result = {} result.merge!({ "startingPosition" => @starting_position, "batchSize" => @batch_size, "deadLetterConfig" => @dead_letter_config, "maximumBatchingWindowInSeconds" => @maximum_batching_window_in_seconds, "maximumRecordAgeInSeconds" => @maximum_record_age_in_seconds, "maximumRetryAttempts" => @maximum_retry_attempts, "onPartialBatchItemFailure" => @on_partial_batch_item_failure, "parallelizationFactor" => @parallelization_factor, }) result.compact end |