2.5. PUT Service ostor-limits

2.5.1. Description

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

2.5.2. Requests

2.5.2.1. Syntax

PUT /?ostor-limits&emailAddress=<value> HTTP/1.1
Host: s3.amazonaws.com
Date: <date>
Authorization: <authorization_string>
GET /?ostor-limits&bucket=<value> HTTP/1.1
Host: s3.amazonaws.com
Date: <date>
Authorization: <authorization_string>

2.5.2.2. 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.

Note

Zero limit value means “unlimited”.

2.5.2.3. Headers

This implementation uses only common request headers.

2.5.3. Responses

2.5.3.1. Headers

This implementation uses only common response headers.

2.5.3.2. Body

Empty.

2.5.3.3. Errors

Returns Error Code 400, if a wrong set of parameters is specified.

2.5.4. Examples

2.5.4.1. 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.amazonaws.com
Date: Thu, 07 Apr 2016 14:08:55 GMT
Authorization: <authorization_string>

2.5.4.2. 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

2.5.4.3. 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.amazonaws.com
Date: Thu, 07 Apr 2016 14:08:55 GMT
Authorization: <authorization_string>

2.5.4.4. 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

2.5.4.5. 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.amazonaws.com
Date: Thu, 07 Apr 2016 14:08:55 GMT
Authorization: <authorization_string>

2.5.4.6. 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

2.5.4.7. 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.amazonaws.com
Date: Thu, 07 Apr 2016 14:08:55 GMT
Authorization: <authorization_string>

2.5.4.8. 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