Google ACE Setting Up a Cloud Solution Environment Practice Question
An engineer needs to enable the Compute Engine API for a project using the gcloud command line. Which command should they run?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gcloud services enable compute.googleapis.com
The command 'gcloud services enable compute.googleapis.com' enables the Compute Engine API for the current project. The other options either list services or are incorrect.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
gcloud compute instances enable-api
Why it's wrong here
The command `gcloud compute instances enable-api` is not a valid gcloud command. The `gcloud compute instances` group manages virtual machine instances (e.g., create, describe, start, stop) but has no `enable-api` subcommand. Enabling an API is a project-level operation handled by the Service Usage API, not an instance-level operation, so this would fail with an unknown command error.
- ✗
gcloud services list --enabled
Why it's wrong here
The command `gcloud services list --enabled` displays the services that are currently enabled in the active project. It only reads and lists services; it does not modify any service states. The `--enabled` flag filters the output to show only enabled services, so running this does nothing to enable Compute Engine API—you would still need `gcloud services enable compute.googleapis.com` to actually turn it on.
- ✗
gcloud api enable compute
Why it's wrong here
The `gcloud api` command group does not exist in the gcloud CLI. The correct group for managing APIs is `gcloud services`. Even if you intended to use `gcloud services enable`, the service identifier should be the fully-qualified service name `compute.googleapis.com`, not the short name `compute`. This command would fail with an unrecognized command error, not enable anything.
- ✓
gcloud services enable compute.googleapis.com
Why this is correct
This is the correct command to enable the Compute Engine API. `gcloud services enable compute.googleapis.com` tells the Service Usage API to enable the service in the current project. It uses the fully-qualified service name and is the standard gcloud method for this operation. After running it, you can create and manage Compute Engine instances via gcloud or the Console.
Go deeper
Related to this question
About these practice questions
One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.