A cloud engineer needs to update an existing Google Cloud Storage bucket named `analytics-raw-data-logs` so that any new objects uploaded to the bucket are assigned the Nearline storage class by default. Which Google Cloud CLI command should the engineer run to accomplish this task?
- gcloud storage buckets update gs://analytics-raw-data-logs --default-storage-class=nearlineAnswer
- Bgsutil defstorageclass set nearline gs://analytics-raw-data-logs
- Cgcloud storage buckets create gs://analytics-raw-data-logs --default-storage-class=nearline
- Dgcloud compute buckets update gs://analytics-raw-data-logs --default-storage-class=nearline
Answer
The command `gcloud storage buckets update gs://analytics-raw-data-logs --default-storage-class=nearline` correctly configures the default storage class of an existing bucket.
The command `gcloud storage buckets update gs://analytics-raw-data-logs --default-storage-class=nearline` uses the correct `gcloud storage` syntax to modify an existing bucket and set its default storage class to Nearline.
Step-by-Step Solution
Key Concept
Configuring Cloud Storage Bucket Default Storage Class via gcloud CLI