All Products
Search
Document Center

Object Storage Service:delete-bucket-policy

Last Updated:Aug 20, 2024

Deletes the policies of a specific bucket.

Usage notes

To delete a policy of a specific bucket, you must have the oss:DeleteBucketPolicy permission. For more information, see Attach a custom policy to a RAM user.

Command syntax

ossutil api delete-bucket-policy --bucket value [flags]

Parameter

Type

Description

--bucket

string

The name of the bucket whose policies you want to delete.

Note
  • The delete-bucket-policy command corresponds to the DeleteBucketPolicy operation. For more information about the parameters in the DeleteBucketPolicy operation, see DeleteBucketPolicy.

  • For more information about supported global command-line options, see Command-line options.

Examples

The following sample code provides an example on how to delete the policies of a bucket named examplebucket:

ossutil api delete-bucket-policy --bucket examplebucket