Class: AWSCDK::Lightsail::CfnInstance::HardwareProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnInstance::HardwareProperty
- Defined in:
- lightsail/cfn_instance.rb
Overview
Hardware is a property of the AWS::Lightsail::Instance resource. It describes the hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.
Instance Attribute Summary collapse
-
#cpu_count ⇒ Numeric?
readonly
The number of vCPUs the instance has.
-
#disks ⇒ AWSCDK::IResolvable, ...
readonly
The disks attached to the instance.
-
#ram_size_in_gb ⇒ Numeric?
readonly
The amount of RAM in GB on the instance (for example,
1.0).
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cpu_count: nil, disks: nil, ram_size_in_gb: nil) ⇒ HardwareProperty
constructor
A new instance of HardwareProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cpu_count: nil, disks: nil, ram_size_in_gb: nil) ⇒ HardwareProperty
Returns a new instance of HardwareProperty.
979 980 981 982 983 984 985 986 |
# File 'lightsail/cfn_instance.rb', line 979 def initialize(cpu_count: nil, disks: nil, ram_size_in_gb: nil) @cpu_count = cpu_count Jsii::Type.check_type(@cpu_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "cpuCount") unless @cpu_count.nil? @disks = disks Jsii::Type.check_type(@disks, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGlnaHRzYWlsLkNmbkluc3RhbmNlLkRpc2tQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "disks") unless @disks.nil? @ram_size_in_gb = ram_size_in_gb Jsii::Type.check_type(@ram_size_in_gb, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "ramSizeInGb") unless @ram_size_in_gb.nil? end |
Instance Attribute Details
#cpu_count ⇒ Numeric? (readonly)
The number of vCPUs the instance has.
The
CpuCountproperty is read-only and should not be specified in a create instance or update instance request.
994 995 996 |
# File 'lightsail/cfn_instance.rb', line 994 def cpu_count @cpu_count end |
#disks ⇒ AWSCDK::IResolvable, ... (readonly)
The disks attached to the instance.
The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn't attached to it.
1001 1002 1003 |
# File 'lightsail/cfn_instance.rb', line 1001 def disks @disks end |
#ram_size_in_gb ⇒ Numeric? (readonly)
The amount of RAM in GB on the instance (for example, 1.0 ).
The
RamSizeInGbproperty is read-only and should not be specified in a create instance or update instance request.
1008 1009 1010 |
# File 'lightsail/cfn_instance.rb', line 1008 def ram_size_in_gb @ram_size_in_gb end |
Class Method Details
.jsii_properties ⇒ Object
1010 1011 1012 1013 1014 1015 1016 |
# File 'lightsail/cfn_instance.rb', line 1010 def self.jsii_properties { :cpu_count => "cpuCount", :disks => "disks", :ram_size_in_gb => "ramSizeInGb", } end |
Instance Method Details
#to_jsii ⇒ Object
1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lightsail/cfn_instance.rb', line 1018 def to_jsii result = {} result.merge!({ "cpuCount" => @cpu_count, "disks" => @disks, "ramSizeInGb" => @ram_size_in_gb, }) result.compact end |