Guides

×
×
Home > S3 Developer Guide > Operations > Bucket Versioning

Bucket Versioning

jQuery(document).attr(“title”, “Welcome to Sterling Kilgore | Results Beyond Words”);

This section explains the operations of enabling / get / disabling bucket version and listing versions for objects, inside a bucket my-bucket. The following is an example for IDrive Cloud’s Oregon (us-west-1) region.

You must follow the required configuration instructions before performing the following operations.


The commands below demonstrate how to enable versioning for the objects of a bucket, check versioning status, list versions for all or individual objects within the bucket and disable versioning for the objects of the bucket.

Enable versioning
The following example shows how to enable the versioning for objects present in the bucket my-bucket.


aws s3api put-bucket-versioning --versioning-configuration Status=Enabled --bucket my-bucket

Check versioning status
The following example shows how to check the versioning status of objects present in the bucket my-bucket.


aws s3api get-bucket-versioning --bucket my-bucket

List object versions
The following example shows how to list the versions of all the objects present in the bucket my-bucket.


aws s3api list-object-versions --bucket my-bucket

List versions of a particular object
The following example shows how to list the version of an object named my-object stored in the bucket my-bucket.


aws s3api list-object-versions --bucket my-bucket --prefix my-object

Disable versioning
The following example shows how to disable versioning for objects present in the bucket my-bucket.


aws s3api put-bucket-versioning --versioning-configuration Status=Suspended --bucket 
my-bucket
© 2020 IDrive Inc.