Deletes a specified namespace from a Table Bucket. The namespace must contain no tables before deletion.
Usage notes
-
Before you delete a namespace, make sure that it contains no tables. Otherwise, the operation fails.
-
A deleted namespace cannot be recovered. Proceed with caution.
Permissions
|
API |
Actions |
Description |
|
DeleteNamespace |
oss:DeleteNamespace |
Deletes a namespace. |
Request syntax
DELETE /namespaces/{tableBucketARN}/{namespace} HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Request parameters
|
Parameter |
Type |
Required |
Example |
Description |
|
tableBucketARN |
string |
Yes |
acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket |
The ARN of the Table Bucket. The format is |
|
namespace |
string |
Yes |
my_namespace |
The name of the namespace to delete. |
Examples
Request example
DELETE /namespaces/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket/my_namespace HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: Thu, 10 Apr 2025 08:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/osstables/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c****
Response example
HTTP/1.1 204 No Content
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422****
x-oss-server-time: 3
SDKs
You can use the following SDKs to call this operation:
ossutil CLI
You can also run the delete-namespace command in ossutil to perform this operation.
Error codes
|
Error code |
HTTP status code |
Description |
|
BadRequestException |
400 |
The request is invalid or malformed. |
|
ForbiddenException |
403 |
You do not have the required permissions to perform this operation. |
|
NotFoundException |
404 |
The requested resource does not exist. |