mc inventory get

mc inventory get retrieves an existing inventory configuration from a bucket.

The command displays the configuration details including the bucket name, configuration ID, owner, and the complete YAML definition.

Syntax

Parameters

TARGET/BUCKET

Required

The full path to the bucket containing the inventory configuration. Specify both the alias and bucket name in the format ALIAS/BUCKET.

ID

Required

The unique identifier of the inventory configuration to retrieve.

Global flags

This command supports any of the global flags.

Examples

Retrieve an inventory configuration

The following command retrieves an existing inventory configuration and saves it to a YAML file:

mc inventory get myaistor/mybucket weekly-inventory > weekly-inventory.yml
  • Replace myaistor with the alias of your AIStor deployment.
  • Replace mybucket with the name of the bucket.
  • Replace weekly-inventory with the inventory configuration ID.
  • Replace weekly-inventory.yml with the desired output file name.

The output displays the bucket, configuration ID, owner, and the complete YAML definition.

S3 compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with 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

The user or service account running this command must have the s3:GetInventoryConfiguration permission for the specified bucket.

For more information on AIStor policies and permissions, see Access Management.