Prerequisites
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
- Install and configure the Nebius AI Cloud CLI.
- Make sure you are in a group that has the
adminorauditlogs.audit-event-exporterrole within your tenant. You can check this in the Administration → IAM section of the web console. - Make sure that you have the
storage.uploaderrole for the destination Object Storage bucket. - Identify the regions to export audit events from.
How to export events
-
Copy the ID of the tenant you want to export events for:
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
List the tenants:Copy the tenant ID from the output. - Select an existing bucket or create a new one in the region you export events from — the destination bucket must be in the same region as the events. Copy the bucket ID.
-
Start an export:
The export continues running in the background.
- CLI
- Go SDK
- Python SDK
- JavaScript SDK
In the command above, specify:--parent-id: Tenant ID that you copied earlier.--params-from: Start time for the export, in the ISO 8601 format.--params-to: End time for the export, in the ISO 8601 format.--region: Region to export audit events from.--nebius-object-storage-bucket-by-id-id: Destination bucket ID that you copied earlier. The bucket must be in the same region as the exported events.--params-event-type(optional): Type of audit event to export:control_planeordata_plane. Default:control_plane.- Control plane events (default): Track management operations on resources, such as creating, updating, or deleting virtual machines, clusters, or other infrastructure resources.
- Data plane events: Track data access operations, such as reading or writing objects in Object Storage buckets.
--nebius-object-storage-object-prefix(optional): Object prefix. If you omit it, theauditlogsprefix is used by default.--params-filter(optional): Filter expression to narrow down exported events. For more information, see How to filter audit events.
How to check the status of an export
To check the current state and parameters of an export, get it by ID. Get the export ID by listing exports.- CLI
- Go SDK
- Python SDK
- JavaScript SDK
--id to the export ID.RUNNING, DONE, FAILED and CANCELED.
How to list exports
To find a specific export, list all exports created for a tenant:- CLI
- Go SDK
- Python SDK
- JavaScript SDK
--parent-id: Tenant ID that you copied earlier.--region: Region where you started the export.
How to download exported events
After an export reaches theDONE state, the exported audit events are available as objects in the destination bucket. To download these objects to your local machine for data portability or local storage:
-
View the objects in the bucket to find the exported files. The objects are stored under the prefix that you specified when you launched the export, or under the default
auditlogsprefix. -
Download the objects from the bucket to your local machine. You can download a single object or all objects with a specific prefix.
For example, to download all exported audit events with the default
auditlogsprefix:Replace<bucket_name>with the name of the destination bucket and<local_destination_path>with the directory on your machine.
How to cancel an export
To stop an active export, cancel it by ID. Use the export ID from the list of exports.- CLI
- Go SDK
- Python SDK
- JavaScript SDK
--id to the export ID.CANCELED state. Data that is already written to the bucket is preserved.