# PerformanceInsightRetention

The retention period for Performance Insight data, in days.

Per https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#cfn-rds-dbinstance-performanceinsightsretentionperiod
This must be either
- 7 days (the default, free tier)
- month * 31, where month is a number of months from 1-23
- 731 (2 years)

- Source: [`aws-rds/lib/props.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-rds/lib/props.ts#L559)
- Type last changed: v2.78.0 · 4 May 2023

## Example

```ts
declare const vpc: ec2.Vpc;
declare const kmsKey: kms.Key;
new rds.DatabaseCluster(this, 'Database', {
  engine: rds.DatabaseClusterEngine.AURORA,
  vpc: vpc,
  enablePerformanceInsights: true,
  performanceInsightRetention: rds.PerformanceInsightRetention.LONG_TERM,
  performanceInsightEncryptionKey: kmsKey,
  writer: rds.ClusterInstance.provisioned('Writer', {
    instanceType: ec2.InstanceType.of(ec2.InstanceClass.R7G, ec2.InstanceSize.LARGE),
  }),
});
```

## Members

| Member | Description |
| --- | --- |
| `DEFAULT` | Default retention period of 7 days. |
| `MONTHS_1` |  |
| `MONTHS_2` |  |
| `MONTHS_3` |  |
| `MONTHS_4` |  |
| `MONTHS_5` |  |
| `MONTHS_6` |  |
| `MONTHS_7` |  |
| `MONTHS_8` |  |
| `MONTHS_9` |  |
| `MONTHS_10` |  |
| `MONTHS_11` |  |
| `MONTHS_12` |  |
| `MONTHS_13` |  |
| `MONTHS_14` |  |
| `MONTHS_15` |  |
| `MONTHS_16` |  |
| `MONTHS_17` |  |
| `MONTHS_18` |  |
| `MONTHS_19` |  |
| `MONTHS_20` |  |
| `MONTHS_21` |  |
| `MONTHS_22` |  |
| `MONTHS_23` |  |
| `LONG_TERM` | Long term retention period of 2 years. |

## Referenced by

- [`ClusterInstanceOptions`](/v2/docs/aws-cdk-lib.aws_rds.ClusterInstanceOptions).performanceInsightRetention
- [`DatabaseCluster`](/v2/docs/aws-cdk-lib.aws_rds.DatabaseCluster).performanceInsightRetention
- [`DatabaseClusterFromSnapshot`](/v2/docs/aws-cdk-lib.aws_rds.DatabaseClusterFromSnapshot).performanceInsightRetention
- [`DatabaseClusterFromSnapshotProps`](/v2/docs/aws-cdk-lib.aws_rds.DatabaseClusterFromSnapshotProps).performanceInsightRetention
- [`DatabaseClusterProps`](/v2/docs/aws-cdk-lib.aws_rds.DatabaseClusterProps).performanceInsightRetention
- [`DatabaseInstanceNewProps`](/v2/docs/aws-cdk-lib.aws_rds.DatabaseInstanceNewProps).performanceInsightRetention
- [`IAuroraClusterInstance`](/v2/docs/aws-cdk-lib.aws_rds.IAuroraClusterInstance).performanceInsightRetention
- [`InstanceProps`](/v2/docs/aws-cdk-lib.aws_rds.InstanceProps).performanceInsightRetention
