# AddOnProperty

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

- 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 addOnProperty: lightsail.CfnDisk.AddOnProperty = {
  addOnType: 'addOnType',

  // the properties below are optional
  autoSnapshotAddOnRequest: {
    snapshotTimeOfDay: 'snapshotTimeOfDay',
  },
  status: 'status',
};
```

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

add_on_property = lightsail.CfnDisk.AddOnProperty(
    add_on_type="addOnType",

    # the properties below are optional
    auto_snapshot_add_on_request=lightsail.CfnDisk.AutoSnapshotAddOnProperty(
        snapshot_time_of_day="snapshotTimeOfDay"
    ),
    status="status"
)
```

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

AddOnProperty addOnProperty = AddOnProperty.builder()
        .addOnType("addOnType")

        // the properties below are optional
        .autoSnapshotAddOnRequest(AutoSnapshotAddOnProperty.builder()
                .snapshotTimeOfDay("snapshotTimeOfDay")
                .build())
        .status("status")
        .build();
```

C# / .NET:

```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 addOnProperty = new AddOnProperty {
    AddOnType = "addOnType",

    // the properties below are optional
    AutoSnapshotAddOnRequest = new AutoSnapshotAddOnProperty {
        SnapshotTimeOfDay = "snapshotTimeOfDay"
    },
    Status = "status"
};
```

Golang:

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

addOnProperty := &AddOnProperty{
	AddOnType: jsii.String("addOnType"),

	// the properties below are optional
	AutoSnapshotAddOnRequest: &AutoSnapshotAddOnProperty{
		SnapshotTimeOfDay: jsii.String("snapshotTimeOfDay"),
	},
	Status: jsii.String("status"),
}
```

## Properties

- `addOnType`: string (required) — The add-on type (for example, `AutoSnapshot` ).

  > `AutoSnapshot` is the only add-on that can be enabled for a disk.

- `autoSnapshotAddOnRequest`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDisk.AutoSnapshotAddOnProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lightsail.CfnDisk.AutoSnapshotAddOnProperty.html) — The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.

- `status`: string — The status of the add-on.

  Valid Values: `Enabled` | `Disabled`
