Skip to content
v2.278.0

DiskProperty Struct ​

Disk is a property of the Hardware property. It describes a disk attached to an instance.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lightsail as lightsail } from 'aws-cdk-lib';
const diskProperty: lightsail.CfnInstance.DiskProperty = {
  diskName: 'diskName',
  path: 'path',

  // the properties below are optional
  attachedTo: 'attachedTo',
  attachmentState: 'attachmentState',
  iops: 123,
  isSystemDisk: false,
  sizeInGb: 'sizeInGb',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lightsail as lightsail

disk_property = lightsail.CfnInstance.DiskProperty(
    disk_name="diskName",
    path="path",

    # the properties below are optional
    attached_to="attachedTo",
    attachment_state="attachmentState",
    iops=123,
    is_system_disk=False,
    size_in_gb="sizeInGb"
)
java
// 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.*;

DiskProperty diskProperty = DiskProperty.builder()
        .diskName("diskName")
        .path("path")

        // the properties below are optional
        .attachedTo("attachedTo")
        .attachmentState("attachmentState")
        .iops(123)
        .isSystemDisk(false)
        .sizeInGb("sizeInGb")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lightsail;

var diskProperty = new DiskProperty {
    DiskName = "diskName",
    Path = "path",

    // the properties below are optional
    AttachedTo = "attachedTo",
    AttachmentState = "attachmentState",
    Iops = 123,
    IsSystemDisk = false,
    SizeInGb = "sizeInGb"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

diskProperty := &DiskProperty{
	DiskName: jsii.String("diskName"),
	Path: jsii.String("path"),

	// the properties below are optional
	AttachedTo: jsii.String("attachedTo"),
	AttachmentState: jsii.String("attachmentState"),
	Iops: jsii.Number(123),
	IsSystemDisk: jsii.Boolean(false),
	SizeInGb: jsii.String("sizeInGb"),
}

Properties ​

attachedTooptionalstringattached_tooptionalstrattachedTooptionalStringAttachedTooptionalstringAttachedTooptional*string #
The resources to which the disk is attached.
attachmentStateoptionalstringattachment_stateoptionalstrattachmentStateoptionalStringAttachmentStateoptionalstringAttachmentStateoptional*string #
(Deprecated) The attachment state of the disk.

In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.

diskNamestringdisk_namestrdiskNameStringDiskNamestringDiskName*string required #
The unique name of the disk.
iopsoptionalnumberiopsoptionalint | floatiopsoptionalNumberIopsoptionaldoubleIopsoptional*float64 #
The input/output operations per second (IOPS) of the disk.
isSystemDiskoptionalboolean | IResolvableis_system_diskoptionaltyping.Union[bool, IResolvable]isSystemDiskoptionalBooleanIsSystemDiskoptionalboolIsSystemDiskoptionalinterface{} #
A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).
pathstringpathstrpathStringPathstringPath*string required #
The disk path.
sizeInGboptionalstringsize_in_gboptionalstrsizeInGboptionalStringSizeInGboptionalstringSizeInGboptional*string #
The size of the disk in GB.