Managing S3 user quotas

You can define quotas for S3 users to limit object storage usage per user. You can apply quotas to a particular S3 user or all S3 users within a domain. It is also possible to set the default quotas that will be applied to all S3 users in the cluster. By default, all S3 user quotas are set to zero, which means "unlimited".

To set quotas for a particular S3 user

Use the following command:

vinfra service s3 self-service user quotas add [--domain <domain>] [--user <user>] --quotas <quotas>
--domain <domain>
Domain name or ID
--user <user>
Domain user name or ID
--quotas <quotas>
Quota size, in GB

For example, to set the quota size to 100 GB for the S3 user user1 in the domain domain1, run:

# vinfra service s3 self-service user quotas add --domain domain1 --user user1 --quotas 100

You can check the applied S3 quotas in the vinfra service s3 self-service user quotas get output:

# vinfra service s3 self-service user quotas get --domain domain1 --user user1
+---------------+------------------+
| Field         | Value            |
+---------------+------------------+
| resource_name | fef81edf9cbf754b |
| resource_type | user             |
| size          | 100              |
| units         | GB               |
+---------------+------------------+

To remove quotas for a particular S3 user

Use the following command:

vinfra service s3 self-service user quotas remove [--domain <domain>] [--user <user>]
--domain <domain>
Domain name or ID
--user <user>
Domain user name or ID

For example, to remove quotas for the S3 user user1 in the domain domain1, run:

# vinfra service s3 self-service user quotas remove --domain domain1 --user user1

To set quotas for S3 users within a domain

Use the following command:

vinfra service s3 self-service domain quotas add [--domain <domain>] --quotas <quotas>
--domain <domain>
Domain name or ID
--quotas <quotas>
Quota size, in GB

For example, to set the quota size to 100 GB for all S3 users in the domain domain1, run:

# vinfra service s3 self-service domain quotas add --domain domain1 --quotas 100

You can check the applied S3 quotas in the vinfra service s3 self-service domain quotas get output:

# vinfra service s3 self-service domain quotas get --domain domain1
+---------------+----------------------------------+
| Field         | Value                            |
+---------------+----------------------------------+
| resource_name | dff4158faaa848ac92b7284fc011b72f |
| resource_type | organization                     |
| size          | 100                              |
| units         | GB                               |
+---------------+----------------------------------+

To remove quotas for S3 users within a domain

Use the following command:

vinfra service s3 self-service domain quotas remove [--domain <domain>]
--domain <domain>
Domain name or ID

For example, to remove quotas for all S3 users in the domain domain1, run:

# vinfra service s3 self-service domain quotas remove --domain domain1

To set the default S3 user quotas

Use the following command:

vinfra service s3 users default-quotas add --quota-size <quota_size>
--quota-size <quota_size>
Quota size, in GB

For example, to set the default quota size to 100 GB for all S3 users in the cluster, run:

# vinfra service s3 users default-quotas add --quota-size 100

You can check the default quotas in the vinfra service s3 users default-quotas get output:

# vinfra service s3 users default-quotas get
+---------------+-------+
| Field         | Value |
+---------------+-------+
| resource_type | user  |
| size          | 100   |
| units         | GB    |
+---------------+-------+

To remove the default S3 user quotas

Use the following command:

vinfra service s3 users default-quotas remove

For example, to remove the default quota size for all S3 users in the cluster, run:

# vinfra service s3 users default-quotas remove