< Back

Write-GcsBucketLogging

Mon Jan 13, 2020 11:57 pm

NAME Write-GcsBucketLogging



SYNOPSIS

Updates the logging data associated with a Cloud Storage Bucket.





SYNTAX

Write-GcsBucketLogging [-Name] <string> [[-LogBucket] <string>] [[-LogObjectPrefix] <string>] [<CommonParameters>]





DESCRIPTION

Updates the logging data associated with a Cloud Storage Bucket.





PARAMETERS

-Name <string>

The name of the bucket to configure. This parameter will also accept a Bucket object.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LogBucket <string>

The destination bucket where the current bucket's logs should be placed.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LogObjectPrefix <string>

Prefix for the log object's name.



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Google.Apis.Storage.v1.Data.Bucket





---------- EXAMPLE 1 ----------



Write-GcsBucketLogging "widgetco" -LogBucket "widgetco-logs" `

-LogObjectPrefix "log-output/bucket"



Start generating logs data for access to bucket "widgetco".



Logs should be accessible afterwards via, at "gs://widgetco-logs/log-output/bucket_usage_<timestamp>_<id>_v0".



RELATED LINKS

[Access Logs] (https://cloud.google.com/storage/docs/access-logs)