查询指定表的结构信息和预留读/写吞吐量设置信息。

接口

 /// <summary>
 /// 查询指定表的结构信息和预留读写吞吐量设置信息。
 /// </summary>
 /// <param name="request">请求参数,包含表名</param>
 /// <returns>包含表的结构信息和预留读写吞吐量等信息。</returns>
 public DescribeTableResponse DescribeTable(DescribeTableRequest request);

 /// <summary>
 /// DescribeTable的异步形式。
 /// </summary>
 public Task<DescribeTableResponse> DescribeTableAsync(DescribeTableRequest request);

示例

获取表的描述信息。

 try
 {
     var request = new DescribeTableRequest("SampleTable");
     var response = otsClient.DescribeTable(request);

     // 打印表的描述信息
     Console.Writeline("Describe table succeeded.");
     Console.WriteLine("LastIncreaseTime: {0}", response.ReservedThroughputDetails.LastIncreaseTime);
     Console.WriteLine("LastDecreaseTime: {0}", response.ReservedThroughputDetails.LastDecreaseTime);
     Console.WriteLine("NumberOfDecreaseToday: {0}", response.ReservedThroughputDetails.LastIncreaseTime);
     Console.WriteLine("ReadCapacity: {0}", response.ReservedThroughputDetails.CapacityUnit.Read);
     Console.WriteLine("WriteCapacity: {0}", response.ReservedThroughputDetails.CapacityUnit.Write);
 }
 catch (Exception ex)
 {
     //如果抛出异常,则说明执行失败,打印错误信息
     Console.WriteLine("Describe table failed, exception:{0}", ex.Message);
        }

详细代码请参见DescribeTable@GitHub