

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Lightsail::Disk
<a name="aws-resource-lightsail-disk"></a>

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
<a name="aws-resource-lightsail-disk-syntax"></a>

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

### JSON
<a name="aws-resource-lightsail-disk-syntax.json"></a>

```
{
  "Type" : "AWS::Lightsail::Disk",
  "Properties" : {
      "[AddOns](#cfn-lightsail-disk-addons)" : [ AddOn, ... ],
      "[AvailabilityZone](#cfn-lightsail-disk-availabilityzone)" : String,
      "[DiskName](#cfn-lightsail-disk-diskname)" : String,
      "[Location](#cfn-lightsail-disk-location)" : Location,
      "[SizeInGb](#cfn-lightsail-disk-sizeingb)" : Integer,
      "[Tags](#cfn-lightsail-disk-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-lightsail-disk-syntax.yaml"></a>

```
Type: AWS::Lightsail::Disk
Properties:
  [AddOns](#cfn-lightsail-disk-addons): 
    - AddOn
  [AvailabilityZone](#cfn-lightsail-disk-availabilityzone): String
  [DiskName](#cfn-lightsail-disk-diskname): String
  [Location](#cfn-lightsail-disk-location): 
    Location
  [SizeInGb](#cfn-lightsail-disk-sizeingb): Integer
  [Tags](#cfn-lightsail-disk-tags): 
    - Tag
```

## Properties
<a name="aws-resource-lightsail-disk-properties"></a>

`AddOns`  <a name="cfn-lightsail-disk-addons"></a>
An array of add-ons for the disk.  
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](aws-properties-lightsail-disk-addon.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AvailabilityZone`  <a name="cfn-lightsail-disk-availabilityzone"></a>
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`  <a name="cfn-lightsail-disk-diskname"></a>
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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Location`  <a name="cfn-lightsail-disk-location"></a>
The AWS Region and Availability Zone where the disk is located.  
*Required*: No  
*Type*: [Location](aws-properties-lightsail-disk-location.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SizeInGb`  <a name="cfn-lightsail-disk-sizeingb"></a>
The size of the disk in GB.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: Updates are not supported.

`Tags`  <a name="cfn-lightsail-disk-tags"></a>
An array of key-value pairs to apply to this resource.  
For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *AWS CloudFormation User Guide*.  
The `Value` of `Tags` is optional for Lightsail resources.
*Required*: No  
*Type*: Array of [Tag](aws-properties-lightsail-disk-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-lightsail-disk-return-values"></a>

### Ref
<a name="aws-resource-lightsail-disk-return-values-ref"></a>

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

### Fn::GetAtt
<a name="aws-resource-lightsail-disk-return-values-fn--getatt"></a>

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 [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-lightsail-disk-return-values-fn--getatt-fn--getatt"></a>

`AttachedTo`  <a name="AttachedTo-fn::getatt"></a>
The resources to which the disk is attached.

`AttachmentState`  <a name="AttachmentState-fn::getatt"></a>
(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.

`DiskArn`  <a name="DiskArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the disk.

`Iops`  <a name="Iops-fn::getatt"></a>
The input/output operations per second (IOPS) of the disk.

`IsAttached`  <a name="IsAttached-fn::getatt"></a>
A Boolean value indicating whether the disk is attached.

`Location.AvailabilityZone`  <a name="Location.AvailabilityZone-fn::getatt"></a>
The Availability Zone where the disk is located.

`Location.RegionName`  <a name="Location.RegionName-fn::getatt"></a>
The AWS Region where the disk is located.

`Path`  <a name="Path-fn::getatt"></a>
The disk path.

`ResourceType`  <a name="ResourceType-fn::getatt"></a>
The resource type of the disk (for example, `Disk`).

`State`  <a name="State-fn::getatt"></a>
The state of the disk (for example, `in-use`).

`SupportCode`  <a name="SupportCode-fn::getatt"></a>
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
<a name="aws-resource-lightsail-disk--remarks"></a>

 *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.

# AWS::Lightsail::Disk AddOn
<a name="aws-properties-lightsail-disk-addon"></a>

`AddOn` is a property of the [AWS::Lightsail::Disk](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-disk.html) resource. It describes the add-ons for a disk.

## Syntax
<a name="aws-properties-lightsail-disk-addon-syntax"></a>

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

### JSON
<a name="aws-properties-lightsail-disk-addon-syntax.json"></a>

```
{
  "[AddOnType](#cfn-lightsail-disk-addon-addontype)" : String,
  "[AutoSnapshotAddOnRequest](#cfn-lightsail-disk-addon-autosnapshotaddonrequest)" : AutoSnapshotAddOn,
  "[Status](#cfn-lightsail-disk-addon-status)" : String
}
```

### YAML
<a name="aws-properties-lightsail-disk-addon-syntax.yaml"></a>

```
  [AddOnType](#cfn-lightsail-disk-addon-addontype): String
  [AutoSnapshotAddOnRequest](#cfn-lightsail-disk-addon-autosnapshotaddonrequest): 
    AutoSnapshotAddOn
  [Status](#cfn-lightsail-disk-addon-status): String
```

## Properties
<a name="aws-properties-lightsail-disk-addon-properties"></a>

`AddOnType`  <a name="cfn-lightsail-disk-addon-addontype"></a>
The add-on type (for example, `AutoSnapshot`).  
`AutoSnapshot` is the only add-on that can be enabled for a disk.
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutoSnapshotAddOnRequest`  <a name="cfn-lightsail-disk-addon-autosnapshotaddonrequest"></a>
The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.  
*Required*: No  
*Type*: [AutoSnapshotAddOn](aws-properties-lightsail-disk-autosnapshotaddon.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Status`  <a name="cfn-lightsail-disk-addon-status"></a>
The status of the add-on.  
Valid Values: `Enabled` \$1 `Disabled`  
*Required*: No  
*Type*: String  
*Allowed values*: `Enabling | Disabling | Enabled | Terminating | Terminated | Disabled | Failed`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Disk AutoSnapshotAddOn
<a name="aws-properties-lightsail-disk-autosnapshotaddon"></a>

`AutoSnapshotAddOn` is a property of the [AddOn](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-disk-addon.html) property. It describes the automatic snapshot add-on for a disk.

## Syntax
<a name="aws-properties-lightsail-disk-autosnapshotaddon-syntax"></a>

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

### JSON
<a name="aws-properties-lightsail-disk-autosnapshotaddon-syntax.json"></a>

```
{
  "[SnapshotTimeOfDay](#cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday)" : String
}
```

### YAML
<a name="aws-properties-lightsail-disk-autosnapshotaddon-syntax.yaml"></a>

```
  [SnapshotTimeOfDay](#cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday): String
```

## Properties
<a name="aws-properties-lightsail-disk-autosnapshotaddon-properties"></a>

`SnapshotTimeOfDay`  <a name="cfn-lightsail-disk-autosnapshotaddon-snapshottimeofday"></a>
The daily time when an automatic snapshot will be created.  
Constraints:  
+ Must be in `HH:00` format, and in an hourly increment.
+ Specified in Coordinated Universal Time (UTC).
+ The snapshot will be automatically created between the time specified and up to 45 minutes after.
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9]{2}:00$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Disk Location
<a name="aws-properties-lightsail-disk-location"></a>

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

## Syntax
<a name="aws-properties-lightsail-disk-location-syntax"></a>

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

### JSON
<a name="aws-properties-lightsail-disk-location-syntax.json"></a>

```
{
  "[AvailabilityZone](#cfn-lightsail-disk-location-availabilityzone)" : String,
  "[RegionName](#cfn-lightsail-disk-location-regionname)" : String
}
```

### YAML
<a name="aws-properties-lightsail-disk-location-syntax.yaml"></a>

```
  [AvailabilityZone](#cfn-lightsail-disk-location-availabilityzone): String
  [RegionName](#cfn-lightsail-disk-location-regionname): String
```

## Properties
<a name="aws-properties-lightsail-disk-location-properties"></a>

`AvailabilityZone`  <a name="cfn-lightsail-disk-location-availabilityzone"></a>
The Availability Zone where the disk is located.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RegionName`  <a name="cfn-lightsail-disk-location-regionname"></a>
The AWS Region where the disk is located.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::Lightsail::Disk Tag
<a name="aws-properties-lightsail-disk-tag"></a>

Describes a tag key and optional value assigned to an Amazon Lightsail resource.

For more information about tags in Lightsail, see the [Amazon Lightsail Developer Guide](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags).

## Syntax
<a name="aws-properties-lightsail-disk-tag-syntax"></a>

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

### JSON
<a name="aws-properties-lightsail-disk-tag-syntax.json"></a>

```
{
  "[Key](#cfn-lightsail-disk-tag-key)" : String,
  "[Value](#cfn-lightsail-disk-tag-value)" : String
}
```

### YAML
<a name="aws-properties-lightsail-disk-tag-syntax.yaml"></a>

```
  [Key](#cfn-lightsail-disk-tag-key): String
  [Value](#cfn-lightsail-disk-tag-value): String
```

## Properties
<a name="aws-properties-lightsail-disk-tag-properties"></a>

`Key`  <a name="cfn-lightsail-disk-tag-key"></a>
The key of the tag.  
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: \$1 - = . \$1 : / @  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-lightsail-disk-tag-value"></a>
The value of the tag.  
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: \$1 - = . \$1 : / @  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)