easygcloud

Create a Cloud Logging sink to export audit logs to Cloud Storage

command

gcloud logging sinks create audit-export storage.googleapis.com/compliance-logs-bucket --log-filter='logName:cloudaudit.googleapis.com'

Command breakdown

Part of the Google Cloud CLI (gcloud) — Operations category.

gcloudloggingsinkscreateaudit-exportstorage.googleapis.com/compliance-logs-bucket--log-filter='logName:cloudaudit.googleapis.com'
FlagPurpose
--log-filterSet to: 'logName:cloudaudit.googleapis.com'

Test your recall — not just your reading.

Practice with interactive quiz →