You can call this operation to obtain the information about TableMeta, TableOptions, and ReservedThroughputDetails of a specified table.

The CreateTable topic describes TableMeta and TableOptions. In addition to reserved throughput values, ReservedThroughputDetails indicates the time when you last increased or decreased these values.

Example

private static void describeTable(SyncClient client) {
    DescribeTableRequest request = new DescribeTableRequest(TABLE_NAME);
    DescribeTableResponse response = client.describeTable(request);
    TableMeta tableMeta = response.getTableMeta();
    System.out.println("The name of the table:" + tableMeta.getTableName());
    System.out.println("The primary key of the table:");
    for (PrimaryKeySchema primaryKeySchema : tableMeta.getPrimaryKeyList()) {
        System.out.println(primaryKeySchema);
    }
    TableOptions tableOptions = response.getTableOptions();
    System.out.println("TTL of the table:" + tableOptions.getTimeToLive());
    System.out.println("Max Versions of the table:" + tableOptions.getMaxVersions());
    ReservedThroughputDetails reservedThroughputDetails = response.getReservedThroughputDetails();
    System.out.println("Reserved read throughput of the table:"
            + reservedThroughputDetails.getCapacityUnit().getReadCapacityUnit());
    System.out.println("Reserved write throughput of the table:"
            + reservedThroughputDetails.getCapacityUnit().getWriteCapacityUnit());
}