Class CfnInstance.HardwareProperty.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnInstance.HardwareProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstance.HardwareProperty>
- Enclosing interface:
CfnInstance.HardwareProperty
@Stability(Stable)
public static final class CfnInstance.HardwareProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstance.HardwareProperty>
A builder for
CfnInstance.HardwareProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnInstance.HardwareProperty.getCpuCount()
Sets the value ofCfnInstance.HardwareProperty.getDisks()
disks
(IResolvable disks) Sets the value ofCfnInstance.HardwareProperty.getDisks()
ramSizeInGb
(Number ramSizeInGb) Sets the value ofCfnInstance.HardwareProperty.getRamSizeInGb()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cpuCount
Sets the value ofCfnInstance.HardwareProperty.getCpuCount()
- Parameters:
cpuCount
- The number of vCPUs the instance has.The
CpuCount
property is read-only and should not be specified in a create instance or update instance request.- Returns:
this
-
disks
Sets the value ofCfnInstance.HardwareProperty.getDisks()
- Parameters:
disks
- 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.- Returns:
this
-
disks
Sets the value ofCfnInstance.HardwareProperty.getDisks()
- Parameters:
disks
- 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.- Returns:
this
-
ramSizeInGb
Sets the value ofCfnInstance.HardwareProperty.getRamSizeInGb()
- Parameters:
ramSizeInGb
- The amount of RAM in GB on the instance (for example,1.0
).The
RamSizeInGb
property is read-only and should not be specified in a create instance or update instance request.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstance.HardwareProperty>
- Returns:
- a new instance of
CfnInstance.HardwareProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-