Your enterprise organization is preparing a new Google Cloud project `prod-ml-app-402` to host an automated image processing pipeline. You need to enable the Cloud Vision API (`vision.googleapis.com`) using the `gcloud` CLI while following Google Cloud security and operational best practices. In what logical sequence should you perform the configuration, authorization, enablement, and verification steps?
- 1Set the active `gcloud` CLI configuration context to the target project using `gcloud config set project prod-ml-app-402`.
- 2Verify or grant the Service Usage Admin role (`roles/serviceusage.serviceUsageAdmin`) on `prod-ml-app-402` for the operating identity.
- 3Execute `gcloud services enable vision.googleapis.com` to enable the Cloud Vision API on `prod-ml-app-402`.
- 4Execute `gcloud services list --enabled --filter="name:vision.googleapis.com"` to confirm active service status.
Cevap
The proper sequence starts with setting the target project context in gcloud CLI, verifying that the deploying identity possesses the Service Usage Admin role, executing the API enablement command for vision.googleapis.com, and finally running a list command to verify that the service status is enabled.
The correct operational sequence mandates establishing the target project context in gcloud CLI first to avoid misconfiguration across environments. Next, administrative IAM authorization must be confirmed using the specific predefined role required for API management (Service Usage Admin). Once authorized within the correct context, the gcloud services enable command initiates API activation. Finally, operational state verification using gcloud services list ensures that the API endpoint is fully active before application deployment.
Adım Adım Çözüm
Anahtar Kavram
API Enablement Workflow and Privilege Scoping using gcloud CLI