GET Bucket Versioning¶
The GET Bucket Versioning operation uses the versioning subresource to return the versioning state of a bucket.
Note
Only the bucket owner can retrieve the versioning state of a bucket.
Versioning State | Response |
---|---|
Versioning is enabled on a bucket | <VersioningConfiguration xmlns="http://s3.example.com/doc/2006-03-01/">
<Status>Enabled</Status>
</VersioningConfiguration> |
Versioning is suspended on a bucket | <VersioningConfiguration xmlns="http://s3.example.com/doc/2006-03-01/">
<Status>Suspended</Status>
</VersioningConfiguration> |
Versioning has not been enabled (or suspended) on a bucket | <VersioningConfiguration xmlns="http://s3.example.com/doc/2006-03-01/"/> |
Requests¶
Syntax¶
GET /?versioning HTTP/1.1
Host: {{BucketName}}.{{StorageService}}.com
Date: {{date}}
Current-Length: {{length}}
Authorization: {{authenticationInformation}}
Parameters¶
The GET Bucket Versioning operation does not use request parameters.
Headers¶
The GET Bucket Versioning operation uses only request headers that are common to all operations (see Common Request Headers).
Elements¶
The GET Bucket Versioning operation does not use request elements.
Responses¶
Headers¶
The GET Bucket Versioning operation returns the following response elements.
Elements¶
Element | Type | Description |
---|---|---|
Status |
enum | The versioning state of the bucket. Valid Values: Disabled | Enabled Ancestors: VersioningConfiguration |
VersioningConfiguration |
Container | Container for the status response element. |
Examples¶
The example offered returns the versioning state of myBucket.
Request¶
GET /?versioning HTTP/1.1
Host: myBucket.s3.example.com
Date: Tue, 13 Dec 2011 19:14:42 GMT
Authorization: {{authenticationInformation}}
Content-Type: text/plain
Response¶
<VersioningConfiguration xmlns="http://s3.example.com/">
<Status>Enabled</Status>
</VersioningConfiguration>