All Products
Search
Document Center

Object Storage Service:DeleteBucketPolicy

Last Updated:Feb 27, 2025

You can call DeleteBucketPolicy to delete the policies configured for a specified bucket.

Request syntax

DELETE /?policy
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

All headers in a DeleteBucketPolicy request are common request headers. For more information, see Common request headers.

Response headers

All headers in the response to a DeleteBucketPolicy request are common response headers. For more information, see Common response headers.

Examples

  • Sample requests

    DELETE /? policy
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Thu, 21 Feb 2019 12:55:10 GMT
    Authorization: OSS qn6q**************:77Dv****************
  • Sample responses

    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

OSS SDKs

You can use OSS SDKs for the following programming languages to call the DeleteBucketPolicy operation:

ossutil

For information about the ossutil command that corresponds to the DeleteBucketPolicy operation, see delete-bucket-policy.