Class: AWSCDK::SchedulerTargets::UniversalTargetProps
- Inherits:
-
ScheduleTargetBaseProps
- Object
- ScheduleTargetBaseProps
- AWSCDK::SchedulerTargets::UniversalTargetProps
- Defined in:
- scheduler_targets/universal_target_props.rb
Overview
Properties for a Universal Target.
Instance Attribute Summary collapse
-
#action ⇒ String
readonly
The API action to call.
-
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue?
readonly
The SQS queue to be used as deadLetterQueue.
-
#input ⇒ AWSCDK::Scheduler::ScheduleTargetInput?
readonly
Input passed to the target.
-
#max_event_age ⇒ AWSCDK::Duration?
readonly
The maximum age of a request that Scheduler sends to a target for processing.
-
#policy_statements ⇒ Array<AWSCDK::IAM::PolicyStatement>?
readonly
The IAM policy statements needed to invoke the target.
-
#retry_attempts ⇒ Numeric?
readonly
The maximum number of times to retry when the target returns an error.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.
-
#service ⇒ String
readonly
The AWS service to call.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dead_letter_queue: nil, input: nil, max_event_age: nil, retry_attempts: nil, role: nil, action:, service:, policy_statements: nil) ⇒ UniversalTargetProps
constructor
A new instance of UniversalTargetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dead_letter_queue: nil, input: nil, max_event_age: nil, retry_attempts: nil, role: nil, action:, service:, policy_statements: nil) ⇒ UniversalTargetProps
Returns a new instance of UniversalTargetProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'scheduler_targets/universal_target_props.rb', line 15 def initialize(dead_letter_queue: nil, input: nil, max_event_age: nil, retry_attempts: nil, role: nil, action:, service:, policy_statements: 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? @input = input Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLlNjaGVkdWxlVGFyZ2V0SW5wdXQifQ==")), "input") unless @input.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? @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") @service = service Jsii::Type.check_type(@service, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "service") @policy_statements = policy_statements Jsii::Type.check_type(@policy_statements, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pYW0uUG9saWN5U3RhdGVtZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "policyStatements") unless @policy_statements.nil? end |
Instance Attribute Details
#action ⇒ String (readonly)
The API action to call. Must be camelCase.
You cannot use read-only API actions such as common GET operations.
79 80 81 |
# File 'scheduler_targets/universal_target_props.rb', line 79 def action @action end |
#dead_letter_queue ⇒ AWSCDK::SQS::IQueue? (readonly)
Default: - no dead-letter queue
The SQS queue to be used as deadLetterQueue.
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 'scheduler_targets/universal_target_props.rb', line 42 def dead_letter_queue @dead_letter_queue end |
#input ⇒ AWSCDK::Scheduler::ScheduleTargetInput? (readonly)
Default: - no input.
Input passed to the target.
47 48 49 |
# File 'scheduler_targets/universal_target_props.rb', line 47 def input @input end |
#max_event_age ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(24)
The maximum age of a request that Scheduler sends to a target for processing.
Minimum value of 60. Maximum value of 86400.
55 56 57 |
# File 'scheduler_targets/universal_target_props.rb', line 55 def max_event_age @max_event_age end |
#policy_statements ⇒ Array<AWSCDK::IAM::PolicyStatement>? (readonly)
Default: - Policy with service:action action only.
The IAM policy statements needed to invoke the target. These statements are attached to the Scheduler's role.
Note that the default may not be the correct actions as not all AWS services follows the same IAM action pattern, or there may be more actions needed to invoke the target.
92 93 94 |
# File 'scheduler_targets/universal_target_props.rb', line 92 def policy_statements @policy_statements end |
#retry_attempts ⇒ Numeric? (readonly)
Default: 185
The maximum number of times to retry when the target returns an error.
Minimum value of 0. Maximum value of 185.
63 64 65 |
# File 'scheduler_targets/universal_target_props.rb', line 63 def retry_attempts @retry_attempts end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: - created by target
An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf.
If none provided templates target will automatically create an IAM role with all the minimum necessary permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets will grant minimal required permissions.
72 73 74 |
# File 'scheduler_targets/universal_target_props.rb', line 72 def role @role end |
#service ⇒ String (readonly)
The AWS service to call.
This must be in lowercase.
85 86 87 |
# File 'scheduler_targets/universal_target_props.rb', line 85 def service @service end |
Class Method Details
.jsii_properties ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'scheduler_targets/universal_target_props.rb', line 94 def self.jsii_properties { :dead_letter_queue => "deadLetterQueue", :input => "input", :max_event_age => "maxEventAge", :retry_attempts => "retryAttempts", :role => "role", :action => "action", :service => "service", :policy_statements => "policyStatements", } end |
Instance Method Details
#to_jsii ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'scheduler_targets/universal_target_props.rb', line 107 def to_jsii result = {} result.merge!(super) result.merge!({ "deadLetterQueue" => @dead_letter_queue, "input" => @input, "maxEventAge" => @max_event_age, "retryAttempts" => @retry_attempts, "role" => @role, "action" => @action, "service" => @service, "policyStatements" => @policy_statements, }) result.compact end |