Class: AWSCDK::ECS::CfnDaemonTaskDefinition::LinuxParametersProperty

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

Overview

The Linux-specific options that are applied to the container, such as Linux KernelCapabilities.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(capabilities: nil, devices: nil, init_process_enabled: nil, tmpfs: nil) ⇒ LinuxParametersProperty

Returns a new instance of LinuxParametersProperty.

Parameters:



1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
# File 'ecs/cfn_daemon_task_definition.rb', line 1545

def initialize(capabilities: nil, devices: nil, init_process_enabled: nil, tmpfs: nil)
  @capabilities = capabilities.is_a?(Hash) ? ::AWSCDK::ECS::CfnDaemonTaskDefinition::KernelCapabilitiesProperty.new(**capabilities.transform_keys(&:to_sym)) : capabilities
  Jsii::Type.check_type(@capabilities, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuRGFlbW9uVGFza0RlZmluaXRpb24uS2VybmVsQ2FwYWJpbGl0aWVzUHJvcGVydHkifV19fQ==")), "capabilities") unless @capabilities.nil?
  @devices = devices
  Jsii::Type.check_type(@devices, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmbkRhZW1vblRhc2tEZWZpbml0aW9uLkRldmljZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "devices") unless @devices.nil?
  @init_process_enabled = init_process_enabled
  Jsii::Type.check_type(@init_process_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "initProcessEnabled") unless @init_process_enabled.nil?
  @tmpfs = tmpfs
  Jsii::Type.check_type(@tmpfs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNzLkNmbkRhZW1vblRhc2tEZWZpbml0aW9uLlRtcGZzUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "tmpfs") unless @tmpfs.nil?
end

Instance Attribute Details

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

The Linux capabilities to add or remove from the default Docker configuration for a container defined in the task definition.

For more detailed information about these Linux capabilities, see the capabilities(7) Linux manual page. The following describes how Docker processes the Linux capabilities specified in the add and drop request parameters. For information about the latest behavior, see Docker Compose: order of cap_drop and cap_add in the Docker Community Forum.

  • When the container is a privleged container, the container capabilities are all of the default Docker capabilities. The capabilities specified in the add request parameter, and the drop request parameter are ignored.
  • When the add request parameter is set to ALL, the container capabilities are all of the default Docker capabilities, excluding those specified in the drop request parameter.
  • When the drop request parameter is set to ALL, the container capabilities are the capabilities specified in the add request parameter.
  • When the add request parameter and the drop request parameter are both empty, the capabilities the container capabilities are all of the default Docker capabilities.
  • The default is to first drop the capabilities specified in the drop request parameter, and then add the capabilities specified in the add request parameter.


1569
1570
1571
# File 'ecs/cfn_daemon_task_definition.rb', line 1569

def capabilities
  @capabilities
end

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

Any host devices to expose to the container.

This parameter maps to Devices in the docker container create command and the --device option to docker run. If you're using tasks that use the Fargate launch type, the devices parameter isn't supported.



1577
1578
1579
# File 'ecs/cfn_daemon_task_definition.rb', line 1577

def devices
  @devices
end

#init_process_enabledBoolean, ... (readonly)

Run an init process inside the container that forwards signals and reaps processes.

This parameter maps to the --init option to docker run. This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: sudo docker version --format '{{.Server.APIVersion}}'



1584
1585
1586
# File 'ecs/cfn_daemon_task_definition.rb', line 1584

def init_process_enabled
  @init_process_enabled
end

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

The container path, mount options, and size (in MiB) of the tmpfs mount.

This parameter maps to the --tmpfs option to docker run.



1591
1592
1593
# File 'ecs/cfn_daemon_task_definition.rb', line 1591

def tmpfs
  @tmpfs
end

Class Method Details

.jsii_propertiesObject



1593
1594
1595
1596
1597
1598
1599
1600
# File 'ecs/cfn_daemon_task_definition.rb', line 1593

def self.jsii_properties
  {
    :capabilities => "capabilities",
    :devices => "devices",
    :init_process_enabled => "initProcessEnabled",
    :tmpfs => "tmpfs",
  }
end

Instance Method Details

#to_jsiiObject



1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
# File 'ecs/cfn_daemon_task_definition.rb', line 1602

def to_jsii
  result = {}
  result.merge!({
    "capabilities" => @capabilities,
    "devices" => @devices,
    "initProcessEnabled" => @init_process_enabled,
    "tmpfs" => @tmpfs,
  })
  result.compact
end