DeleteBucketPolicy

更新时间:
复制 MD 格式

The DeleteBucketPolicy operation deletes the access policy for a specified bucket or vector bucket.

Request syntax

DELETE /?policy
Host: Host
Date: GMT Date
Authorization: SignatureValue

When you call this operation in OSS on Cloud Box, you need to replace the Host with the CloudBox endpoints. For more information, see CloudBox endpoints

Request headers

DescribeRegions uses only common request headers. For more information, see Common request headers.

Response headers

The response contains only common response headers. For more information, see Common response headers.

Examples

Bucket example

  • Request example

    DELETE /?policy
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Thu, 17 Apr 2025 12:55:10 GMT
    Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
  • Response example

    HTTP/1.1 204 No Content
    content-length: 0
    server: AliyunOSS
    x-oss-server-time: 31
    connection: keep-alive
    x-oss-request-id: 5C6E9FAF31A13327124B****
    date: Thu, 21 Feb 2019 12:55:11 GMT

Vector bucket example

For vector buckets, the Host header must specify a standard Alibaba Cloud region ID, such as cn-hangzhou, instead of a legacy OSS region ID, such as oss-cn-hangzhou.
  • Request example

    DELETE /?policy
    Host: exampebucket-123***456.cn-hangzhou-internal.oss-vectors.aliyuncs.com
    Date: Thu, 17 Apr 2025 12:55:10 GMT
    Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
  • Response example

    HTTP/1.1 204 No Content
    content-length: 0
    server: AliyunOSS
    x-oss-server-time: 31
    connection: keep-alive
    x-oss-request-id: 5C6E9FAF31A13327124B****
    date: Thu, 21 Feb 2019 12:55:11 GMT

SDK

You can call this operation using the SDKs for the following languages:

ossutil command line interface

For more information about the ossutil command for this operation, see delete-bucket-policy.