All Products
Search
Document Center

Object Storage Service:DeleteTablePolicy

Last Updated:Jun 02, 2026

Deletes the resource policy of a table.

Usage notes

  • Once deleted, other accounts or roles can no longer access the table through that policy.

  • This operation is irreversible. To restore the policy, call the PutTablePolicy operation to set it again.

  • If no resource policy is set for the table, this operation returns a 404 Not Found error.

Permissions

API

Action

Description

DeleteTablePolicy

oss:DeleteTablePolicy

Deletes the resource policy of a table.

Request syntax

DELETE /tables/{tableBucketARN}/{namespace}/{name}/policy 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 Alibaba Cloud Resource Name (ARN) of the table bucket. Format: acs:osstables:{region}:{uid}:bucket/{bucketName}.

namespace

String

Yes

my_namespace

The namespace that contains the table.

name

String

Yes

my_table

The table name.

Examples

Request example

DELETE /tables/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket/my_namespace/my_table/policy 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

SDK

DeleteTablePolicy is available in the following SDKs:

ossutil command-line tool

The corresponding ossutil command is delete-table-policy.

Error codes

Error code

HTTP status code

Description

ForbiddenException

403

You are not authorized to perform this request.

NotFoundException

404

The requested resource does not exist.