PUT service ostor-limits

Description

Sets limit values for the specified user or bucket. Either operations count or bandwidth limits can be specified in a single request.

Requests

Syntax

PUT /?ostor-limits&emailAddress=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>
PUT /?ostor-limits&bucket=<value> HTTP/1.1
Host: <host>
Date: <date>
Authorization: <authorization_string>

Parameters

PUT Service ostor-limits 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
bandwidth

Enables bandwidth limits.

Bandwidth limits types: { out | kb/s }

Type: flag.

Yes**
ops

Enables operations limits. If set, all unspecified bandwidth limits are set to 0.

Operations limits types: { default | ops/min, put | ops/min , get | ops/min, list | ops/min, delete | ops/min }

Type: flag.

Yes**
default

Sets the default value for operations limits. If set, all unspecified operations limits are set to default, otherwise they are set to 0.

Requires the ops subresource to be set.

Type: integer.

Default: 0.

No
put

Sets the PUT operations limit value.

Requires the ops subresource to be set.

Type: integer.

Default: default.

No
get

Sets the GET operations limit value.

Requires the ops subresource to be set.

Type: integer.

Default: default.

No
delete

Sets the DELETE operations limit value.

Requires the ops subresource to be set.

Type: integer.

Default: default.

No
list

Sets the LIST operations limit value.

Requires the ops subresource to be set.

Type: integer.

Default: default.

No
out

Sets an outgoing bandwidth limit.

Requires the ops subresource to be set.

Type: integer.

Default: 0.

No

* Only one of the required parameters can be set in a single request.

** Either ops or bandwidth 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 all operations limits for the user with the email user1@email.com to zero.

PUT /?ostor-limits&emailAddress=user1@email.com&ops&default=0 HTTP/1.1
Host: s3.example.com
Date: Thu, 07 Apr 2016 14:08:55 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, 07 Apr 2016 14:08:56 GMT
Content-type : application/json

Sample request #2

Sets all operations limits for the user with the email user1@email.com to 1 ops/sec.

PUT /?ostor-limits&emailAddress=user1@email.com&ops&default=60 HTTP/1.1
Host: s3.example.com
Date: Thu, 07 Apr 2016 14:08:55 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, 07 Apr 2016 14:08:56 GMT
Content-type : application/json

Sample request #3

Sets all badwidth.out limit for the bucket testbucket to 50 kb/s.

PUT /?ostor-limits&bucket=testbucket&bandwidth&out=50 HTTP/1.1
Host: s3.example.com
Date: Thu, 07 Apr 2016 14:08:55 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, 07 Apr 2016 14:08:56 GMT
Content-type : application/json

Sample request #4

Sets operations limits for the bucket testbucket. The new PUT operations limit is 60 ops/s, LIST limit is 0.5 ops/s, GET and DELETE limits are 1 ops/s.

PUT /?ostor-limits&bucket=testbucket&ops&default=60&put=3600&list=30 HTTP/1.1
Host: s3.example.com
Date: Thu, 07 Apr 2016 14:08:55 GMT
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, 07 Apr 2016 14:08:56 GMT
Content-type : application/json