Versioning

Versioning Configuration of a Bucket

GetBucketVersioning

get

Returns the versioning state of a bucket.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:GetBucketVersioning operation using Bucket Policy.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
versioningboolean · enumRequiredPossible values:
Responses
200
Successful operation
application/xml
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
200

Successful operation

<?xml version="1.0" encoding="UTF-8"?>
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Status>Enabled</Status>
</VersioningConfiguration>

PutBucketVersioning

put

Configures the versioning state of an object storage bucket. Versioning allows keeping multiple variants of an object in the same bucket.

The versioning state can be one of the following:

  • Enabled: Activates versioning for the bucket. All objects added receive a unique version ID.

  • Suspended: Deactivates versioning. New objects get a null version ID. However, previously created version IDs persist.

Lifecycle configuration for versioned buckets

With Versioning, a bucket maintains one current version of an object and potentially multiple noncurrent (previous) versions, requiring additional management to handle noncurrent object version deletions using a Lifecycle Configuration.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:PutBucketVersioning operation using Bucket Policy.

S3 API Compatibility

  • The x-amz-mfa header is not supported.

  • The MfaDelete setting is ignored in the PUT request.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
versioningboolean · enumRequiredPossible values:
Header parameters
Content-MD5stringOptional

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
Responses
200
Successful operation
application/xml
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 166

"<?xml version="1.0" encoding="UTF-8"?>
<VersioningConfiguration> 
  <Status>Enabled</Status> 
  <MfaDelete>Disabled</MfaDelete>
</VersioningConfiguration>
"

No content

Was this helpful?