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, "Location" : Location, "SizeInGb" : Integer, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Lightsail::Disk Properties: AddOns: - AddOn AvailabilityZone: String DiskName: String Location: Location 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: Array 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

Minimum: 1

Maximum: 255

Update requires: Updates are not supported.

DiskName

The name of the disk.

Required: Yes

Type: String

Pattern: ^[a-zA-Z0-9][\w\-.]*[a-zA-Z0-9]$

Minimum: 1

Maximum: 254

Update requires: Replacement

Location

The AWS Region and Availability Zone where the disk is located.

Required: No

Type: Location

Update requires: No interruption

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: Array 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 resources 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.

Location.AvailabilityZone

The Availability Zone where the disk is located.

Location.RegionName

The AWS Region where the disk is located.

Path

The disk path.

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.