# TimeToLiveSpecificationProperty

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

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// 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',
};
```

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_dynamodb as dynamodb

time_to_live_specification_property = dynamodb.CfnTable.TimeToLiveSpecificationProperty(
    enabled=False,

    # the properties below are optional
    attribute_name="attributeName"
)
```

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

TimeToLiveSpecificationProperty timeToLiveSpecificationProperty = TimeToLiveSpecificationProperty.builder()
        .enabled(false)

        // the properties below are optional
        .attributeName("attributeName")
        .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.DynamoDB;

var timeToLiveSpecificationProperty = new TimeToLiveSpecificationProperty {
    Enabled = false,

    // the properties below are optional
    AttributeName = "attributeName"
};
```

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"

timeToLiveSpecificationProperty := &TimeToLiveSpecificationProperty{
	Enabled: jsii.Boolean(false),

	// the properties below are optional
	AttributeName: jsii.String("attributeName"),
}
```

## Properties

- `attributeName`: string — 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.

- `enabled`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Indicates whether TTL is to be enabled (true) or disabled (false) on the table.
