# RetentionArchiveTierProperty

*[Custom snapshot policies only]* Describes the retention rule for archived snapshots.

Once the archive retention threshold is met, the snapshots are permanently deleted from the archive tier.

> The archive retention rule must retain snapshots in the archive tier for a minimum of 90 days.

For *count-based schedules* , you must specify *Count* . For *age-based schedules* , you must specify *Interval* and *IntervalUnit* .

For more information about using snapshot archiving, see [Considerations for snapshot lifecycle policies](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-ami-policy.html#dlm-archive) .

- 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_dlm as dlm } from 'aws-cdk-lib';
const retentionArchiveTierProperty: dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty = {
  count: 123,
  interval: 123,
  intervalUnit: 'intervalUnit',
};
```

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_dlm as dlm

retention_archive_tier_property = dlm.CfnLifecyclePolicy.RetentionArchiveTierProperty(
    count=123,
    interval=123,
    interval_unit="intervalUnit"
)
```

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

RetentionArchiveTierProperty retentionArchiveTierProperty = RetentionArchiveTierProperty.builder()
        .count(123)
        .interval(123)
        .intervalUnit("intervalUnit")
        .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.DLM;

var retentionArchiveTierProperty = new RetentionArchiveTierProperty {
    Count = 123,
    Interval = 123,
    IntervalUnit = "intervalUnit"
};
```

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"

retentionArchiveTierProperty := &RetentionArchiveTierProperty{
	Count: jsii.Number(123),
	Interval: jsii.Number(123),
	IntervalUnit: jsii.String("intervalUnit"),
}
```

## Properties

- `count`: number — The maximum number of snapshots to retain in the archive storage tier for each volume.

  The count must ensure that each snapshot remains in the archive tier for at least 90 days. For example, if the schedule creates snapshots every 30 days, you must specify a count of 3 or more to ensure that each snapshot is archived for at least 90 days.

- `interval`: number — Specifies the period of time to retain snapshots in the archive tier.

  After this period expires, the snapshot is permanently deleted.

- `intervalUnit`: string — The unit of time in which to measure the *Interval* .

  For example, to retain a snapshots in the archive tier for 6 months, specify `Interval=6` and `IntervalUnit=MONTHS` .
