S3 API Documentation

×
×
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® e2's Chicago 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 --endpoint-url https://storageendpoint

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 --endpoint-url https://storageendpoint

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 --endpoint-url https://storageendpoint

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 --endpoint-url https://storageendpoint

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 --endpoint-url https://storageendpoint
© 2024 IDrive Inc.