Use Tablestore SDK for Java to delete an unused tunnel from a table. A deleted tunnel cannot be restored.
Prerequisites
Install Tablestore SDK for Java and initialize TunnelClient.
Feature description
Call deleteTunnel to delete a tunnel from a table.
Warning
Deleting a tunnel is irreversible. Before you delete a tunnel, stop all applications that consume data through the tunnel. Otherwise, data consumption may fail.
DeleteTunnelResponse deleteTunnel(DeleteTunnelRequest request)
throws TableStoreException, ClientException
The following example deletes the example_tunnel tunnel from the example_table table:
String tableName = "example_table";
String tunnelName = "example_tunnel";
DeleteTunnelRequest request =
new DeleteTunnelRequest(tableName, tunnelName);
tunnelClient.deleteTunnel(request);
Parameters
request is of the DeleteTunnelRequest type and contains the following parameters:
|
Name |
Type |
Description |
|
tableName (required) |
|
The name of the table that contains the tunnel to delete. |
|
tunnelName (required) |
|
The name of the tunnel to delete. |