Use the gsutil defstorageclass set command:
gsutil defstorageclass set [STORAGE_CLASS] gs://[BUCKET_NAME]
Where:
-
[STORAGE_CLASS] is the new storage class you want for your bucket. For example, nearline.
-
[BUCKET_NAME] is the name of the relevant bucket. For example, my-bucket.
The response looks like the following example:
Setting default storage class to "[STORAGE_CLASS]" for bucket gs://[BUCKET_NAME]