Class: AWSCDK::EventsTargets::APIDestinationProps
- Inherits:
-
TargetBaseProps
- Object
- TargetBaseProps
- AWSCDK::EventsTargets::APIDestinationProps
- Defined in:
- events_targets/api_destination_props.rb
Overview
Customize the EventBridge Api Destinations Target.
Instance Attribute Summary collapse
-
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue?
readonly
The SQS queue to be used as deadLetterQueue.
-
#event ⇒ AWSCDK::Events::RuleTargetInput?
readonly
The event to send.
-
#event_role ⇒ AWSCDK::IAM::IRole?
readonly
The role to assume before invoking the target.
-
#header_parameters ⇒ Hash{String => String}?
readonly
Additional headers sent to the API Destination.
-
#max_event_age ⇒ AWSCDK::Duration?
readonly
The maximum age of a request that Lambda sends to a function for processing.
-
#path_parameter_values ⇒ Array<String>?
readonly
Path parameters to insert in place of path wildcards (
*). -
#query_string_parameters ⇒ Hash{String => String}?
readonly
Additional query string parameters sent to the API Destination.
-
#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, event: nil, event_role: nil, header_parameters: nil, path_parameter_values: nil, query_string_parameters: nil) ⇒ APIDestinationProps
constructor
A new instance of APIDestinationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, event: nil, event_role: nil, header_parameters: nil, path_parameter_values: nil, query_string_parameters: nil) ⇒ APIDestinationProps
Returns a new instance of APIDestinationProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'events_targets/api_destination_props.rb', line 15 def initialize(dead_letter_queue: nil, max_event_age: nil, retry_attempts: nil, event: nil, event_role: nil, header_parameters: nil, path_parameter_values: nil, query_string_parameters: 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? @event = event Jsii::Type.check_type(@event, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLlJ1bGVUYXJnZXRJbnB1dCJ9")), "event") unless @event.nil? @event_role = event_role Jsii::Type.check_type(@event_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "eventRole") unless @event_role.nil? @header_parameters = header_parameters Jsii::Type.check_type(@header_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "headerParameters") unless @header_parameters.nil? @path_parameter_values = path_parameter_values Jsii::Type.check_type(@path_parameter_values, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "pathParameterValues") unless @path_parameter_values.nil? @query_string_parameters = query_string_parameters Jsii::Type.check_type(@query_string_parameters, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "queryStringParameters") unless @query_string_parameters.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.
42 43 44 |
# File 'events_targets/api_destination_props.rb', line 42 def dead_letter_queue @dead_letter_queue end |
#event ⇒ AWSCDK::Events::RuleTargetInput? (readonly)
Default: - the entire EventBridge event
The event to send.
63 64 65 |
# File 'events_targets/api_destination_props.rb', line 63 def event @event end |
#event_role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - a new role will be created
The role to assume before invoking the target.
68 69 70 |
# File 'events_targets/api_destination_props.rb', line 68 def event_role @event_role end |
#header_parameters ⇒ Hash{String => String}? (readonly)
Default: - none
Additional headers sent to the API Destination.
These are merged with headers specified on the Connection, with the headers on the Connection taking precedence.
You can only specify secret values on the Connection.
78 79 80 |
# File 'events_targets/api_destination_props.rb', line 78 def header_parameters @header_parameters 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.
50 51 52 |
# File 'events_targets/api_destination_props.rb', line 50 def max_event_age @max_event_age end |
#path_parameter_values ⇒ Array<String>? (readonly)
Default: - none
Path parameters to insert in place of path wildcards (*).
If the API destination has a wilcard in the path, these path parts will be inserted in that place.
86 87 88 |
# File 'events_targets/api_destination_props.rb', line 86 def path_parameter_values @path_parameter_values end |
#query_string_parameters ⇒ Hash{String => String}? (readonly)
Default: - none
Additional query string parameters sent to the API Destination.
These are merged with headers specified on the Connection, with the headers on the Connection taking precedence.
You can only specify secret values on the Connection.
96 97 98 |
# File 'events_targets/api_destination_props.rb', line 96 def query_string_parameters @query_string_parameters 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.
58 59 60 |
# File 'events_targets/api_destination_props.rb', line 58 def retry_attempts @retry_attempts end |
Class Method Details
.jsii_properties ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'events_targets/api_destination_props.rb', line 98 def self.jsii_properties { :dead_letter_queue => "deadLetterQueue", :max_event_age => "maxEventAge", :retry_attempts => "retryAttempts", :event => "event", :event_role => "eventRole", :header_parameters => "headerParameters", :path_parameter_values => "pathParameterValues", :query_string_parameters => "queryStringParameters", } end |
Instance Method Details
#to_jsii ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'events_targets/api_destination_props.rb', line 111 def to_jsii result = {} result.merge!(super) result.merge!({ "deadLetterQueue" => @dead_letter_queue, "maxEventAge" => @max_event_age, "retryAttempts" => @retry_attempts, "event" => @event, "eventRole" => @event_role, "headerParameters" => @header_parameters, "pathParameterValues" => @path_parameter_values, "queryStringParameters" => @query_string_parameters, }) result.compact end |