GET Bucket storage class¶
You can use this operation to obtain the default storage class of a bucket.
Only users granted the s3:GetBucketStoragePolicy permission can perform this operation. By default, only the bucket owner can perform this operation. The bucket owner can allow other users to perform this operation by granting them the permission or setting a bucket policy.
Request Syntax¶
GET /?storagePolicy 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 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-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
x-amz-id-2: id
Content-Type: type
Date: date
Content-Length: length
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StoragePolicy xmlns="http://obs.example.com/doc/2015-06-30/">
<DefaultStorageClass>STANDARD</DefaultStorageClass>
</StoragePolicy>
Response Headers¶
This response uses common headers. For details about common response headers, see Common Response Headers.
Response Elements¶
This response contains elements to specify the default bucket storage class. Table 1 describes the elements.
Error Responses¶
No special error responses are returned. For details about error responses, see Table 1.
Sample Request¶
GET /?storagePolicy HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/3.1
Host: bucketname.obs.example.com
Accept: */*
Date: Sun, 26 Sep 2017 08:24:46 GMT
Authorization: AWS 08350B985315591007AD:UpIi7+loQpsAFUpKCYvmIuZyFP0=
Sample Response¶
HTTP/1.1 200 OK
Server: OBS
x-amz-request-id: 3CEF0000015D0B5293440F668629A2C9
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
x-amz-id-2: Dbn8aLu3MP7QA692G1pQdYZTf3Xa7vVGikDMbX+VfLFhat/ML3I/YkW8fwvWQSNr
Content-Type: application/xml
Date: Sun, 26 Sep 2017 08:24:47 GMT
Content-Length: 187
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StoragePolicy xmlns="http://obs.example.com/doc/2015-06-30/">
<DefaultStorageClass>STANDARD</DefaultStorageClass>
</StoragePolicy>