You can call the ListTunnel operation to list the tunnels of a specified table.

Request parameters

Parameter Description
TableName The name of the table that you want to list tunnels.

Response parameters

Parameter Description
List<TunnelInfo> The list of the tunnel, including the following information:
  • TunnelId: the ID of the tunnel.
  • TunnelType: the type of the tunnel. Valid values: BaseData, Stream, and BaseAndStream.
  • TableName: the name of the table for which the tunnel is configured.
  • InstanceName: the name of the instance for which the tunnel is configured.
  • Stage: the stage at which the tunnel is located. Valid values: InitBaseDataAndStreamShard, ProcessBaseData, and ProcessStream.
  • Expired: indicates whether the data is expired.

    If true is returned, contact Tablestore technical support by using DingTalk in a timely manner.

ResponseInfo Some other fields returned in the request.
RequestId The ID of the request.

Examples

private static void listTunnel(TunnelClient client, String tableName) {
    ListTunnelRequest request = new ListTunnelRequest(tableName);
    ListTunnelResponse resp = client.listTunnel(request);
    System.out.println("RequestId: " + resp.getRequestId());
    for (TunnelInfo info : resp.getTunnelInfos()) {
        System.out.println("TunnelInfo::::::");
        System.out.println("\tTunnelName: " + info.getTunnelName());
        System.out.println("\tTunnelId: " + info.getTunnelId());
        // The type of the tunnel. Valid values: BaseData, Stream, and BaseAndStream.
        System.out.println("\tTunnelType: " + info.getTunnelType());
        System.out.println("\tTableName: " + info.getTableName());
        System.out.println("\tInstanceName: " + info.getInstanceName());
        // The stage at which the tunnel is located. Valid values: InitBaseDataAndStreamShard, ProcessBaseData, and ProcessStream.
        System.out.println("\tStage: " + info.getStage());
        // Indicate whether data is expired. If true is returned, contact Tablestore technical support by using DingTalk in a timely manner.
        System.out.println("\tExpired: " + info.isExpired());
    }
}