All Products
Search
Document Center

Object Storage Service:delete-bucket-lifecycle

Last Updated:Jul 31, 2024

Deletes all lifecycle rules of a bucket.

Usage notes

  • To delete all lifecycle rules of a bucket, you must have the oss:DeleteBucketInventory permission. For more information, see Attach a custom policy to a RAM user.

  • The delete-bucket-lifecycle command deletes all lifecycle rules of the specified bucket. After lifecycle rules are deleted, objects in the bucket are not automatically deleted.

Command syntax

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

Parameter

Type

Description

--bucket

string

The name of the bucket.

Note

For more information, see Command-line options.

Examples

Delete all lifecycle rules of the examplebucket bucket.

ossutil api delete-bucket-lifecycle --bucket examplebucket