GET Bucket versioning

The owner of a bucket can use this operation to get the versioning state of the bucket.

If versioning is not configured for a bucket, no versioning state information will be returned after this operation. For details, see Sample Response (Bucket Versioning Not Configured).

Request Syntax

GET /?versioning HTTP/1.1
User-Agent: agent
Host: bucketname.obs.example.com
Accept: */*
Date: date
Authorization: authorization

Request Parameters

This request involves no parameters.

Request Headers

This request uses common headers. For details about common request headers, see section Common Request Headers.

Request Elements

This request involves no elements.

Response Syntax

HTTP/1.1 status_code
 Server: Server Name
 x-amz-request-id: request id
 x-amz-id-2: id
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
 Content-Type: type
 Date: date
 Content-Length: length

 <VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">
 <Status>status</Status>
 </VersioningConfiguration>

Response Headers

This response uses common headers. For details about common response headers, see section Common Response Headers.

Response elements

This response contains elements to specify the bucket versioning state. Table 1 describes the elements.

Table 1 Response elements

Element

Description

Remarks

VersioningConfiguration

Indicates the container for versioning state information.

Type: Container

Mandatory

Status

Specifies the versioning state of the bucket.

Type: Enumeration

Valid Values: Enabled, Suspended

Optional

Error Responses

No special error responses are returned. For details about error responses, see Table 1.

Sample Request

GET /?versioning HTTP/1.1
User-Agent: curl/7.29.0
Host: bucketname.obs.example.com
Accept: */*
Date: Mon, 13 Jan 2014 07:41:08 +0000
Authorization: AWS C5780CDE717D50F4CDAA:0FuFgUd3e9dqi3OeXPj1DiQMJgk=

Sample Response (Bucket Versioning Enabled)

HTTP/1.1 200 OK
 Server: OBS
 x-amz-request-id: DCD2FC9CAB78000001438A8C029703EB
 x-amz-id-2: TazfhHdpZ7V0YzmLQynVfaQ2+9zaWlTiNokK3wk8+HZPW9lWWBdsz35BXWZiQ1lk
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
 Content-Type: application/xml
 Date: Mon, 13 Jan 2014 09:41:08 GMT
 Content-Length: 178

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">
 <Status>Enabled</Status>
 </VersioningConfiguration>

Sample Response (Bucket Versioning Suspended)

HTTP/1.1 200 OK
 Server: OBS
 x-amz-request-id: DCD2FC9CAB7800000143954C3AE7C0A0
 x-amz-id-2: zmHdfVr7HvmASeSRQ70pbCkpuiV2shwt2V3pBGzAzue65i8HdixOtLi4ud5ZemN0
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
 Content-Type: application/xml
 Date: Wed, 13 Jan 2014 09:47:17 GMT
 Content-Length: 180

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">
 <Status>Suspended</Status>
 </VersioningConfiguration>

Sample Response (Bucket Versioning Not Configured)

HTTP/1.1 200 OK
 Server: OBS
 x-amz-request-id: DCD2FC9CAB780000014395468DB0BDB4
 x-amz-id-2: iDh4134qyYwtV7mlUr7vhe33DSDiDs/AuGOiU8ggUaz+B1wrNVUO6grsQDDsWf7J
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
 Content-Type: application/xml
 Date: Wed, 13 Jan 2014 09:40:00 GMT
 Content-Length: 129

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <VersioningConfiguration xmlns="http://obs.example.com/doc/2015-06-30/">