mc qos rule import
The mc qos rule import command imports a Quality of Service (QoS) configuration to a MinIO AIStor deployment from a YAML file.
The command reads the YAML configuration from standard input (STDIN).
For more information, see Bucket-level Quality of Service.
Syntax
The following command imports the QoS configuration from a file named qos.yaml to the mybucket bucket on the myaistor deployment:
mc qos rule import myaistor/mybucket < qos.yamlThe command has the following syntax:
mc [GLOBALFLAGS] qos rule import TARGET < /path/to/qos-config.yaml- Brackets
[]indicate optional parameters. - Parameters sharing a line are mutually dependent.
- Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
TARGET
Required
The alias and bucket to import the configuration to.
Global flags
This command supports any of the global flags.
Input format
The command expects a YAML file with the following structure:
version: v1
rules:
- id: rule1
api: s3.GetObject
objectPrefix: ""
priority: 1
rate: 100
burst: 50
limit: rps
label: "GetObject rate limit"
- id: rule2
api: s3.List*
objectPrefix: ""
priority: 2
rate: 50
burst: 0
limit: concurrency
label: ""Required fields
Each rule must include:
id- Unique rule identifierapi- API operationpriority- Priority levelrate- Rate limit valuelimit- Limit type (rpsorconcurrency)
Optional fields
objectPrefix- Object prefix patternburst- Burst limit. Required forrpstype, set to 0 or omit forconcurrencytypelabel- Descriptive label
Behavior
Configuration replacement
The import command replaces the entire QoS configuration on the target deployment. Any existing QoS rules are removed and replaced with the rules from the imported file.
Importing a QoS configuration replaces all existing rules. Export and back up your current configuration before importing to avoid data loss.
Validation
The command validates the YAML format and rule structure before applying the configuration. If the YAML is invalid or contains errors, the import fails and the existing configuration remains unchanged.
S3 compatibility
The mc command-line tool is built for compatibility with the AWS S3 API and is tested with MinIO AIStor and AWS S3 for expected functionality and behavior.
MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported.
While mc commands may work as documented, any such usage is at your own risk.
Permissions
You must have appropriate permissions on the deployment to import QoS configuration.