Interface CfnInstance.HardwareProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnInstance.HardwareProperty.Jsii$Proxy
Enclosing class:
CfnInstance

@Stability(Stable) public static interface CfnInstance.HardwareProperty extends software.amazon.jsii.JsiiSerializable
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.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lightsail.*;
 HardwareProperty hardwareProperty = HardwareProperty.builder()
         .cpuCount(123)
         .disks(List.of(DiskProperty.builder()
                 .diskName("diskName")
                 .path("path")
                 // the properties below are optional
                 .attachedTo("attachedTo")
                 .attachmentState("attachmentState")
                 .iops(123)
                 .isSystemDisk(false)
                 .sizeInGb("sizeInGb")
                 .build()))
         .ramSizeInGb(123)
         .build();
 
  • Method Details

    • getCpuCount

      @Stability(Stable) @Nullable default Number getCpuCount()
      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.

    • getDisks

      @Stability(Stable) @Nullable default Object getDisks()
      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.

    • getRamSizeInGb

      @Stability(Stable) @Nullable default Number getRamSizeInGb()
      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.

    • builder

      @Stability(Stable) static CfnInstance.HardwareProperty.Builder builder()
      Returns:
      a CfnInstance.HardwareProperty.Builder of CfnInstance.HardwareProperty