A cloud engineer needs to enable Object Versioning on an existing Google Cloud Storage bucket named `app-logs-prod` using the Google Cloud CLI (`gcloud`). Which command should the engineer run?
- gcloud storage buckets update gs://app-logs-prod --versioningAnswer
- Bgcloud storage buckets update gs://app-logs-prod --enable-versioning
- Cgcloud compute buckets update gs://app-logs-prod --versioning
- Dgsutil versioning set on app-logs-prod
Answer
The correct command is `gcloud storage buckets update gs://app-logs-prod --versioning`.
To update settings on an existing Cloud Storage bucket such as enabling Object Versioning using the Google Cloud CLI, the correct command is `gcloud storage buckets update gs://[BUCKET_NAME] --versioning`.
Step-by-Step Solution
Key Concept
Deploying and configuring Cloud Storage bucket features using gcloud storage CLI
Estimated Time:45s