Class: AWSCDK::ECS::CfnDaemonTaskDefinitionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_daemon_task_definition_props.rb

Overview

Properties for defining a CfnDaemonTaskDefinition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_definitions: nil, cpu: nil, execution_role_arn: nil, family: nil, ipc_mode: nil, memory: nil, pid_mode: nil, tags: nil, task_role_arn: nil, volumes: nil) ⇒ CfnDaemonTaskDefinitionProps

Returns a new instance of CfnDaemonTaskDefinitionProps.

Parameters:

  • container_definitions (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ECS::CfnDaemonTaskDefinition::DaemonContainerDefinitionProperty>, nil) (defaults to: nil)

    A list of container definitions in JSON format that describe the containers that make up the daemon task.

  • cpu (String, nil) (defaults to: nil)

    The number of CPU units used by the daemon task.

  • execution_role_arn (String, nil) (defaults to: nil)

    The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.

  • family (String, nil) (defaults to: nil)

    The name of a family that this daemon task definition is registered to.

  • ipc_mode (String, nil) (defaults to: nil)

    The IPC namespace mode for the daemon.

  • memory (String, nil) (defaults to: nil)

    The amount of memory (in MiB) used by the daemon task.

  • pid_mode (String, nil) (defaults to: nil)

    The PID namespace mode for the daemon.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)
  • task_role_arn (String, nil) (defaults to: nil)

    The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.

  • volumes (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ECS::CfnDaemonTaskDefinition::VolumeProperty>, nil) (defaults to: nil)

    The list of data volume definitions for the daemon task.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'ecs/cfn_daemon_task_definition_props.rb', line 19

def initialize(container_definitions: nil, cpu: nil, execution_role_arn: nil, family: nil, ipc_mode: nil, memory: nil, pid_mode: nil, tags: nil, task_role_arn: nil, volumes: nil)
  @container_definitions = container_definitions
  Jsii::Type.check_type(@container_definitions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmbkRhZW1vblRhc2tEZWZpbml0aW9uLkRhZW1vbkNvbnRhaW5lckRlZmluaXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "containerDefinitions") unless @container_definitions.nil?
  @cpu = cpu
  Jsii::Type.check_type(@cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cpu") unless @cpu.nil?
  @execution_role_arn = execution_role_arn
  Jsii::Type.check_type(@execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionRoleArn") unless @execution_role_arn.nil?
  @family = family
  Jsii::Type.check_type(@family, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "family") unless @family.nil?
  @ipc_mode = ipc_mode
  Jsii::Type.check_type(@ipc_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ipcMode") unless @ipc_mode.nil?
  @memory = memory
  Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "memory") unless @memory.nil?
  @pid_mode = pid_mode
  Jsii::Type.check_type(@pid_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pidMode") unless @pid_mode.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @task_role_arn = task_role_arn
  Jsii::Type.check_type(@task_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "taskRoleArn") unless @task_role_arn.nil?
  @volumes = volumes
  Jsii::Type.check_type(@volumes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmbkRhZW1vblRhc2tEZWZpbml0aW9uLlZvbHVtZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "volumes") unless @volumes.nil?
end

Instance Attribute Details

#container_definitionsAWSCDK::IResolvable, ... (readonly)

A list of container definitions in JSON format that describe the containers that make up the daemon task.



46
47
48
# File 'ecs/cfn_daemon_task_definition_props.rb', line 46

def container_definitions
  @container_definitions
end

#cpuString? (readonly)

The number of CPU units used by the daemon task.



51
52
53
# File 'ecs/cfn_daemon_task_definition_props.rb', line 51

def cpu
  @cpu
end

#execution_role_arnString? (readonly)

The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.



56
57
58
# File 'ecs/cfn_daemon_task_definition_props.rb', line 56

def execution_role_arn
  @execution_role_arn
end

#familyString? (readonly)

The name of a family that this daemon task definition is registered to.



61
62
63
# File 'ecs/cfn_daemon_task_definition_props.rb', line 61

def family
  @family
end

#ipc_modeString? (readonly)

The IPC namespace mode for the daemon.

The valid values are none and shared. The default is none. If none is specified or no value is provided, the daemon runs with its own IPC namespace, isolated from other tasks. If shared is specified, the daemon joins the host IPC namespace, making it accessible to non-daemon tasks that use ipcMode: "host" or other daemons that use ipcMode: "shared".



69
70
71
# File 'ecs/cfn_daemon_task_definition_props.rb', line 69

def ipc_mode
  @ipc_mode
end

#memoryString? (readonly)

The amount of memory (in MiB) used by the daemon task.



74
75
76
# File 'ecs/cfn_daemon_task_definition_props.rb', line 74

def memory
  @memory
end

#pid_modeString? (readonly)

The PID namespace mode for the daemon.

The valid values are none and shared. The default is none. If none is specified or no value is provided, the daemon runs with its own PID namespace, isolated from other tasks. If shared is specified, the daemon joins the host PID namespace, making it accessible to non-daemon tasks that use pidMode: "host" or other daemons that use pidMode: "shared".



82
83
84
# File 'ecs/cfn_daemon_task_definition_props.rb', line 82

def pid_mode
  @pid_mode
end

#tagsArray<AWSCDK::CfnTag>? (readonly)



85
86
87
# File 'ecs/cfn_daemon_task_definition_props.rb', line 85

def tags
  @tags
end

#task_role_arnString? (readonly)

The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.



90
91
92
# File 'ecs/cfn_daemon_task_definition_props.rb', line 90

def task_role_arn
  @task_role_arn
end

#volumesAWSCDK::IResolvable, ... (readonly)

The list of data volume definitions for the daemon task.



95
96
97
# File 'ecs/cfn_daemon_task_definition_props.rb', line 95

def volumes
  @volumes
end

Class Method Details

.jsii_propertiesObject



97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'ecs/cfn_daemon_task_definition_props.rb', line 97

def self.jsii_properties
  {
    :container_definitions => "containerDefinitions",
    :cpu => "cpu",
    :execution_role_arn => "executionRoleArn",
    :family => "family",
    :ipc_mode => "ipcMode",
    :memory => "memory",
    :pid_mode => "pidMode",
    :tags => "tags",
    :task_role_arn => "taskRoleArn",
    :volumes => "volumes",
  }
end

Instance Method Details

#to_jsiiObject



112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'ecs/cfn_daemon_task_definition_props.rb', line 112

def to_jsii
  result = {}
  result.merge!({
    "containerDefinitions" => @container_definitions,
    "cpu" => @cpu,
    "executionRoleArn" => @execution_role_arn,
    "family" => @family,
    "ipcMode" => @ipc_mode,
    "memory" => @memory,
    "pidMode" => @pid_mode,
    "tags" => @tags,
    "taskRoleArn" => @task_role_arn,
    "volumes" => @volumes,
  })
  result.compact
end