Class: AWSCDK::EventsTargets::KinesisStreamProps
- Inherits:
-
TargetBaseProps
- Object
- TargetBaseProps
- AWSCDK::EventsTargets::KinesisStreamProps
- Defined in:
- events_targets/kinesis_stream_props.rb
Overview
Customize the Kinesis Stream Event Target.
Instance Attribute Summary collapse
-
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue?
readonly
The SQS queue to be used as deadLetterQueue.
-
#max_event_age ⇒ AWSCDK::Duration?
readonly
The maximum age of a request that Lambda sends to a function for processing.
-
#message ⇒ AWSCDK::Events::RuleTargetInput?
readonly
The message to send to the stream.
-
#partition_key_path ⇒ String?
readonly
Partition Key Path for records sent to this stream.
-
#retry_attempts ⇒ Numeric?
readonly
The maximum number of times to retry when the function returns an error.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, message: nil, partition_key_path: nil) ⇒ KinesisStreamProps
constructor
A new instance of KinesisStreamProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, message: nil, partition_key_path: nil) ⇒ KinesisStreamProps
Returns a new instance of KinesisStreamProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'events_targets/kinesis_stream_props.rb', line 12 def initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, message: nil, partition_key_path: nil) @dead_letter_queue = dead_letter_queue Jsii::Type.check_type(@dead_letter_queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "deadLetterQueue") unless @dead_letter_queue.nil? @max_event_age = max_event_age Jsii::Type.check_type(@max_event_age, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxEventAge") unless @max_event_age.nil? @retry_attempts = retry_attempts Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") unless @retry_attempts.nil? @message = Jsii::Type.check_type(@message, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLlJ1bGVUYXJnZXRJbnB1dCJ9")), "message") unless @message.nil? @partition_key_path = partition_key_path Jsii::Type.check_type(@partition_key_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "partitionKeyPath") unless @partition_key_path.nil? end |
Instance Attribute Details
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue? (readonly)
Default: - no dead-letter queue
The SQS queue to be used as deadLetterQueue. Check out the considerations for using a dead-letter queue.
The events not successfully delivered are automatically retried for a specified period of time, depending on the retry policy of the target. If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue.
33 34 35 |
# File 'events_targets/kinesis_stream_props.rb', line 33 def dead_letter_queue @dead_letter_queue end |
#max_event_age ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(24)
The maximum age of a request that Lambda sends to a function for processing.
Minimum value of 60. Maximum value of 86400.
41 42 43 |
# File 'events_targets/kinesis_stream_props.rb', line 41 def max_event_age @max_event_age end |
#message ⇒ AWSCDK::Events::RuleTargetInput? (readonly)
Default: - the entire CloudWatch event
The message to send to the stream.
Must be a valid JSON text passed to the target stream.
56 57 58 |
# File 'events_targets/kinesis_stream_props.rb', line 56 def @message end |
#partition_key_path ⇒ String? (readonly)
Default: - eventId as the partition key
Partition Key Path for records sent to this stream.
61 62 63 |
# File 'events_targets/kinesis_stream_props.rb', line 61 def partition_key_path @partition_key_path end |
#retry_attempts ⇒ Numeric? (readonly)
Default: 185
The maximum number of times to retry when the function returns an error.
Minimum value of 0. Maximum value of 185.
49 50 51 |
# File 'events_targets/kinesis_stream_props.rb', line 49 def retry_attempts @retry_attempts end |
Class Method Details
.jsii_properties ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'events_targets/kinesis_stream_props.rb', line 63 def self.jsii_properties { :dead_letter_queue => "deadLetterQueue", :max_event_age => "maxEventAge", :retry_attempts => "retryAttempts", :message => "message", :partition_key_path => "partitionKeyPath", } end |
Instance Method Details
#to_jsii ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'events_targets/kinesis_stream_props.rb', line 73 def to_jsii result = {} result.merge!(super) result.merge!({ "deadLetterQueue" => @dead_letter_queue, "maxEventAge" => @max_event_age, "retryAttempts" => @retry_attempts, "message" => @message, "partitionKeyPath" => @partition_key_path, }) result.compact end |