Class: AWSCDK::SchedulerTargets::ECSRunFargateTask
- Inherits:
-
ECSRunTask
- Object
- ECSRunTask
- AWSCDK::SchedulerTargets::ECSRunFargateTask
- Defined in:
- scheduler_targets/ecs_run_fargate_task.rb
Overview
Schedule an ECS Task on Fargate using AWS EventBridge Scheduler.
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) ⇒ ECSRunFargateTask
constructor
A new instance of ECSRunFargateTask.
- #props ⇒ AWSCDK::SchedulerTargets::ECSRunTaskBaseProps
- #target_arn ⇒ String
Constructor Details
#initialize(cluster, props) ⇒ ECSRunFargateTask
Returns a new instance of ECSRunFargateTask.
10 11 12 13 14 15 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 10 def initialize(cluster, props) props = props.is_a?(Hash) ? ::AWSCDK::SchedulerTargets::FargateTaskProps.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("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyX3RhcmdldHMuRmFyZ2F0ZVRhc2tQcm9wcyJ9")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(cluster, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 17 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.
45 46 47 48 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 45 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.
54 55 56 57 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 54 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
61 62 63 64 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 61 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
34 35 36 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 34 def cluster() jsii_get_property("cluster") end |
#props ⇒ AWSCDK::SchedulerTargets::ECSRunTaskBaseProps
39 40 41 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 39 def props() jsii_get_property("props") end |
#target_arn ⇒ String
29 30 31 |
# File 'scheduler_targets/ecs_run_fargate_task.rb', line 29 def target_arn() jsii_get_property("targetArn") end |