# RetentionPeriodProperty

Information about the retention period for which the retention rule is to retain resources.

- Source: Generated at build time
- Type last changed: v2.169.0 · 21 Nov 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_rbin as rbin } from 'aws-cdk-lib';
const retentionPeriodProperty: rbin.CfnRule.RetentionPeriodProperty = {
  retentionPeriodUnit: 'retentionPeriodUnit',
  retentionPeriodValue: 123,
};
```

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_rbin as rbin

retention_period_property = rbin.CfnRule.RetentionPeriodProperty(
    retention_period_unit="retentionPeriodUnit",
    retention_period_value=123
)
```

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

RetentionPeriodProperty retentionPeriodProperty = RetentionPeriodProperty.builder()
        .retentionPeriodUnit("retentionPeriodUnit")
        .retentionPeriodValue(123)
        .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.Rbin;

var retentionPeriodProperty = new RetentionPeriodProperty {
    RetentionPeriodUnit = "retentionPeriodUnit",
    RetentionPeriodValue = 123
};
```

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"

retentionPeriodProperty := &RetentionPeriodProperty{
	RetentionPeriodUnit: jsii.String("retentionPeriodUnit"),
	RetentionPeriodValue: jsii.Number(123),
}
```

## Properties

- `retentionPeriodUnit`: string (required) — The unit of time in which the retention period is measured.

  Currently, only `DAYS` is supported.

- `retentionPeriodValue`: number (required) — The period value for which the retention rule is to retain resources, measured in days.

  The supported retention periods are:

  - EBS volumes: 1 - 7 days
  - EBS snapshots and EBS-backed AMIs: 1 - 365 days
