Queries lifecycle rules of a bucket.
Usage notes
By default, only the owner of a bucket has the permissions to query the lifecycle rules of the bucket.
To query lifecycle rules of a bucket, you must have the
oss:GetBucketLifecyclepermission. For more information, see Attach a custom policy to a RAM user.
Command syntax
ossutil api get-bucket-lifecycle --bucket value [flags]Parameter | Type | Description |
--bucket | string | The name of the bucket. |
Note
For more information, see Command-line options.
Examples
Query lifecycle rules of the examplebucket bucket.
ossutil api get-bucket-lifecycle --bucket examplebucketQuery lifecycle rules of the examplebucket bucket and format the output in JSON.
ossutil api get-bucket-lifecycle --bucket examplebucket --output-format jsonQuery lifecycle rules of the examplebucket bucket and format the output in YAML.
ossutil api get-bucket-lifecycle --bucket examplebucket --output-format yaml