Class: AWSCDK::ECSPatterns::ScheduledEC2TaskDefinitionOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs_patterns/scheduled_ec2_task_definition_options.rb

Overview

The properties for the ScheduledEc2Task using a task definition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_definition:) ⇒ ScheduledEC2TaskDefinitionOptions

Returns a new instance of ScheduledEC2TaskDefinitionOptions.

Parameters:

  • task_definition (AWSCDK::ECS::EC2TaskDefinition)

    The task definition to use for tasks in the service. One of image or taskDefinition must be specified.



8
9
10
11
# File 'ecs_patterns/scheduled_ec2_task_definition_options.rb', line 8

def initialize(task_definition:)
  @task_definition = task_definition
  Jsii::Type.check_type(@task_definition, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkVjMlRhc2tEZWZpbml0aW9uIn0=")), "taskDefinition")
end

Instance Attribute Details

#task_definitionAWSCDK::ECS::EC2TaskDefinition (readonly)

Note:

Default: - none

The task definition to use for tasks in the service. One of image or taskDefinition must be specified.

[disable-awslint:ref-via-interface]



19
20
21
# File 'ecs_patterns/scheduled_ec2_task_definition_options.rb', line 19

def task_definition
  @task_definition
end

Class Method Details

.jsii_propertiesObject



21
22
23
24
25
# File 'ecs_patterns/scheduled_ec2_task_definition_options.rb', line 21

def self.jsii_properties
  {
    :task_definition => "taskDefinition",
  }
end

Instance Method Details

#to_jsiiObject



27
28
29
30
31
32
33
# File 'ecs_patterns/scheduled_ec2_task_definition_options.rb', line 27

def to_jsii
  result = {}
  result.merge!({
    "taskDefinition" => @task_definition,
  })
  result.compact
end