You can call the DescribeTimeseriesTable operation to query the information about a time series table, such as the time to live (TTL) configuration.

Prerequisites

Parameter

Parameter Description
timeseriesTableName The name of the time series table.

Example

/**
 * Use DescribeTimeseriesTableSample to query the information about a time series table named timeseriesTableName. 
 */
func DescribeTimeseriesTableSample(client *tablestore.TimeseriesClient , timeseriesTableName string) {
    fmt.Println("[Info]: Begin to require timeseries table description!")
    describeTimeseriesTableRequest := tablestore.NewDescribeTimeseriesTableRequset(timeseriesTableName)  // Construct the request with the name of the time series table specified. 

    describeTimeseriesTableResponse , err := client.DescribeTimeseriesTable(describeTimeseriesTableRequest)
    if err != nil {
        fmt.Println("[Error]: Failed to require timeseries table description!")
        return
    }
    fmt.Println("[Info]: DescribeTimeseriesTableSample finished. Timeseries table meta: ")
    fmt.Println("[Info]: TimeseriesTableName: " , describeTimeseriesTableResponse.GetTimeseriesTableMeta().GetTimeseriesTableName())
    fmt.Println("[Info]: TimeseriesTable TTL: " , describeTimeseriesTableResponse.GetTimeseriesTableMeta().GetTimeseriesTableOPtions().GetTimeToLive())
}