Class: AWSCDK::ECS::CfnTaskDefinition::SystemControlProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/cfn_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 AWS Fargate 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.



3216
3217
3218
3219
3220
3221
# File 'ecs/cfn_task_definition.rb', line 3216

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.



3227
3228
3229
# File 'ecs/cfn_task_definition.rb', line 3227

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.



3238
3239
3240
# File 'ecs/cfn_task_definition.rb', line 3238

def value
  @value
end

Class Method Details

.jsii_propertiesObject



3240
3241
3242
3243
3244
3245
# File 'ecs/cfn_task_definition.rb', line 3240

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

Instance Method Details

#to_jsiiObject



3247
3248
3249
3250
3251
3252
3253
3254
# File 'ecs/cfn_task_definition.rb', line 3247

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