PUT service ostor-quotas
Description
Sets a quota value for the specified user/bucket or for all users/buckets.
Requests
Syntax
PUT /?ostor-quotas&emailAddress=<value>"a-size=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
PUT /?ostor-quotas&bucket=<value>"a-size=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
PUT /?ostor-quotas&default=<value>"a-size=<value> HTTP/1.1 Host: <host> Date: <date> Authorization: <authorization_string>
Parameters
Parameter | Description | Required |
---|---|---|
emailAddress
|
User email address. Type: string. Default value: none. |
Yes* |
id
|
User ID. Type: string. Default value: none. |
Yes* |
bucket
|
Bucket name. Type: string. Default value: none. |
Yes* |
quota-size
|
Sets the storage usage limit per user or bucket, as well as for all users or buckets, in gigabytes. Type: integer. Default: 0. |
Yes |
default
|
Sets the default value for quotas. If set to Type: string. Default: none. |
No |
* Only one of the required parameters can be set in a single request.
Zero value means “unlimited”.
Headers
This implementation uses only common request headers.
Responses
Headers
This implementation uses only common response headers.
Body
Empty.
Errors
Returns Error Code 400
if a wrong set of parameters is specified.
Examples
Sample request #1
Sets a quota for the user with the email user1@email.com
to 1024 GB.
PUT /?ostor-quotas&emailAddress=user1@email.com&ops"a-size=1024 HTTP/1.1 Host: s3.example.com Date: Thu, 09 Sep 2021 20:21:35 GMT Authorization: <authorization_string>
Sample response #1
HTTP/1.1 200 OK Transfer-encoding : chunked Server : nginx/1.8.1 Connection: closed x-amz-request-id : 80000000000000030005c8caec96d65b Date: Thu, 09 Sep 2021 20:21:40 GMT Content-type : application/json
Sample request #2
Sets a quota for the bucket bucket1
to 256 GB.
PUT /?ostor-quotas&bucket=bucket1"a-size=256 HTTP/1.1 Host: s3.example.com Date: Thu, 09 Sep 2021 20:22:57 GMT Authorization: <authorization_string>
Sample response #2
HTTP/1.1 200 OK Transfer-encoding : chunked Server : nginx/1.8.1 Connection: closed x-amz-request-id : 80000000000000030005c8caec96d65b Date : Thu, 09 Sep 2021 20:23:02 GMT Content-type : application/json
Sample request #3
Sets the default user quotas to 1024 GB.
PUT /?ostor-quotas&default=user"a-size=1024 HTTP/1.1 Host: s3.example.com Date: Thu, 09 Sep 2021 20:24:15 GMT Authorization: <authorization_string>
Sample response #3
HTTP/1.1 200 OK Transfer-encoding : chunked Server : nginx/1.8.1 Connection: closed x-amz-request-id : 80000000000000030005c8caec96d65b Date : Thu, 09 Sep 2021 20:24:19 GMT Content-type : application/json
Sample request #4
Sets the default bucket quotas to 256 GB.
PUT /?ostor-quotas&default=bucket"a-size=256 HTTP/1.1 Host: s3.example.com Date: Thu, 09 Sep 2021 20:25:31 Authorization: <authorization_string>
Sample response #4
HTTP/1.1 200 OK Transfer-encoding : chunked Server : nginx/1.8.1 Connection: closed x-amz-request-id : 80000000000000030005c8caec96d65b Date : Thu, 09 Sep 2021 20:25:36 GMT Content-type : application/json