| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
This implementation of the GET operation uses the
versioning subresource to return the versioning state of a
bucket. To retrieve the versioning state of a bucket, you must be the bucket
owner.
This implementation also returns the MFA Delete status of the versioning state, i.e.,
if the MFA Delete status is enabled, the bucket owner must use an
authentication device to change the versioning state of the bucket.
There are three versioning states:
If you enabled versioning on a bucket, the response is:
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>Enabled</Status> </VersioningConfiguration>
If you suspended versioning on a bucket, the response is:
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>Suspended</Status> </VersioningConfiguration>
If you never enabled (or suspended) versioning on a bucket, the response is:
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>
GET /?versioning HTTP/1.1 Host:BucketName.s3.amazonaws.com Content-Length:lengthDate:dateAuthorization:signatureValue
This implementation of the operation does not use request parameters.
This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.
This implementation of the operation does not use request elements.
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
This implementation of GET returns the following response
elements.
| Name | Description |
|---|---|
MfaDelete
|
Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MfaDelete. If the bucket has never been so configured, this element is not returned. Type: Enum Valid Values: Disabled | Enabled Ancestor: VersioningConfiguration |
Status
|
The versioning state of the bucket. Type: Enum Valid Values: Suspended | Enabled Ancestor: VersioningConfiguration |
VersioningConfiguration
|
Container for the Type: Container Ancestor: None |
This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.
This example returns the versioning state of myBucket.
GET /?versioning HTTP/1.1 Host: myBucket.s3.amazonaws.com Date: Wed, 12 Oct 2009 17:50:00 GMT Authorization: AWS AKIAIOSFODNN7EXAMPLE:xQE0diMbLRepdf3YB+FIEXAMPLE= Content-Type: text/plain
The following is a sample of the response body (only) that shows bucket versioning is enabled.
<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>Enabled</Status> </VersioningConfiguration>