An administrator needs to enable the Kubernetes Engine API (`container.googleapis.com`) for a Google Cloud project named `analytics-prod` using the `gcloud` CLI. Which TWO of the following requirements or actions are necessary to successfully enable the service API on the targeted project?
- Specify the target project `analytics-prod` explicitly in the `gcloud services enable` command or set it as the active default project in `gcloud config`.Answer
- Ensure the identity executing the command holds the Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) role or equivalent API enablement permissions on project `analytics-prod`.Answer
- CEnable the API at the Google Cloud Organization node level so that all child projects automatically inherit the enabled state.
- DGrant the basic Viewer (`roles/viewer`) role to the identity executing the `gcloud` command.
Answer
To enable a Google Cloud API on a specific project, you must target the correct project (via `gcloud` flags or configuration) and possess adequate permissions such as the Service Usage Admin role on that project.
Enabling a service API requires both administrative IAM permissions (such as Service Usage Admin) on the target project and directing the `gcloud` CLI command specifically to that project context.
Step-by-Step Solution
Key Concept
API Enablement Scoping and IAM Requirements
Estimated Time:1m 0s