Managing S3 user limits
You can define limits for S3 users to limit operations per second and outgoing bandwidth of a response per user. You can apply limits to a particular S3 user or all S3 users within a domain. By default, all S3 user limits are set to zero, which means "unlimited".
To set limits for a particular S3 user
Use the following command:
vinfra service s3 self-service user limits add [--domain <domain>] [--user <user>] --limit-type <limit_type> --limits <limits>
--domain <domain>
- Domain name or ID
--user <user>
- Domain user name or ID
--limit-type <limit_type>
- Limit type: operations per second (
ops
), in ops/s, or outgoing bandwidth (bandwidth
), in kb/s --limits <limits>
-
Limits expressions:
- Operations per second: {
default=<value>
|put=<value>
|get=<value>
|list=<value
> |delete=<value>
} - Bandwidth: {
out=<value>
}
- Operations per second: {
For example, to limit GET operations to 500 ops/s and PUT operations to 200 ops/s for the S3 user user1
in the domain domain1
, run:
# vinfra service s3 self-service user limits add --domain domain1 --user user1 --limit-type ops --limits get=500,put=200
You can check the applied S3 limits in the vinfra service s3 self-service user limits get
output:
# vinfra service s3 self-service user limits get --domain domain1 --user user1 +---------------+-------------------+ | Field | Value | +---------------+-------------------+ | bandwidth | - name: out | | | unit: kbs/s | | | value: '0' | | ops | - name: default | | | unit: ops/s | | | value: '0.00' | | | - name: get | | | unit: ops/s | | | value: '500.00' | | | - name: put | | | unit: ops/s | | | value: '200.00' | | | - name: list | | | unit: ops/s | | | value: '0.00' | | | - name: delete | | | unit: ops/s | | | value: '0.00' | | resource_name | fef81edf9cbf754b | | resource_type | user | +---------------+-------------------+
To remove limits for a particular S3 user
Use the following command:
vinfra service s3 self-service user limits remove [--domain <domain>] [--user <user] --limit-type <limit_type>
--domain <domain>
- Domain name or ID
--user <user>
- Domain user name or ID
--limit-type <limit_type>
- Limit type: operations per second (
ops
) or outgoing bandwidth (bandwidth
)
For example, to remove bandwidth limits for the S3 user user1
in the domain domain1
, run:
# vinfra service s3 self-service user limits remove --domain domain1 --user user1 --limit-type bandwidth
To set limits for S3 users within a domain
Use the following command:
vinfra service s3 self-service domain limits add [--domain <domain>] --limit-type <limit_type> --limits <limits>
--domain <domain>
- Domain name or ID
--limit-type <limit_type>
- Limit type: operations per second (
ops
), in ops/s, or outgoing bandwidth (bandwidth
), in kb/s --limits <limits>
-
Limits expressions:
- Operations per second: {
default=<value>
|put=<value>
|get=<value>
|list=<value
> |delete=<value>
} - Bandwidth: {
out=<value>
}
- Operations per second: {
For example, to limit all operations to 500 ops/s for all S3 users in the domain domain1
, run:
# vinfra service s3 self-service domain limits add --domain domain1 --limit-type ops --limits default=500
You can check the applied S3 limits in the vinfra service s3 self-service domain limits get
output:
# vinfra service s3 self-service domain limits get --domain domain1 +---------------+----------------------------------+ | Field | Value | +---------------+----------------------------------+ | bandwidth | - name: out | | | unit: kbs/s | | | value: '0' | | ops | - name: default | | | unit: ops/s | | | value: '500.00' | | | - name: get | | | unit: ops/s | | | value: '500.00' | | | - name: put | | | unit: ops/s | | | value: '500.00' | | | - name: list | | | unit: ops/s | | | value: '500.00' | | | - name: delete | | | unit: ops/s | | | value: '500.00' | | resource_name | dff4158faaa848ac92b7284fc011b72f | | resource_type | organization | +---------------+----------------------------------+
To remove limits for S3 users within a domain
Use the following command:
vinfra service s3 self-service domain limits remove [--domain <domain] --limit-type <limit_type>
--domain <domain>
- Domain name or ID
--limit-type <limit_type>
- Limit type: operations per second (
ops
), in ops/s, or outgoing bandwidth (bandwidth
), in kb/s
For example, to remove bandwidth limits for all S3 users in the domain domain1
, run:
# vinfra service s3 self-service domain limits remove --domain domain1 --limit-type bandwidth