Deletes a table in the specified namespace.
Usage notes
This operation is irreversible. Confirm that you no longer need the table data before proceeding.
To guard against accidental deletion, use the
--version-tokenparameter. The table is deleted only if the specified token matches the current version.Run
get-tableto review the table details before deleting it.
Syntax
ossutil tables-api delete-table --table-bucket-arn value --namespace value --name value [--version-token value] [flags]
|
Parameter |
Type |
Description |
|
--name |
string |
The name of the table to delete. |
|
--namespace |
string |
The name of the namespace that contains the table. |
|
--table-bucket-arn |
string |
The ARN of the Table Bucket. The format is |
|
--version-token |
string |
The version token of the table. When specified, the table is deleted only if the token matches the current version. Use this parameter to prevent accidental deletion from concurrent operations. |
The
delete-tablecommand corresponds to theDeleteTableAPI operation. For more information about the parameters, see DeleteTable.For a list of supported global command-line options, see ossutil global options.
Examples
-
Delete the table
my_tablefrom themy_namespacenamespace.ossutil tables-api delete-table \ --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket \ --namespace my_namespace \ --name my_table -
Delete a table only if its version token matches. The deletion is skipped if the token has changed.
ossutil tables-api delete-table \ --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket \ --namespace my_namespace \ --name my_table \ --version-token abc123