Create a bucket inventory configuration to get scheduled reports on the contents of a bucket. You can create up to five configurations for the same bucket and temporarily disable report generation without deleting the configuration when needed.
Prerequisites
Web console
Nebius AI Cloud CLI
Terraform
- To create, modify or delete inventory configurations, make sure that you have at least the
storage.editor role for the bucket, its parent project or tenant.
- To use another bucket as the destination for reports, make sure that you have at least the
storage.uploader role for the destination bucket, its parent project or tenant.
- To view inventory configurations, make sure that you have at least the
storage.viewer role for the bucket, its parent project or tenant.
- Install and configure the Nebius AI Cloud CLI.
- To create, modify or delete inventory configurations, make sure that you have at least the
storage.editor role for the bucket, its parent project or tenant.
- To use another bucket as the destination for reports, make sure that you have at least the
storage.uploader role for the destination bucket, its parent project or tenant.
- To view inventory configurations, make sure that you have at least the
storage.viewer role for the bucket, its parent project or tenant.
- Install and configure the Nebius AI Cloud provider for Terraform.
- To create, modify or delete inventory configurations, make sure that you have at least the
storage.editor role for the bucket, its parent project or tenant.
- To use another bucket as the destination for reports, make sure that you have at least the
storage.uploader role for the destination bucket, its parent project or tenant.
- To view inventory configurations, make sure that you have at least the
storage.viewer role for the bucket, its parent project or tenant.
How to create an inventory configuration
Web console
Nebius AI Cloud CLI
Terraform
-
In the sidebar, go to
Storage → Object Storage.
-
Open the page of the bucket where you want to create an inventory configuration.
-
Click Add → Inventory configuration.
-
Set the inventory configuration parameters:
-
Name: Name of the configuration. Object Storage uses it both in the list of configurations and in the keys of report objects.
-
(Optional) Source prefix: Prefix that filters source objects included in the report. The report only contains objects whose keys start with this prefix.
-
Project: Project that contains the bucket where Object Storage delivers the reports.
-
Bucket: Bucket where Object Storage delivers the reports. You can select the current bucket or a different one in the same region.
-
(Optional) Destination prefix: Prefix that Object Storage adds to the keys of report objects. For example,
test_dir/. Use it to keep reports separate from other objects in the destination bucket.
-
Schedule: How often Object Storage generates a report — Daily or Weekly. For details, see How Object Storage generates reports.
-
Output format: Format and compression of report objects:
- CSV compressed with GZIP
- Apache Parquet compressed with Snappy
-
Object versions: Whether a report lists only the current version of every object (Current version only) or all its versions (Include all versions).
-
Optional metadata fields to export: Additional object metadata that Object Storage can include in a report. For more information, see What a report contains.
-
Click Create.
The configuration will appear on the Inventory configuration tab of the bucket and become active.
-
Get the ID of the bucket where you want to create an inventory configuration:
-
Get the ID of the bucket where Object Storage will deliver reports:
-
Create an inventory configuration:
The command contains the following parameters:
--parent-id: ID of the bucket where you create the inventory configuration.
--destination-bucket-id: ID of the bucket where Object Storage delivers reports. The bucket must be in the same region as the source bucket.
--destination-prefix (optional): Prefix that Object Storage adds to the keys of report objects.
--source-prefix (optional): Prefix that filters source objects included in the report.
--schedule: How often Object Storage generates a report: daily or weekly.
--output-format: Format and compression of report objects: csv_gzip or parquet_snappy.
--enabled: Enables report generation for the inventory configuration. Set it to true when you create a configuration that should start generating reports.
--noncurrent-versions (optional): Includes noncurrent object versions in the report. Set it to true if you want the report to include all object versions. The bucket must have versioning enabled.
--optional-fields (optional): Additional object metadata fields to include in the report. The example exports the last access time and checksum algorithms.
-
Add an inventory configuration to your Terraform configuration:
The configuration contains the following arguments:
parent_id: ID of the bucket where you create the inventory configuration.
destination_bucket_id: ID of the bucket where Object Storage delivers reports. The bucket must be in the same region as the source bucket.
destination_prefix (optional): Prefix that Object Storage adds to the keys of report objects.
source_prefix (optional): Prefix that filters source objects included in the report.
schedule: How often Object Storage generates a report: DAILY or WEEKLY.
output_format: Format and compression of report objects: CSV_GZIP or PARQUET_SNAPPY.
enabled: Enables report generation for the inventory configuration. Set it to true when you create a configuration that should start generating reports.
noncurrent_versions (optional): Includes noncurrent object versions in the report. Set it to true if you want the report to include all object versions. The bucket must have versioning enabled.
optional_fields (optional): Additional object metadata fields to include in the report. The example exports the last access time and checksum algorithms.
-
Check that the configuration is correct:
-
Apply the changes:
To report on all object versions, enable versioning in the bucket where you want to create an inventory configuration. Otherwise, the report will only list current versions.
How to view inventory configurations
Web console
Nebius AI Cloud CLI
Terraform
- In the sidebar, go to
Storage → Object Storage.
- Open the page of the bucket where you want to view inventory configurations.
- Go to the Inventory configuration tab.
- To see all parameters of a specific configuration, open its page.
-
Get the ID of the bucket whose inventory configurations you want to view:
-
List inventory configurations:
-
To see all parameters of a specific configuration, get it by name:
With Terraform, you can retrieve a specific inventory configuration by name or ID. The following example shows how to retrieve it by name.
-
Add a data source for the inventory configuration:
-
Check that the configuration is correct:
-
Apply the changes:
How to get a report
Object Storage delivers reports as regular objects, so you work with them as with any other objects in a bucket. Reports are always compressed.
A complete report can consist of multiple objects. To get the complete report, download every object listed in the files array of the manifest.json file.
- In the sidebar, go to
Storage → Object Storage.
- Open the page of the destination bucket that you set in the configuration.
- Find the report objects you need. Object Storage stores them under the
<destination_prefix>/<bucket_name>/<configuration_name>/data/ prefix, where <bucket_name> is the bucket that you analyze. For more information, see Where Object Storage delivers reports.
- Download the report objects.
-
Make sure that the AWS CLI is configured to work with Object Storage.
-
Download a report object:
Repeat this command for every object listed in the
files array of the manifest.json file.
For more information about downloading objects, see Uploading and downloading objects in Object Storage.
To make sure that the report is complete, compare each report object’s checksum with the corresponding checksum in the manifest.json file.
How to modify an inventory configuration
Web console
Nebius AI Cloud CLI
Terraform
- In the sidebar, go to
Storage → Object Storage.
- Open the page of the bucket where you want to modify an inventory configuration.
- Go to the Inventory configuration tab.
- Next to the configuration that you want to modify, click
→ Edit.
- Change the inventory configuration parameters and click Save changes.
-
Get the ID of the bucket where the inventory configuration is created:
-
Get the inventory configuration ID:
-
Update the inventory configuration:
In the command, add only the parameters that you want to change.
-
In your Terraform configuration, change the arguments of the corresponding
nebius_storage_v1_inventory resource. For example:
-
Check that the configuration is correct:
-
Apply the changes:
Your changes will apply to the reports generated after the configuration change. Reports delivered earlier remain unchanged.
How to stop or resume an inventory configuration
Stop a configuration when you no longer need new reports but want to keep the configuration.
Web console
Nebius AI Cloud CLI
Terraform
-
In the sidebar, go to
Storage → Object Storage.
-
Open the page of the bucket where you want to stop or resume an inventory configuration.
-
Go to the Inventory configuration tab.
-
Next to the configuration you want to stop or resume, click
and then select one of the following:
- Stop: Object Storage stops generating reports, and the configuration status changes to Stopped.
- Resume: Object Storage resumes report generation according to the configuration schedule. It doesn’t generate a report immediately.
-
Get the ID of the bucket where the inventory configuration is created:
-
Get the inventory configuration ID:
-
Run one of the following commands:
-
To stop generating reports:
-
To resume generating reports:
-
In the corresponding
nebius_storage_v1_inventory resource, change the enabled argument:
-
To stop generating reports, set
enabled to false:
-
To resume generating reports, set
enabled to true:
-
Check that the configuration is correct:
-
Apply the changes:
How to delete an inventory configuration
Deleting an inventory configuration is permanent. To keep a configuration but stop generating new reports, stop it instead.
Web console
Nebius AI Cloud CLI
Terraform
- In the sidebar, go to
Storage → Object Storage.
- Open the page of the bucket where you want to delete an inventory configuration.
- Go to the Inventory configuration tab.
- Next to the configuration you want to delete, click
→ Delete.
- Enter the inventory configuration name and click Delete inventory configuration.
-
Get the ID of the bucket where the inventory configuration is created:
-
Get the inventory configuration ID:
-
Delete the inventory configuration:
- Remove the corresponding
nebius_storage_v1_inventory resource from the Terraform configuration.
- Check that the configuration is correct:
- Apply the changes:
Object Storage doesn’t delete the reports that it has already delivered to the destination bucket. To remove them, delete these objects or configure lifecycle rules for them.