interface SnapshotManagementProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.S3Tables.Alpha.SnapshotManagementProperty |
![]() | software.amazon.awscdk.services.s3tables.alpha.SnapshotManagementProperty |
![]() | aws_cdk.aws_s3tables_alpha.SnapshotManagementProperty |
![]() | @aws-cdk/aws-s3tables-alpha ยป SnapshotManagementProperty |
Contains details about the snapshot management settings for an Iceberg table.
A snapshot is expired when it exceeds MinSnapshotsToKeep and MaxSnapshotAgeHours.
Example
// Build a table
const sampleTable = new Table(scope, 'ExampleTable', {
tableName: 'example_table',
namespace: namespace,
openTableFormat: OpenTableFormat.ICEBERG,
withoutMetadata: true,
});
// Build a table with an Iceberg Schema
const sampleTableWithSchema = new Table(scope, 'ExampleSchemaTable', {
tableName: 'example_table_with_schema',
namespace: namespace,
openTableFormat: OpenTableFormat.ICEBERG,
icebergMetadata: {
icebergSchema: {
schemaFieldList: [
{
name: 'id',
type: 'int',
required: true,
},
{
name: 'name',
type: 'string',
},
],
},
},
compaction: {
status: Status.ENABLED,
targetFileSizeMb: 128,
},
snapshotManagement: {
status: Status.ENABLED,
maxSnapshotAgeHours: 48,
minSnapshotsToKeep: 5,
},
});
Properties
Name | Type | Description |
---|---|---|
max | number | The maximum age of a snapshot before it can be expired. |
min | number | The minimum number of snapshots to keep. |
status? | Status | Indicates whether the SnapshotManagement maintenance action is enabled. |
maxSnapshotAgeHours?
Type:
number
(optional, default: No maximum age)
The maximum age of a snapshot before it can be expired.
minSnapshotsToKeep?
Type:
number
(optional, default: No minimum number)
The minimum number of snapshots to keep.
status?
Type:
Status
(optional, default: Not specified)
Indicates whether the SnapshotManagement maintenance action is enabled.