Class: AWSCDK::SchedulerTargets::ECSRunTask
- Inherits:
-
ScheduleTargetBase
- Object
- ScheduleTargetBase
- AWSCDK::SchedulerTargets::ECSRunTask
- Includes:
- AWSCDK::Scheduler::IScheduleTarget
- Defined in:
- scheduler_targets/ecs_run_task.rb
Overview
Schedule an ECS Task using AWS EventBridge Scheduler.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #add_target_action_to_role(role) ⇒ void
-
#bind(schedule) ⇒ AWSCDK::Scheduler::ScheduleTargetConfig
Create a return a Schedule Target Configuration for the given schedule.
- #bind_base_target_config(_schedule) ⇒ AWSCDK::Scheduler::ScheduleTargetConfig
- #cluster ⇒ AWSCDK::ECS::ICluster
-
#initialize(cluster, props) ⇒ ECSRunTask
constructor
A new instance of ECSRunTask.
- #props ⇒ AWSCDK::SchedulerTargets::ECSRunTaskBaseProps
- #target_arn ⇒ String
Constructor Details
#initialize(cluster, props) ⇒ ECSRunTask
Returns a new instance of ECSRunTask.
11 12 13 14 15 16 |
# File 'scheduler_targets/ecs_run_task.rb', line 11 def initialize(cluster, props) props = props.is_a?(Hash) ? ::AWSCDK::SchedulerTargets::ECSRunTaskBaseProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(cluster, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLklDbHVzdGVyIn0=")), "cluster") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyX3RhcmdldHMuRWNzUnVuVGFza0Jhc2VQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(cluster, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'scheduler_targets/ecs_run_task.rb', line 18 def self.jsii_overridable_methods { :target_arn => { kind: :property, name: "targetArn", is_optional: false }, :cluster => { kind: :property, name: "cluster", is_optional: false }, :props => { kind: :property, name: "props", is_optional: false }, :add_target_action_to_role => { kind: :method, name: "addTargetActionToRole", is_optional: false }, :bind => { kind: :method, name: "bind", is_optional: false }, :bind_base_target_config => { kind: :method, name: "bindBaseTargetConfig", is_optional: false }, } end |
Instance Method Details
#add_target_action_to_role(role) ⇒ void
This method returns an undefined value.
46 47 48 49 |
# File 'scheduler_targets/ecs_run_task.rb', line 46 def add_target_action_to_role(role) Jsii::Type.check_type(role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") jsii_call_method("addTargetActionToRole", [role]) end |
#bind(schedule) ⇒ AWSCDK::Scheduler::ScheduleTargetConfig
Create a return a Schedule Target Configuration for the given schedule.
55 56 57 58 |
# File 'scheduler_targets/ecs_run_task.rb', line 55 def bind(schedule) Jsii::Type.check_type(schedule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLklTY2hlZHVsZSJ9")), "schedule") jsii_call_method("bind", [schedule]) end |
#bind_base_target_config(_schedule) ⇒ AWSCDK::Scheduler::ScheduleTargetConfig
62 63 64 65 |
# File 'scheduler_targets/ecs_run_task.rb', line 62 def bind_base_target_config(_schedule) Jsii::Type.check_type(_schedule, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLklTY2hlZHVsZSJ9")), "_schedule") jsii_call_method("bindBaseTargetConfig", [_schedule]) end |
#cluster ⇒ AWSCDK::ECS::ICluster
35 36 37 |
# File 'scheduler_targets/ecs_run_task.rb', line 35 def cluster() jsii_get_property("cluster") end |
#props ⇒ AWSCDK::SchedulerTargets::ECSRunTaskBaseProps
40 41 42 |
# File 'scheduler_targets/ecs_run_task.rb', line 40 def props() jsii_get_property("props") end |
#target_arn ⇒ String
30 31 32 |
# File 'scheduler_targets/ecs_run_task.rb', line 30 def target_arn() jsii_get_property("targetArn") end |