| Did this page help you? Yes No Tell us about it... |
You can use the versioning sub-resource to retrieve the
versioning state of a bucket.
To retrieve the versioning state of a bucket
In the header of a GET Bucket request, include the
versioning sub-resource.
GET /?versioning HTTP/1.1 Host:bucketName.s3.amazonaws.com Date: Wed, 12 Oct 2009 17:50:00 GMT Authorization: AWS15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=Content-Type: text/plain
In the response, check the value of the response element Status. There are three possible results:
If Versioning on a bucket is enabled, the response is:
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>Enabled</Status> </VersioningConfiguration>
If Versioning on a bucket is suspended, the response is:
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>Suspended</Status> </VersioningConfiguration>
If Versioning on a bucket has never been enabled, the response
doesn't retrieve a status element:
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>