A cloud engineer needs to apply an automated lifecycle configuration policy file named `lifecycle.json` to an existing Google Cloud Storage bucket named `analytics-raw-data-prod`. According to Google Cloud CLI standards, which command should be executed to apply this lifecycle policy to the bucket?
- gcloud storage buckets update gs://analytics-raw-data-prod --lifecycle-file=lifecycle.jsonCevap
- Bgcloud storage buckets update gs://analytics-raw-data-prod --set-lifecycle=lifecycle.json
- Cgcloud compute buckets update gs://analytics-raw-data-prod --lifecycle-file=lifecycle.json
- Dgcloud storage objects update gs://analytics-raw-data-prod --lifecycle-file=lifecycle.json
Cevap
Execute 'gcloud storage buckets update gs://analytics-raw-data-prod --lifecycle-file=lifecycle.json' to apply the lifecycle configuration file to the bucket.
The command 'gcloud storage buckets update gs://analytics-raw-data-prod --lifecycle-file=lifecycle.json' correctly uses the modern gcloud storage CLI interface to update bucket settings with a local JSON lifecycle specification file.
Adım Adım Çözüm
Anahtar Kavram
Configuring Cloud Storage Bucket Lifecycle Rules via gcloud CLI