Export audit logs manually
This Pulumi Cloud feature is available in the Enterprise and Business Critical editions.
Pull a range of audit log events on demand, without configuring a destination first. Use this for an ad hoc investigation or a one-time archive. To deliver events continuously instead, see Export audit logs.
Export from the console
To export audit logs using the console:
- Navigate to the organization’s Settings.
- Navigate to Audit Logs.
- Select Download.
Export using the CLI
The Pulumi CLI can read and export audit log events without leaving your terminal:
# Print recent events
pulumi org audit-log list --org <org-name>
# Write a CSV export to a file
pulumi org audit-log export --org <org-name> --format csv > audit-logs.csv
export accepts csv (the default) or cef for --format, and narrows the result with --event-type, --user, and --start-time. Passing --output json wraps the response body in a JSON envelope with the format and base64-encoded data, which is easier to consume from a script.
pulumi org audit-log is marked experimental, so its flags may change. See pulumi org audit-log for the full command reference.Export using the REST API
See Pulumi Cloud REST API for full details of the API endpoint to export audit log events. This API is rate-limited and only intended for occasional use. If you need frequent export, use automated export instead.
Learn more
- Audit log formats — the fields each of the JSON, CSV, and CEF export formats carries.