Class: AWSCDK::Greengrassv2::CfnDeployment::SystemResourceLimitsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrassv2::CfnDeployment::SystemResourceLimitsProperty
- Defined in:
- greengrassv2/cfn_deployment.rb
Overview
Contains information about system resource limits that the software applies to a component's processes.
Instance Attribute Summary collapse
-
#cpus ⇒ Numeric?
readonly
The maximum amount of CPU time that a component's processes can use on the core device.
-
#memory ⇒ Numeric?
readonly
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cpus: nil, memory: nil) ⇒ SystemResourceLimitsProperty
constructor
A new instance of SystemResourceLimitsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cpus: nil, memory: nil) ⇒ SystemResourceLimitsProperty
Returns a new instance of SystemResourceLimitsProperty.
1250 1251 1252 1253 1254 1255 |
# File 'greengrassv2/cfn_deployment.rb', line 1250 def initialize(cpus: nil, memory: nil) @cpus = cpus Jsii::Type.check_type(@cpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cpus") unless @cpus.nil? @memory = memory Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memory") unless @memory.nil? end |
Instance Attribute Details
#cpus ⇒ Numeric? (readonly)
The maximum amount of CPU time that a component's processes can use on the core device.
A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the AWS IoT Greengrass Core software doesn't limit the component's CPU usage.
1263 1264 1265 |
# File 'greengrassv2/cfn_deployment.rb', line 1263 def cpus @cpus end |
#memory ⇒ Numeric? (readonly)
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
For more information, see Configure system resource limits for components .
1270 1271 1272 |
# File 'greengrassv2/cfn_deployment.rb', line 1270 def memory @memory end |
Class Method Details
.jsii_properties ⇒ Object
1272 1273 1274 1275 1276 1277 |
# File 'greengrassv2/cfn_deployment.rb', line 1272 def self.jsii_properties { :cpus => "cpus", :memory => "memory", } end |
Instance Method Details
#to_jsii ⇒ Object
1279 1280 1281 1282 1283 1284 1285 1286 |
# File 'greengrassv2/cfn_deployment.rb', line 1279 def to_jsii result = {} result.merge!({ "cpus" => @cpus, "memory" => @memory, }) result.compact end |