Class: AWSCDK::ECS::LinuxParametersProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::LinuxParametersProps
- Defined in:
- ecs/linux_parameters_props.rb
Overview
The properties for defining Linux-specific options that are applied to the container.
Instance Attribute Summary collapse
-
#init_process_enabled ⇒ Boolean?
readonly
Specifies whether to run an init process inside the container that forwards signals and reaps processes.
-
#max_swap ⇒ AWSCDK::Size?
readonly
The total amount of swap memory a container can use.
-
#shared_memory_size ⇒ Numeric?
readonly
The value for the size of the /dev/shm volume.
-
#swappiness ⇒ Numeric?
readonly
This allows you to tune a container's memory swappiness behavior.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(init_process_enabled: nil, max_swap: nil, shared_memory_size: nil, swappiness: nil) ⇒ LinuxParametersProps
constructor
A new instance of LinuxParametersProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(init_process_enabled: nil, max_swap: nil, shared_memory_size: nil, swappiness: nil) ⇒ LinuxParametersProps
Returns a new instance of LinuxParametersProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'ecs/linux_parameters_props.rb', line 11 def initialize(init_process_enabled: nil, max_swap: nil, shared_memory_size: nil, swappiness: nil) @init_process_enabled = init_process_enabled Jsii::Type.check_type(@init_process_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "initProcessEnabled") unless @init_process_enabled.nil? @max_swap = max_swap Jsii::Type.check_type(@max_swap, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "maxSwap") unless @max_swap.nil? @shared_memory_size = shared_memory_size Jsii::Type.check_type(@shared_memory_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sharedMemorySize") unless @shared_memory_size.nil? @swappiness = swappiness Jsii::Type.check_type(@swappiness, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "swappiness") unless @swappiness.nil? end |
Instance Attribute Details
#init_process_enabled ⇒ Boolean? (readonly)
Default: false
Specifies whether to run an init process inside the container that forwards signals and reaps processes.
26 27 28 |
# File 'ecs/linux_parameters_props.rb', line 26 def init_process_enabled @init_process_enabled end |
#max_swap ⇒ AWSCDK::Size? (readonly)
Default: No swap.
The total amount of swap memory a container can use.
This parameter will be translated to the --memory-swap option to docker run.
This parameter is only supported when you are using the EC2 launch type. Accepted values are positive integers.
37 38 39 |
# File 'ecs/linux_parameters_props.rb', line 37 def max_swap @max_swap end |
#shared_memory_size ⇒ Numeric? (readonly)
Default: No shared memory.
The value for the size of the /dev/shm volume.
42 43 44 |
# File 'ecs/linux_parameters_props.rb', line 42 def shared_memory_size @shared_memory_size end |
#swappiness ⇒ Numeric? (readonly)
Default: 60
This allows you to tune a container's memory swappiness behavior.
This parameter maps to the --memory-swappiness option to docker run. The swappiness relates to the kernel's tendency to swap memory. A value of 0 will cause swapping to not happen unless absolutely necessary. A value of 100 will cause pages to be swapped very aggressively.
This parameter is only supported when you are using the EC2 launch type. Accepted values are whole numbers between 0 and 100. If a value is not specified for maxSwap then this parameter is ignored.
57 58 59 |
# File 'ecs/linux_parameters_props.rb', line 57 def swappiness @swappiness end |
Class Method Details
.jsii_properties ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'ecs/linux_parameters_props.rb', line 59 def self.jsii_properties { :init_process_enabled => "initProcessEnabled", :max_swap => "maxSwap", :shared_memory_size => "sharedMemorySize", :swappiness => "swappiness", } end |
Instance Method Details
#to_jsii ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'ecs/linux_parameters_props.rb', line 68 def to_jsii result = {} result.merge!({ "initProcessEnabled" => @init_process_enabled, "maxSwap" => @max_swap, "sharedMemorySize" => @shared_memory_size, "swappiness" => @swappiness, }) result.compact end |