Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(storage): update autoclass comments #4126

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions storage/buckets/set_autoclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ import (
)

// setAutoclass sets the Autoclass configuration for a bucket.
// See https://cloud.google.com/storage/docs/using-autoclass for more information.

// Note: Only update requests that disable Autoclass are currently supported.
// To enable Autoclass, you must set it at bucket creation time.
func setAutoclass(w io.Writer, bucketName string) error {
// bucketName := "bucket-name"
// Enable Autoclass for a bucket. Set enabled to false to disable Autoclass.
// Set Autoclass.TerminalStorageClass, valid values are NEARLINE and ARCHIVE.

// To update the configuration for Autoclass.TerminalStorageClass,
// Autoclass.Enabled must also be set to true.
// To disable autoclass on the bucket, set to an empty &Autoclass{}.
enabled := true
terminalStorageClass := "ARCHIVE"
ctx := context.Background()
Expand Down
Loading