PerformanceInsightRetention Enum
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 |
|---|---|
| Type last changed |
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),
}),
});
python
# vpc: ec2.Vpc
# kms_key: kms.Key
rds.DatabaseCluster(self, "Database",
engine=rds.DatabaseClusterEngine.AURORA,
vpc=vpc,
enable_performance_insights=True,
performance_insight_retention=rds.PerformanceInsightRetention.LONG_TERM,
performance_insight_encryption_key=kms_key,
writer=rds.ClusterInstance.provisioned("Writer",
instance_type=ec2.InstanceType.of(ec2.InstanceClass.R7G, ec2.InstanceSize.LARGE)
)
)
java
Vpc vpc;
Key kmsKey;
DatabaseCluster.Builder.create(this, "Database")
.engine(DatabaseClusterEngine.AURORA)
.vpc(vpc)
.enablePerformanceInsights(true)
.performanceInsightRetention(PerformanceInsightRetention.LONG_TERM)
.performanceInsightEncryptionKey(kmsKey)
.writer(ClusterInstance.provisioned("Writer", ProvisionedClusterInstanceProps.builder()
.instanceType(InstanceType.of(InstanceClass.R7G, InstanceSize.LARGE))
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Vpc vpc;
Key kmsKey;
new DatabaseCluster(this, "Database", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AURORA,
Vpc = vpc,
EnablePerformanceInsights = true,
PerformanceInsightRetention = PerformanceInsightRetention.LONG_TERM,
PerformanceInsightEncryptionKey = kmsKey,
Writer = ClusterInstance.Provisioned("Writer", new ProvisionedClusterInstanceProps {
InstanceType = InstanceType.Of(InstanceClass.R7G, InstanceSize.LARGE)
})
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var vpc Vpc
var kmsKey Key
rds.NewDatabaseCluster(this, jsii.String("Database"), &DatabaseClusterProps{
Engine: rds.DatabaseClusterEngine_AURORA(),
Vpc: vpc,
EnablePerformanceInsights: jsii.Boolean(true),
PerformanceInsightRetention: rds.PerformanceInsightRetention_LONG_TERM,
PerformanceInsightEncryptionKey: kmsKey,
Writer: rds.ClusterInstance_Provisioned(jsii.String("Writer"), &ProvisionedClusterInstanceProps{
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.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionDatabaseCluster.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionDatabaseClusterFromSnapshot.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionDatabaseClusterFromSnapshotProps.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionDatabaseClusterProps.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionDatabaseInstanceNewProps.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionIAuroraClusterInstance.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetentionInstanceProps.performanceInsightRetentionperformance_insight_retentionperformanceInsightRetentionPerformanceInsightRetentionPerformanceInsightRetention