API-level commands provide direct access to OSS API operations.
An OSS API request includes an API operation name and parameters: bucket name, object key, header parameters, query parameters, and body parameters.
-
API operation name: Each API operation maps to a command named after the operation in lowercase with hyphens (-).
For example, PutBucketAcl becomes put-bucket-acl. All available operations are listed in the API overview.
-
API parameters
API parameter
Option name
Description
Bucket name
--bucket string
The bucket name.
Key name
--key string
The key name.
Header parameters
--acl string
Each header maps to an option named after the header in lowercase, without the x-oss- prefix.
Example: x-oss-acl maps to --acl.
Query parameters
--inventory-id string
Each query parameter maps to an option. Convert the lowerCamelCase name to lowercase with hyphens (-). Example: inventoryId becomes --inventory-id.
Body parameters
--cors-configuration string
All body parameters use a single option.
-
The option name is the XML root node name in lowercase with hyphens.
-
The value is a string. Use the file:// prefix to specify a file path.
-
Values support XML and JSON formats.
-