Class: AWSCDK::ECS::CfnDaemonTaskDefinition::SystemControlProperty

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

Overview

A list of namespaced kernel parameters to set in the container.

This parameter maps to Sysctls in the docker container create command and the --sysctl option to docker run. For example, you can configure net.ipv4.tcp_keepalive_time setting to maintain longer lived connections. We don't recommend that you specify network-related system_controls parameters for multiple containers in a single task that also uses either the awsvpc or host network mode. Doing this has the following disadvantages:

  • For tasks that use the awsvpc network mode including Fargate, if you set system_controls for any container, it applies to all containers in the task. If you set different system_controls for multiple containers in a single task, the container that's started last determines which system_controls take effect.
  • For tasks that use the host network mode, the network namespace system_controls aren't supported.

If you're setting an IPC resource namespace to use for the containers in the task, the following conditions apply to your system controls. For more information, see IPC mode.

  • For tasks that use the host IPC mode, IPC namespace system_controls aren't supported.
  • For tasks that use the task IPC mode, IPC namespace system_controls values apply to all containers within a task.

This parameter is not supported for Windows containers. This parameter is only supported for tasks that are hosted on FARGATElong if the tasks are using platform version 1.4.0 or later (Linux). This isn't supported for Windows containers on Fargate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace: nil, value: nil) ⇒ SystemControlProperty

Returns a new instance of SystemControlProperty.

Parameters:

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

    The namespaced kernel parameter to set a value for.

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

    The namespaced kernel parameter to set a value for.



1912
1913
1914
1915
1916
1917
# File 'ecs/cfn_daemon_task_definition.rb', line 1912

def initialize(namespace: nil, value: nil)
  @namespace = namespace
  Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") unless @namespace.nil?
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") unless @value.nil?
end

Instance Attribute Details

#namespaceString? (readonly)

The namespaced kernel parameter to set a value for.



1923
1924
1925
# File 'ecs/cfn_daemon_task_definition.rb', line 1923

def namespace
  @namespace
end

#valueString? (readonly)

The namespaced kernel parameter to set a value for.

Valid IPC namespace values: "kernel.msgmax" | "kernel.msgmnb" | "kernel.msgmni" | "kernel.sem" | "kernel.shmall" | "kernel.shmmax" | "kernel.shmmni" | "kernel.shm_rmid_forced", and Sysctls that start with "fs.mqueue.*" Valid network namespace values: Sysctls that start with "net.*". Only namespaced Sysctls that exist within the container starting with "net.* are accepted. All of these values are supported by Fargate.



1932
1933
1934
# File 'ecs/cfn_daemon_task_definition.rb', line 1932

def value
  @value
end

Class Method Details

.jsii_propertiesObject



1934
1935
1936
1937
1938
1939
# File 'ecs/cfn_daemon_task_definition.rb', line 1934

def self.jsii_properties
  {
    :namespace => "namespace",
    :value => "value",
  }
end

Instance Method Details

#to_jsiiObject



1941
1942
1943
1944
1945
1946
1947
1948
# File 'ecs/cfn_daemon_task_definition.rb', line 1941

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