# DiskProperty

Struct · External

`Disk` is a property of the [Hardware](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.html) property. It describes a disk attached to an instance.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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:

```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:

```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();
```

C#:

```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:

```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

- `attachedTo`: string — The resources to which the disk is attached.

- `attachmentState`: 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.

- `diskName`: string (required) — The unique name of the disk.

- `iops`: number — The input/output operations per second (IOPS) of the disk.

- `isSystemDisk`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

- `path`: string (required) — The disk path.

- `sizeInGb`: string — The size of the disk in GB.
