The GET Storage Usage request tells you the total amount of storage in use by an account, and for each bucket associated with the account.
The amount of storage used by an account and its buckets can be obtained by a modified GET Service request with the x-ntap-sg-usage query parameter. Bucket storage usage is tracked separately from the PUT and DELETE requests processed by the system. There might be some delay before the usage values match the expected values based on the processing of requests, particularly if the system is under heavy load.
You must have the s3:ListAllMyBuckets permission to complete this operation.
Request HTTP Header | Description |
---|---|
Authorization | Specifies the AWS signature and the access key ID for the account to use for the request. |
Date | The date and time of the request. |
Host | The host name to which the request is directed. |
GET /?x-ntap-sg-usage HTTP/1.1 Date: Sat, 29 Nov 2015 00:49:04 GMTT Authorization: AWS 9MOYPG9ACWPAJA1S72R5:jUGbYkLdBApjCWBgK4TxvOjfock= Host: test.com
Response HTTP Header | Description |
---|---|
Connection | Specifies whether the connection to the server is open or closed. |
Content-Length | The length of the response body. |
Content-Type | The Multipurpose Internet Mail Extensions (MIME) type of the response body. |
Date | The date and time of the response. |
Server | The server that created the response. |
x-amz-request-id | The identifier that uniquely identifies the request. Created by the S3 API. |
HTTP/1.1 200 OK Date: Sat, 29 Nov 2015 00:49:05 GMT Connection: KEEP-ALIVE Server: StorageGRID/10.2.0 x-amz-request-id: 727237123 Content-Length: 427 Content-Type: application/xml <?xml version="1.0" encoding="UTF-8"?> <UsageResult xmlns="http://s3.storagegrid.com/doc/2015-02-01"> <CalculationTime>2014-11-19T05:30:11.000000Z</CalculationTime> <ObjectCount>4</ObjectCount> <DataBytes>12</DataBytes> <Buckets> <Bucket> <Name>bucket1</Name> <ObjectCount>2</ObjectCount> <DataBytes>6</DataBytes> </Bucket> <Bucket> <Name>bucket2</Name> <ObjectCount>2</ObjectCount> <DataBytes>6</DataBytes> </Bucket> </Buckets> </UsageResult>
Every object version stored will contribute to the ObjectCount and DataBytes values in the response. Delete markers are not added to the ObjectCount total.