Prerequisites
- Web console
- Nebius AI Cloud CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
Make sure that you have at least the following roles for the bucket, its parent project, or tenant:
storage.editorto create, modify, or delete inventory configurations.storage.uploaderfor the destination bucket, its parent project, or tenant, to use another bucket as the destination for reports.storage.viewerto view inventory configurations.
- Install and configure the Nebius AI Cloud CLI.
- Make sure that you have at least the following roles for the bucket, its parent project, or tenant:
storage.editorto create, modify, or delete inventory configurations.storage.uploaderfor the destination bucket, its parent project, or tenant, to use another bucket as the destination for reports.storage.viewerto view inventory configurations.
- Install and configure the Nebius AI Cloud provider for Terraform.
- Make sure that you have at least the following roles for the bucket, its parent project, or tenant:
storage.editorto create, modify, or delete inventory configurations.storage.uploaderfor the destination bucket, its parent project, or tenant, to use another bucket as the destination for reports.storage.viewerto view inventory configurations.
- Install and initialize the Nebius SDK for Go.
- Make sure that you have at least the following roles for the bucket, its parent project, or tenant:
storage.editorto create, modify, or delete inventory configurations.storage.uploaderfor the destination bucket, its parent project, or tenant, to use another bucket as the destination for reports.storage.viewerto view inventory configurations.
- Install and initialize the Nebius SDK for Python.
- Make sure that you have at least the following roles for the bucket, its parent project, or tenant:
storage.editorto create, modify, or delete inventory configurations.storage.uploaderfor the destination bucket, its parent project, or tenant, to use another bucket as the destination for reports.storage.viewerto view inventory configurations.
- Install and initialize the Nebius SDK for JavaScript.
- Make sure that you have at least the following roles for the bucket, its parent project, or tenant:
storage.editorto create, modify, or delete inventory configurations.storage.uploaderfor the destination bucket, its parent project, or tenant, to use another bucket as the destination for reports.storage.viewerto view inventory configurations.
How to create an inventory configuration
- Web console
- Nebius AI Cloud CLI
- Terraform
- Go SDK
- Python SDK
- JavaScript SDK
-
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.
-
Get the ID of the bucket where you want to create an inventory configuration:
export SOURCE_BUCKET_ID=$(nebius storage bucket get-by-name \ --name <source_bucket_name> \ --format jsonpath='{.metadata.id}') -
Get the ID of the bucket where Object Storage will deliver reports:
export DESTINATION_BUCKET_ID=$(nebius storage bucket get-by-name \ --name <destination_bucket_name> \ --format jsonpath='{.metadata.id}') -
Create an inventory configuration:
The command contains the following parameters:
nebius storage inventory create \ --parent-id $SOURCE_BUCKET_ID \ --name <configuration_name> \ --destination-bucket-id $DESTINATION_BUCKET_ID \ --destination-prefix <destination_prefix> \ --source-prefix <source_prefix> \ --schedule daily \ --output-format csv_gzip \ --enabled=true \ --noncurrent-versions=true \ --optional-fields "last_access,checksum_algorithms"--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:dailyorweekly.--output-format: Format and compression of report objects:csv_gziporparquet_snappy.--enabled: Enables report generation for the inventory configuration. Set it totruewhen you create a configuration that should start generating reports.--noncurrent-versions(optional): Includes noncurrent object versions in the report. Set it totrueif 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:
resource "nebius_storage_v1_inventory" "inventory" { parent_id = "<source_bucket_ID>" name = "<configuration_name>" destination_bucket_id = "<destination_bucket_ID>" destination_prefix = "<destination_prefix>" source_prefix = "<source_prefix>" schedule = "DAILY" output_format = "CSV_GZIP" enabled = true noncurrent_versions = true optional_fields = ["LAST_ACCESS", "CHECKSUM_ALGORITHMS"] }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:DAILYorWEEKLY.output_format: Format and compression of report objects:CSV_GZIPorPARQUET_SNAPPY.enabled: Enables report generation for the inventory configuration. Set it totruewhen you create a configuration that should start generating reports.noncurrent_versions(optional): Includes noncurrent object versions in the report. Set it totrueif 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:
terraform validate -
Apply the changes:
terraform apply
-
Get the ID of the bucket where you want to create an inventory configuration:
In the code, set
sourceService := sdk.Services().Storage().V1().Bucket() sourceBucket, err := sourceService.GetByName( ctx, &storage.GetBucketByNameRequest{ Name: "<source_bucket_name>", }, ) if err != nil { return err } fmt.Println(sourceBucket.GetMetadata().GetId())Nameto the bucket name. The code prints the bucket ID. -
Get the ID of the bucket where Object Storage will deliver reports:
In the code, set
destinationService := sdk.Services().Storage().V1(). Bucket() destinationBucket, err := destinationService.GetByName( ctx, &storage.GetBucketByNameRequest{ Name: "<destination_bucket_name>", }, ) if err != nil { return err } fmt.Println(destinationBucket.GetMetadata().GetId())Nameto the bucket name. The code prints the bucket ID. -
Create an inventory configuration:
In the code, set the following parameters:
createService := sdk.Services().Storage().V1(). Inventory() createOperation, err := createService.Create( ctx, &storage.CreateInventoryRequest{ Metadata: &common.ResourceMetadata{ Name: "<configuration_name>", ParentId: "<source_bucket_ID>", }, Spec: &storage.InventorySpec{ Enabled: true, SourcePrefix: "<source_prefix>", DestinationBucketId: "<destination_bucket_ID>", DestinationPrefix: "<destination_prefix>", OutputFormat: storage.InventorySpec_CSV_GZIP, NoncurrentVersions: true, OptionalFields: []storage.InventorySpec_OptionalField{ storage.InventorySpec_LAST_ACCESS, storage.InventorySpec_CHECKSUM_ALGORITHMS, }, Schedule: storage.InventorySpec_DAILY, }, }, ) if err != nil { return err } if _, err = createOperation.Wait(ctx); err != nil { return err }Metadata.Name: Configuration name.Metadata.ParentId: ID of the bucket where you create the inventory configuration.SourcePrefix: Prefix that filters source objects included in the report.DestinationBucketId: ID of the bucket where Object Storage delivers reports. The bucket must be in the same region as the source bucket.DestinationPrefix: Prefix that Object Storage adds to the keys of report objects.
Enabledtotrue,OutputFormattoInventorySpec_CSV_GZIP,NoncurrentVersionstotrue,OptionalFieldstoInventorySpec_LAST_ACCESSandInventorySpec_CHECKSUM_ALGORITHMS, andScheduletoInventorySpec_DAILY.
-
Get the ID of the bucket where you want to create an inventory configuration:
In the code, set
source_service = BucketServiceClient(sdk) source_bucket = await source_service.get_by_name( GetBucketByNameRequest(name="<source_bucket_name>"), ) print(source_bucket.metadata.id)nameto the bucket name. The code prints the bucket ID. -
Get the ID of the bucket where Object Storage will deliver reports:
In the code, set
destination_service = BucketServiceClient(sdk) destination_bucket = await destination_service.get_by_name( GetBucketByNameRequest( name="<destination_bucket_name>", ), ) print(destination_bucket.metadata.id)nameto the bucket name. The code prints the bucket ID. -
Create an inventory configuration:
In the code, set the following parameters:
create_service = InventoryServiceClient(sdk) create_operation = await create_service.create( CreateInventoryRequest( metadata=ResourceMetadata( name="<configuration_name>", parent_id="<source_bucket_ID>", ), spec=InventorySpec( enabled=True, source_prefix="<source_prefix>", destination_bucket_id="<destination_bucket_ID>", destination_prefix="<destination_prefix>", output_format=InventorySpec.OutputFormat.CSV_GZIP, noncurrent_versions=True, optional_fields=[ InventorySpec.OptionalField.LAST_ACCESS, InventorySpec.OptionalField.CHECKSUM_ALGORITHMS, ], schedule=InventorySpec.Schedule.DAILY, ), ), ) await create_operation.wait()metadata.name: Configuration name.metadata.parent_id: ID of the bucket where you create the inventory configuration.source_prefix: Prefix that filters source objects included in the report.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: Prefix that Object Storage adds to the keys of report objects.
enabledtoTrue,output_formattoInventorySpec.OutputFormat.CSV_GZIP,noncurrent_versionstoTrue,optional_fieldstoInventorySpec.OptionalField.LAST_ACCESSandInventorySpec.OptionalField.CHECKSUM_ALGORITHMS, andscheduletoInventorySpec.Schedule.DAILY.
-
Get the ID of the bucket where you want to create an inventory configuration:
In the code, set
const sourceService = new BucketService(sdk); const sourceBucket = await sourceService.getByName( GetBucketByNameRequest.create({ name: "<source_bucket_name>", }), ).result; console.log(sourceBucket.metadata?.id);nameto the bucket name. The code prints the bucket ID. -
Get the ID of the bucket where Object Storage will deliver reports:
In the code, set
const destinationService = new BucketService(sdk); const destinationBucket = await destinationService.getByName( GetBucketByNameRequest.create({ name: "<destination_bucket_name>", }), ).result; console.log(destinationBucket.metadata?.id);nameto the bucket name. The code prints the bucket ID. -
Create an inventory configuration:
In the code, set the following parameters:
const createService = new InventoryService(sdk); const createOperation = await createService.create( CreateInventoryRequest.create({ metadata: ResourceMetadata.create({ name: "<configuration_name>", parentId: "<source_bucket_ID>", }), spec: InventorySpec.create({ enabled: true, sourcePrefix: "<source_prefix>", destinationBucketId: "<destination_bucket_ID>", destinationPrefix: "<destination_prefix>", outputFormat: InventorySpec_OutputFormat.CSV_GZIP, noncurrentVersions: true, optionalFields: [ InventorySpec_OptionalField.LAST_ACCESS, InventorySpec_OptionalField.CHECKSUM_ALGORITHMS, ], schedule: InventorySpec_Schedule.DAILY, }), }), ).result; await createOperation.wait();metadata.name: Configuration name.metadata.parentId: ID of the bucket where you create the inventory configuration.sourcePrefix: Prefix that filters source objects included in the report.destinationBucketId: ID of the bucket where Object Storage delivers reports. The bucket must be in the same region as the source bucket.destinationPrefix: Prefix that Object Storage adds to the keys of report objects.
enabledtotrue,outputFormattoInventorySpec_OutputFormat.CSV_GZIP,noncurrentVersionstotrue,optionalFieldstoInventorySpec_OptionalField.LAST_ACCESSandInventorySpec_OptionalField.CHECKSUM_ALGORITHMS, andscheduletoInventorySpec_Schedule.DAILY.
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
- Go SDK
- Python SDK
- JavaScript SDK
- 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:
export SOURCE_BUCKET_ID=$(nebius storage bucket get-by-name \ --name <source_bucket_name> \ --format jsonpath='{.metadata.id}') -
List inventory configurations:
nebius storage inventory list --parent-id $SOURCE_BUCKET_ID -
To see all parameters of a specific configuration, get it by name:
nebius storage inventory get-by-name \ --parent-id $SOURCE_BUCKET_ID \ --name <configuration_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:
data "nebius_storage_v1_inventory" "inventory" { parent_id = "<source_bucket_ID>" name = "<configuration_name>" } output "inventory_configuration" { value = data.nebius_storage_v1_inventory.inventory } -
Check that the configuration is correct:
terraform validate -
Apply the changes:
terraform apply
-
Get the ID of the bucket whose inventory configurations you want to view:
In the code, set
sourceService := sdk.Services().Storage().V1().Bucket() sourceBucket, err := sourceService.GetByName( ctx, &storage.GetBucketByNameRequest{ Name: "<source_bucket_name>", }, ) if err != nil { return err } fmt.Println(sourceBucket.GetMetadata().GetId())Nameto the bucket name. The code prints the bucket ID. -
List inventory configurations:
In the code, set
listService := sdk.Services().Storage().V1().Inventory() inventories, err := listService.List( ctx, &storage.ListInventoriesRequest{ ParentId: "<source_bucket_ID>", }, ) if err != nil { return err } fmt.Println(inventories)ParentIdto the bucket ID. The code prints the list. -
To see all parameters of a specific configuration, get it by name:
In the code, set
getService := sdk.Services().Storage().V1().Inventory() inventory, err := getService.GetByName( ctx, &common.GetByNameRequest{ ParentId: "<source_bucket_ID>", Name: "<configuration_name>", }, ) if err != nil { return err } fmt.Println(inventory)ParentIdto the bucket ID andNameto the configuration name.Nameis the name you gave the configuration when you created it. The list from the previous step also shows this name. The code prints the configuration.
-
Get the ID of the bucket whose inventory configurations you want to view:
In the code, set
source_service = BucketServiceClient(sdk) source_bucket = await source_service.get_by_name( GetBucketByNameRequest(name="<source_bucket_name>"), ) print(source_bucket.metadata.id)nameto the bucket name. The code prints the bucket ID. -
List inventory configurations:
In the code, set
list_service = InventoryServiceClient(sdk) inventories = await list_service.list( ListInventoriesRequest(parent_id="<source_bucket_ID>"), ) print(inventories)parent_idto the bucket ID. The code prints the list. -
To see all parameters of a specific configuration, get it by name:
In the code, set
get_service = InventoryServiceClient(sdk) inventory = await get_service.get_by_name( GetByNameRequest( parent_id="<source_bucket_ID>", name="<configuration_name>", ), ) print(inventory)parent_idto the bucket ID andnameto the configuration name.nameis the name you gave the configuration when you created it. The list from the previous step also shows this name. The code prints the configuration.
-
Get the ID of the bucket whose inventory configurations you want to view:
In the code, set
const sourceService = new BucketService(sdk); const sourceBucket = await sourceService.getByName( GetBucketByNameRequest.create({ name: "<source_bucket_name>", }), ).result; console.log(sourceBucket.metadata?.id);nameto the bucket name. The code prints the bucket ID. -
List inventory configurations:
In the code, set
const listService = new InventoryService(sdk); const inventories = await listService.list( ListInventoriesRequest.create({ parentId: "<source_bucket_ID>", }), ).result; console.log(inventories);parentIdto the bucket ID. The code prints the list. -
To see all parameters of a specific configuration, get it by name:
In the code, set
const getService = new InventoryService(sdk); const inventory = await getService.getByName( GetByNameRequest.create({ parentId: "<source_bucket_ID>", name: "<configuration_name>", }), ).result; console.log(inventory);parentIdto the bucket ID andnameto the configuration name.nameis the name you gave the configuration when you created it. The list from the previous step also shows this name. The code prints the configuration.
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.- Web console
- AWS CLI
- 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
aws s3 cp \ s3://<destination_bucket_name>/<destination_prefix>/<bucket_name>/<configuration_name>/data/<inventory_file> \ <local/destination/path/>filesarray of themanifest.jsonfile. 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
- Go SDK
- Python SDK
- JavaScript SDK
- 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:
export SOURCE_BUCKET_ID=$(nebius storage bucket get-by-name \ --name <source_bucket_name> \ --format jsonpath='{.metadata.id}') -
Get the inventory configuration ID:
export INVENTORY_ID=$(nebius storage inventory get-by-name \ --parent-id $SOURCE_BUCKET_ID \ --name <configuration_name> \ --format jsonpath='{.metadata.id}') -
Update the inventory configuration:
In the command, add only the parameters that you want to change.
nebius storage inventory update \ --id $INVENTORY_ID \ --destination-prefix <new_destination_prefix> \ --schedule weekly \ --output-format parquet_snappy
-
In your Terraform configuration, change the arguments of the corresponding
nebius_storage_v1_inventoryresource. For example:resource "nebius_storage_v1_inventory" "inventory" { parent_id = "<source_bucket_ID>" name = "<configuration_name>" destination_bucket_id = "<destination_bucket_ID>" destination_prefix = "<new_destination_prefix>" source_prefix = "<source_prefix>" schedule = "WEEKLY" output_format = "PARQUET_SNAPPY" enabled = true noncurrent_versions = true optional_fields = ["LAST_ACCESS", "CHECKSUM_ALGORITHMS"] } -
Check that the configuration is correct:
terraform validate -
Apply the changes:
terraform apply
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
sourceService := sdk.Services().Storage().V1().Bucket() sourceBucket, err := sourceService.GetByName( ctx, &storage.GetBucketByNameRequest{ Name: "<source_bucket_name>", }, ) if err != nil { return err } fmt.Println(sourceBucket.GetMetadata().GetId())Nameto the bucket name. The code prints the bucket ID. -
Update the inventory configuration:
The sample gets the configuration by
updateService := sdk.Services().Storage().V1(). Inventory() updateInventory, err := updateService.GetByName( ctx, &common.GetByNameRequest{ ParentId: "<source_bucket_ID>", Name: "<configuration_name>", }, ) if err != nil { return err } updateInventory.Spec.DestinationPrefix = "<new_destination_prefix>" updateInventory.Spec.Schedule = storage.InventorySpec_WEEKLY updateInventory.Spec.OutputFormat = storage.InventorySpec_PARQUET_SNAPPY updateOperation, err := updateService.Update( ctx, &storage.UpdateInventoryRequest{ Metadata: updateInventory.Metadata, Spec: updateInventory.Spec, }, ) if err != nil { return err } if _, err = updateOperation.Wait(ctx); err != nil { return err }ParentIdandName, then changesDestinationPrefix,Schedule, andOutputFormat.Nameis the name you gave the configuration when you created it. Listing the configurations also shows this name. The example setsScheduletoInventorySpec_WEEKLYandOutputFormattoInventorySpec_PARQUET_SNAPPY. Other settings stay as they are on the configuration.
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
source_service = BucketServiceClient(sdk) source_bucket = await source_service.get_by_name( GetBucketByNameRequest(name="<source_bucket_name>"), ) print(source_bucket.metadata.id)nameto the bucket name. The code prints the bucket ID. -
Update the inventory configuration:
The sample gets the configuration by
update_service = InventoryServiceClient(sdk) update_inventory = await update_service.get_by_name( GetByNameRequest( parent_id="<source_bucket_ID>", name="<configuration_name>", ), ) update_inventory.spec.destination_prefix = ( "<new_destination_prefix>" ) update_inventory.spec.schedule = InventorySpec.Schedule.WEEKLY update_inventory.spec.output_format = ( InventorySpec.OutputFormat.PARQUET_SNAPPY ) update_operation = await update_service.update( UpdateInventoryRequest( metadata=update_inventory.metadata, spec=update_inventory.spec, ), ) await update_operation.wait()parent_idandname, then changesdestination_prefix,schedule, andoutput_format.nameis the name you gave the configuration when you created it. Listing the configurations also shows this name. The example setsscheduletoInventorySpec.Schedule.WEEKLYandoutput_formattoInventorySpec.OutputFormat.PARQUET_SNAPPY. Other settings stay as they are on the configuration.
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
const sourceService = new BucketService(sdk); const sourceBucket = await sourceService.getByName( GetBucketByNameRequest.create({ name: "<source_bucket_name>", }), ).result; console.log(sourceBucket.metadata?.id);nameto the bucket name. The code prints the bucket ID. -
Update the inventory configuration:
The sample gets the configuration by
const updateService = new InventoryService(sdk); const updateInventory = await updateService.getByName( GetByNameRequest.create({ parentId: "<source_bucket_ID>", name: "<configuration_name>", }), ).result; updateInventory.spec.destinationPrefix = "<new_destination_prefix>"; updateInventory.spec.schedule = InventorySpec_Schedule.WEEKLY; updateInventory.spec.outputFormat = InventorySpec_OutputFormat.PARQUET_SNAPPY; const updateOperation = await updateService.update( UpdateInventoryRequest.create({ metadata: updateInventory.metadata, spec: updateInventory.spec, }), ).result; await updateOperation.wait();parentIdandname, then changesdestinationPrefix,schedule, andoutputFormat.nameis the name you gave the configuration when you created it. Listing the configurations also shows this name. The example setsscheduletoInventorySpec_Schedule.WEEKLYandoutputFormattoInventorySpec_OutputFormat.PARQUET_SNAPPY. Other settings stay as they are on the configuration.
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
- Go SDK
- Python SDK
- JavaScript SDK
-
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:
export SOURCE_BUCKET_ID=$(nebius storage bucket get-by-name \ --name <source_bucket_name> \ --format jsonpath='{.metadata.id}') -
Get the inventory configuration ID:
export INVENTORY_ID=$(nebius storage inventory get-by-name \ --parent-id $SOURCE_BUCKET_ID \ --name <configuration_name> \ --format jsonpath='{.metadata.id}') -
Run one of the following commands:
-
To stop generating reports:
nebius storage inventory update \ --id $INVENTORY_ID \ --enabled=false -
To resume generating reports:
nebius storage inventory update \ --id $INVENTORY_ID \ --enabled=true
-
To stop generating reports:
-
In the corresponding
nebius_storage_v1_inventoryresource, change theenabledargument:-
To stop generating reports, set
enabledtofalse:resource "nebius_storage_v1_inventory" "inventory" { parent_id = "<source_bucket_ID>" name = "<configuration_name>" destination_bucket_id = "<destination_bucket_ID>" destination_prefix = "<destination_prefix>" source_prefix = "<source_prefix>" schedule = "DAILY" output_format = "CSV_GZIP" enabled = false noncurrent_versions = true optional_fields = ["LAST_ACCESS", "CHECKSUM_ALGORITHMS"] } -
To resume generating reports, set
enabledtotrue:resource "nebius_storage_v1_inventory" "inventory" { parent_id = "<source_bucket_ID>" name = "<configuration_name>" destination_bucket_id = "<destination_bucket_ID>" destination_prefix = "<destination_prefix>" source_prefix = "<source_prefix>" schedule = "DAILY" output_format = "CSV_GZIP" enabled = true noncurrent_versions = true optional_fields = ["LAST_ACCESS", "CHECKSUM_ALGORITHMS"] }
-
To stop generating reports, set
-
Check that the configuration is correct:
terraform validate -
Apply the changes:
terraform apply
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
sourceService := sdk.Services().Storage().V1().Bucket() sourceBucket, err := sourceService.GetByName( ctx, &storage.GetBucketByNameRequest{ Name: "<source_bucket_name>", }, ) if err != nil { return err } fmt.Println(sourceBucket.GetMetadata().GetId())Nameto the bucket name. The code prints the bucket ID.
ParentId and Name. Name is the name you gave the configuration when you created it. Listing the configurations also shows this name.-
To stop generating reports, set
Enabledtofalse:stopService := sdk.Services().Storage().V1().Inventory() stopInventory, err := stopService.GetByName( ctx, &common.GetByNameRequest{ ParentId: "<source_bucket_ID>", Name: "<configuration_name>", }, ) if err != nil { return err } stopInventory.Spec.Enabled = false stopOperation, err := stopService.Update( ctx, &storage.UpdateInventoryRequest{ Metadata: stopInventory.Metadata, Spec: stopInventory.Spec, }, ) if err != nil { return err } if _, err = stopOperation.Wait(ctx); err != nil { return err } -
To resume generating reports, set
Enabledtotrue:resumeService := sdk.Services().Storage().V1().Inventory() resumeInventory, err := resumeService.GetByName( ctx, &common.GetByNameRequest{ ParentId: "<source_bucket_ID>", Name: "<configuration_name>", }, ) if err != nil { return err } resumeInventory.Spec.Enabled = true resumeOperation, err := resumeService.Update( ctx, &storage.UpdateInventoryRequest{ Metadata: resumeInventory.Metadata, Spec: resumeInventory.Spec, }, ) if err != nil { return err } if _, err = resumeOperation.Wait(ctx); err != nil { return err }
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
source_service = BucketServiceClient(sdk) source_bucket = await source_service.get_by_name( GetBucketByNameRequest(name="<source_bucket_name>"), ) print(source_bucket.metadata.id)nameto the bucket name. The code prints the bucket ID.
parent_id and name. name is the name you gave the configuration when you created it. Listing the configurations also shows this name.-
To stop generating reports, set
enabledtoFalse:stop_service = InventoryServiceClient(sdk) stop_inventory = await stop_service.get_by_name( GetByNameRequest( parent_id="<source_bucket_ID>", name="<configuration_name>", ), ) stop_inventory.spec.enabled = False stop_operation = await stop_service.update( UpdateInventoryRequest( metadata=stop_inventory.metadata, spec=stop_inventory.spec, ), ) await stop_operation.wait() -
To resume generating reports, set
enabledtoTrue:resume_service = InventoryServiceClient(sdk) resume_inventory = await resume_service.get_by_name( GetByNameRequest( parent_id="<source_bucket_ID>", name="<configuration_name>", ), ) resume_inventory.spec.enabled = True resume_operation = await resume_service.update( UpdateInventoryRequest( metadata=resume_inventory.metadata, spec=resume_inventory.spec, ), ) await resume_operation.wait()
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
const sourceService = new BucketService(sdk); const sourceBucket = await sourceService.getByName( GetBucketByNameRequest.create({ name: "<source_bucket_name>", }), ).result; console.log(sourceBucket.metadata?.id);nameto the bucket name. The code prints the bucket ID.
parentId and name. name is the name you gave the configuration when you created it. Listing the configurations also shows this name.-
To stop generating reports, set
enabledtofalse:const stopService = new InventoryService(sdk); const stopInventory = await stopService.getByName( GetByNameRequest.create({ parentId: "<source_bucket_ID>", name: "<configuration_name>", }), ).result; stopInventory.spec.enabled = false; const stopOperation = await stopService.update( UpdateInventoryRequest.create({ metadata: stopInventory.metadata, spec: stopInventory.spec, }), ).result; await stopOperation.wait(); -
To resume generating reports, set
enabledtotrue:const resumeService = new InventoryService(sdk); const resumeInventory = await resumeService.getByName( GetByNameRequest.create({ parentId: "<source_bucket_ID>", name: "<configuration_name>", }), ).result; resumeInventory.spec.enabled = true; const resumeOperation = await resumeService.update( UpdateInventoryRequest.create({ metadata: resumeInventory.metadata, spec: resumeInventory.spec, }), ).result; await resumeOperation.wait();
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
- Go SDK
- Python SDK
- JavaScript SDK
- 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:
export SOURCE_BUCKET_ID=$(nebius storage bucket get-by-name \ --name <source_bucket_name> \ --format jsonpath='{.metadata.id}') -
Get the inventory configuration ID:
export INVENTORY_ID=$(nebius storage inventory get-by-name \ --parent-id $SOURCE_BUCKET_ID \ --name <configuration_name> \ --format jsonpath='{.metadata.id}') -
Delete the inventory configuration:
nebius storage inventory delete --id $INVENTORY_ID
- Remove the corresponding
nebius_storage_v1_inventoryresource from the Terraform configuration. - Check that the configuration is correct:
terraform validate - Apply the changes:
terraform apply
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
sourceService := sdk.Services().Storage().V1().Bucket() sourceBucket, err := sourceService.GetByName( ctx, &storage.GetBucketByNameRequest{ Name: "<source_bucket_name>", }, ) if err != nil { return err } fmt.Println(sourceBucket.GetMetadata().GetId())Nameto the bucket name. The code prints the bucket ID. -
Delete the inventory configuration:
The sample gets the configuration by
deleteService := sdk.Services().Storage().V1().Inventory() deleteInventory, err := deleteService.GetByName( ctx, &common.GetByNameRequest{ ParentId: "<source_bucket_ID>", Name: "<configuration_name>", }, ) if err != nil { return err } deleteOperation, err := deleteService.Delete( ctx, &storage.DeleteInventoryRequest{ Id: deleteInventory.GetMetadata().GetId(), }, ) if err != nil { return err } if _, err = deleteOperation.Wait(ctx); err != nil { return err }ParentIdandName, then deletes it by the ID from that response.Nameis the name you gave the configuration when you created it. Listing the configurations also shows this name.
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
source_service = BucketServiceClient(sdk) source_bucket = await source_service.get_by_name( GetBucketByNameRequest(name="<source_bucket_name>"), ) print(source_bucket.metadata.id)nameto the bucket name. The code prints the bucket ID. -
Delete the inventory configuration:
The sample gets the configuration by
delete_service = InventoryServiceClient(sdk) delete_inventory = await delete_service.get_by_name( GetByNameRequest( parent_id="<source_bucket_ID>", name="<configuration_name>", ), ) delete_operation = await delete_service.delete( DeleteInventoryRequest(id=delete_inventory.metadata.id), ) await delete_operation.wait()parent_idandname, then deletes it by the ID from that response.nameis the name you gave the configuration when you created it. Listing the configurations also shows this name.
-
Get the ID of the bucket where the inventory configuration is created:
In the code, set
const sourceService = new BucketService(sdk); const sourceBucket = await sourceService.getByName( GetBucketByNameRequest.create({ name: "<source_bucket_name>", }), ).result; console.log(sourceBucket.metadata?.id);nameto the bucket name. The code prints the bucket ID. -
Delete the inventory configuration:
The sample gets the configuration by
const deleteService = new InventoryService(sdk); const deleteInventory = await deleteService.getByName( GetByNameRequest.create({ parentId: "<source_bucket_ID>", name: "<configuration_name>", }), ).result; const deleteOperation = await deleteService.delete( DeleteInventoryRequest.create({ id: deleteInventory.metadata.id, }), ).result; await deleteOperation.wait();parentIdandname, then deletes it by the ID from that response.nameis the name you gave the configuration when you created it. Listing the configurations also shows this name.