Class: AWSCDK::Batch::Ulimit
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::Ulimit
- Defined in:
- batch/ulimit.rb
Overview
Sets limits for a resource with ulimit on linux systems.
Used by the Docker daemon.
Instance Attribute Summary collapse
-
#hard_limit ⇒ Numeric
readonly
The hard limit for this resource.
-
#name ⇒ AWSCDK::Batch::UlimitName
readonly
The resource to limit.
-
#soft_limit ⇒ Numeric
readonly
The reservation for this resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hard_limit:, name:, soft_limit:) ⇒ Ulimit
constructor
A new instance of Ulimit.
- #to_jsii ⇒ Object
Constructor Details
#initialize(hard_limit:, name:, soft_limit:) ⇒ Ulimit
Returns a new instance of Ulimit.
12 13 14 15 16 17 18 19 |
# File 'batch/ulimit.rb', line 12 def initialize(hard_limit:, name:, soft_limit:) @hard_limit = hard_limit Jsii::Type.check_type(@hard_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "hardLimit") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guVWxpbWl0TmFtZSJ9")), "name") @soft_limit = soft_limit Jsii::Type.check_type(@soft_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "softLimit") end |
Instance Attribute Details
#hard_limit ⇒ Numeric (readonly)
The hard limit for this resource.
The container will be terminated if it exceeds this limit.
27 28 29 |
# File 'batch/ulimit.rb', line 27 def hard_limit @hard_limit end |
#name ⇒ AWSCDK::Batch::UlimitName (readonly)
The resource to limit.
31 32 33 |
# File 'batch/ulimit.rb', line 31 def name @name end |
#soft_limit ⇒ Numeric (readonly)
The reservation for this resource.
The container will not be terminated if it exceeds this limit.
38 39 40 |
# File 'batch/ulimit.rb', line 38 def soft_limit @soft_limit end |
Class Method Details
.jsii_properties ⇒ Object
40 41 42 43 44 45 46 |
# File 'batch/ulimit.rb', line 40 def self.jsii_properties { :hard_limit => "hardLimit", :name => "name", :soft_limit => "softLimit", } end |
Instance Method Details
#to_jsii ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'batch/ulimit.rb', line 48 def to_jsii result = {} result.merge!({ "hardLimit" => @hard_limit, "name" => @name, "softLimit" => @soft_limit, }) result.compact end |