Google Cloud Associate Cloud Engineer — Question 65
You need to produce a list of the enabled Google Cloud Platform APIs for a GCP project using the gcloud command line in the Cloud Shell. The project name is my-project. What should you do?
Answer options
- A. Run gcloud projects list to get the project ID, and then run gcloud services list --project <project ID>.
- B. Run gcloud init to set the current project to my-project, and then run gcloud services list --available.
- C. Run gcloud info to view the account value, and then run gcloud services list --account <Account>.
- D. Run gcloud projects describe <project ID> to verify the project value, and then run gcloud services list --available.
Correct answer: A
Explanation
The correct answer is A because it accurately describes the process of first obtaining the project ID and then listing the enabled services for that specific project. Option B incorrectly suggests listing available services without referencing enabled ones, while C focuses on account information, which is not needed for this task. Option D also suggests checking available services, which is irrelevant to producing a list of enabled APIs.