- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeTimeToLiveCommand
Gives a description of the Time to Live (TTL) status on the specified table.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DynamoDBClient, DescribeTimeToLiveCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, DescribeTimeToLiveCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const input = { // DescribeTimeToLiveInput
TableName: "STRING_VALUE", // required
};
const command = new DescribeTimeToLiveCommand(input);
const response = await client.send(command);
// { // DescribeTimeToLiveOutput
// TimeToLiveDescription: { // TimeToLiveDescription
// TimeToLiveStatus: "ENABLING" || "DISABLING" || "ENABLED" || "DISABLED",
// AttributeName: "STRING_VALUE",
// },
// };
DescribeTimeToLiveCommand Input
See DescribeTimeToLiveCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
TableName Required | string | undefined | The name of the table to be described. You can also provide the Amazon Resource Name (ARN) of the table in this parameter. |
DescribeTimeToLiveCommand Output
See DescribeTimeToLiveCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
TimeToLiveDescription | TimeToLiveDescription | undefined |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
InvalidEndpointException | client | |
ResourceNotFoundException | client | The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be |
DynamoDBServiceException | Base exception class for all service exceptions from DynamoDB service. |