From Cloud Shell, produce a list of enabled Google Cloud APIs for project 'my-project' using gcloud. What should you run?
Choose an answer
Tap an option to check your answer.
Correct answer: Run gcloud projects list to get the project ID, and then run gcloud services list --project ..
Why this is the answer
The correct approach is to first identify the project ID using gcloud projects list, which provides a list of projects and their corresponding IDs. Then, use gcloud services list --project [PROJECTID] to list the enabled APIs specifically for that project. The --project flag is crucial for targeting a specific project. Incorrect options: gcloud init sets the active configuration, not necessarily the project for the command, and --available lists all available services, not just enabled ones for a specific project. gcloud info shows account details, not project information, and --account is not a valid flag for gcloud services list. gcloud projects describe provides details about a specific project, but --available still lists all available services, not just enabled ones for the specified project.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed