mc inventory generate

mc inventory generate creates a YAML-formatted template file for a new inventory configuration.

The command prints the template to STDOUT. Open the generated template in your preferred text editor to customize:

  • Destination bucket and prefix for output files
  • Schedule (once, hourly, daily, weekly, monthly, yearly)
  • Filters (by prefix, age, size, tags, metadata)
  • Output format (csv, json, parquet)
  • Output report fields

See the configuration reference for details on all available configuration options.

Syntax

Parameters

TARGET/BUCKET

Required

The full path to the bucket for which to generate an inventory configuration. Specify both the alias and bucket name in the format ALIAS/BUCKET.

ID

Required

The identifier for the inventory configuration. The ID must be unique within the bucket.

Valid characters include alphanumeric characters and hyphens. The ID must be between 1 and 63 characters in length.

Global flags

This command supports any of the global flags.

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:PutInventoryConfiguration permission for the specified bucket.

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