DeleteTable

API description: DeleteTable

You can call the DeleteTable operation to delete a specified table from the current instance.

Method
     /**
     * Delete a table based on the table name.
     * @api
     * @param [] $request The request parameters.
     * @return [] The response. If the DeleteTable operation succeeds, no message is returned. An empty array is returned here to be consistent with other operations.
     * @throws OTSClientException The exception that is thrown when a parameter check error occurs or the Table Store server returns a verification error.
     * @throws OTSServerException The exception that is thrown when the Table Store server returns an error.
     */
    public function deleteTable(array $request);            
Request format
$result = $client->deleteTable([
     'table_name' => '<string>', // Required.
]);           
Request format description

table_name: the table name.

Response format
    []    
Response format description

The response is empty. If an error occurs, the system throws an exception.

Example

The following code provides an example of how to delete a table:

$result = $otsClient->deleteTable([
    'table_name' => 'MyTable'
]);