Query the description of a table

Updated at: 2024-12-20 07:45

You can call the DescribeTable operation to query the description of a table, such as the schema information, reserved read throughput, and reserved write throughput.

Prerequisites

API operation

/**
 * Query the schema information and the reserved read throughput and reserved write throughput of the specified table. 
 */
describeTable(params, callback)

Parameters

Parameter

Description

Parameter

Description

tableName

The name of the table

Examples

The following sample code provides an example on how to query the configuration information about a table, such as the max versions and time to live (TTL).

var client = require('./client');

var params = {
    tableName: 'sampleTable'
};

client.describeTable(params, function (err, data) {
    if (err) {
        console.log('error:', err);
        return;
    }
    console.log('success:', data, 'maxVersions:', data.tableOptions.maxVersions, 'timeToLive:', data.tableOptions.timeToLive);
});

References

  • On this page (1, T)
  • Prerequisites
  • API operation
  • Parameters
  • Examples
  • References
Feedback