Class: AWSCDK::EC2::CfnInstance::CpuOptionsProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EC2::CfnInstance::CpuOptionsProperty
- Defined in:
- ec2/cfn_instance.rb
Overview
Specifies the CPU options for the instance.
When you specify CPU options, you must specify both the number of CPU cores and threads per core.
Modifying the CPU options for an instance results in instance replacement .
For more information, see Optimize CPU options in the Amazon Elastic Compute Cloud User Guide .
Instance Attribute Summary collapse
-
#core_count ⇒ Numeric?
readonly
The number of CPU cores for the instance.
-
#threads_per_core ⇒ Numeric?
readonly
The number of threads per CPU core.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(core_count: nil, threads_per_core: nil) ⇒ CpuOptionsProperty
constructor
A new instance of CpuOptionsProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(core_count: nil, threads_per_core: nil) ⇒ CpuOptionsProperty
Returns a new instance of CpuOptionsProperty.
1264 1265 1266 1267 1268 1269 |
# File 'ec2/cfn_instance.rb', line 1264 def initialize(core_count: nil, threads_per_core: nil) @core_count = core_count Jsii::Type.check_type(@core_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "coreCount") unless @core_count.nil? @threads_per_core = threads_per_core Jsii::Type.check_type(@threads_per_core, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "threadsPerCore") unless @threads_per_core.nil? end |
Instance Attribute Details
#core_count ⇒ Numeric? (readonly)
The number of CPU cores for the instance.
1275 1276 1277 |
# File 'ec2/cfn_instance.rb', line 1275 def core_count @core_count end |
#threads_per_core ⇒ Numeric? (readonly)
The number of threads per CPU core.
1280 1281 1282 |
# File 'ec2/cfn_instance.rb', line 1280 def threads_per_core @threads_per_core end |
Class Method Details
.jsii_properties ⇒ Object
1282 1283 1284 1285 1286 1287 |
# File 'ec2/cfn_instance.rb', line 1282 def self.jsii_properties { :core_count => "coreCount", :threads_per_core => "threadsPerCore", } end |
Instance Method Details
#to_jsii ⇒ Object
1289 1290 1291 1292 1293 1294 1295 1296 |
# File 'ec2/cfn_instance.rb', line 1289 def to_jsii result = {} result.merge!({ "coreCount" => @core_count, "threadsPerCore" => @threads_per_core, }) result.compact end |