aws-cdk-lib.aws_dynamodb.CfnTable.TimeToLiveSpecificationProperty

interface TimeToLiveSpecificationProperty

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.CfnTable.TimeToLiveSpecificationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#CfnTable_TimeToLiveSpecificationProperty
Javasoftware.amazon.awscdk.services.dynamodb.CfnTable.TimeToLiveSpecificationProperty
Pythonaws_cdk.aws_dynamodb.CfnTable.TimeToLiveSpecificationProperty
TypeScript aws-cdk-lib » aws_dynamodb » CfnTable » TimeToLiveSpecificationProperty

Represents the settings used to enable or disable Time to Live (TTL) for the specified table.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
const timeToLiveSpecificationProperty: dynamodb.CfnTable.TimeToLiveSpecificationProperty = {
  enabled: false,

  // the properties below are optional
  attributeName: 'attributeName',
};

Properties

NameTypeDescription
enabledboolean | IResolvableIndicates whether TTL is to be enabled (true) or disabled (false) on the table.
attributeName?stringThe name of the TTL attribute used to store the expiration time for items in the table.

enabled

Type: boolean | IResolvable

Indicates whether TTL is to be enabled (true) or disabled (false) on the table.


attributeName?

Type: string (optional)

The name of the TTL attribute used to store the expiration time for items in the table.

  • The AttributeName property is required when enabling the TTL, or when TTL is already enabled.
  • To update this property, you must first disable TTL and then enable TTL with the new attribute name.