AWS::Lightsail::Disk - AWS CloudFormation

AWS::Lightsail::Disk

The AWS::Lightsail::Disk resource specifies a disk that can be attached to an Amazon Lightsail instance that is in the same AWS Region and Availability Zone.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Lightsail::Disk", "Properties" : { "AddOns" : [ AddOn, ... ], "AvailabilityZone" : String, "DiskName" : String, "SizeInGb" : Integer, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Lightsail::Disk Properties: AddOns: - AddOn AvailabilityZone: String DiskName: String SizeInGb: Integer Tags: - Tag

Properties

AddOns

An array of add-ons for the disk.

Note

If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.

Required: No

Type: List of AddOn

Update requires: No interruption

AvailabilityZone

The AWS Region and Availability Zone location for the disk (for example, us-east-1a).

Required: No

Type: String

Update requires: Updates are not supported.

DiskName

The name of the disk.

Required: Yes

Type: String

Pattern: \w[\w\-]*\w

Update requires: Replacement

SizeInGb

The size of the disk in GB.

Required: Yes

Type: Integer

Update requires: Updates are not supported.

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide.

Note

The Value of Tags is optional for Lightsail resources.

Required: No

Type: List of Tag

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns a unique identifier for this resource.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

AttachedTo

The instance to which the disk is attached.

AttachmentState

(Deprecated) The attachment state of the disk.

Note

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.

DiskArn

The Amazon Resource Name (ARN) of the disk.

Iops

The input/output operations per second (IOPS) of the disk.

IsAttached

A Boolean value indicating whether the disk is attached to an instance.

Path

The path of the disk.

ResourceType

The resource type of the disk (for example, Disk).

State

The state of the disk (for example, in-use).

SupportCode

The support code of the disk.

Include this code in your email to support when you have questions about a disk or another resource in Lightsail. This code helps our support team to look up your Lightsail information.

Remarks

Availability Zone

You can specify an Availability Zone when you perform a create disk request. If you don’t specify one, the disk is created in the same Availability Zone as the last Lightsail resource you created.

Disk state

Disks can be deleted only when they're in an available state. If the disk is in an attached state when performing a delete disk request, the service will wait to check if the disk state changes to available. The delete disk request times out if the disk state doesn't change to available within 15 minutes.