A healthcare telemetry pipeline requires a new Cloud Storage bucket named `patient-telemetry-us-central1-2026` in the `us-central1` region to ingest real-time patient monitoring logs. Security governance dictates that Uniform Bucket-Level Access (UBLA) must be enforced to manage access strictly via IAM roles. Additionally, data management policies require transitioning objects to Nearline storage after 30 days and deleting them after 365 days using an automated configuration file (`lifecycle.json`). Which command sequence using Google Cloud's primary CLI tool correctly accomplishes this deployment according to Google Cloud best practices?
- Execute `gcloud storage buckets create gs://patient-telemetry-us-central1-2026 --location=us-central1 --uniform-bucket-level-access` and then apply the rules with `gcloud storage buckets update gs://patient-telemetry-us-central1-2026 --lifecycle-file=lifecycle.json`.Cevap
- BExecute `gsutil mb -c STANDARD -l us-central1 -b on gs://patient-telemetry-us-central1-2026` and then apply the rules with `gsutil lifecycle set lifecycle.json gs://patient-telemetry-us-central1-2026`.
- CExecute `gcloud storage buckets create gs://patient-telemetry-us-central1-2026 --location=us-central1` and then configure per-object access controls using `gcloud storage objects update gs://patient-telemetry-us-central1-2026/* --predefined-acl=private`.
- DExecute `gcloud storage buckets create gs://patient-telemetry-us-central1-2026 --location=us-central1 --default-storage-class=COLDLINE` and configure client ingestion applications to handle storage class transitions.
Cevap
Execute `gcloud storage buckets create gs://patient-telemetry-us-central1-2026 --location=us-central1 --uniform-bucket-level-access` and then apply the rules with `gcloud storage buckets update gs://patient-telemetry-us-central1-2026 --lifecycle-file=lifecycle.json`.
The correct approach uses `gcloud storage buckets create` with the `--uniform-bucket-level-access` flag to enforce IAM-only access control, and follows up with `gcloud storage buckets update --lifecycle-file` to attach the JSON lifecycle policy document. This follows current Google Cloud CLI best practices.
Adım Adım Çözüm
Anahtar Kavram
Deploying Cloud Storage buckets with Uniform Bucket-Level Access and applying lifecycle management using gcloud storage CLI.