Google ACE Setting Up a Cloud Solution Environment Practice Question
A new engineer needs to enable the Compute Engine API for a project using the gcloud command-line tool. 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 correct command to enable an API is `gcloud services enable`, specifying the service name. For Compute Engine the service name is `compute.googleapis.com`.
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 enable-api
Why it's wrong here
The `gcloud compute` command group manages Compute Engine resources such as instances, disks, and networks, but it does not include an `enable-api` subcommand. API enablement is performed through the `gcloud services` group. Running `gcloud compute enable-api` therefore returns a usage error because the subcommand does not exist.
- ✗
gcloud projects enable compute.googleapis.com
Why it's wrong here
`gcloud projects` is intended for managing project-level metadata, IAM policies, and settings, not for enabling Google service APIs. The correct command family for service activation is `gcloud services`, so `gcloud projects enable compute.googleapis.com` fails because the `projects` group has no `enable` subcommand. You must use `gcloud services enable` instead.
- ✗
gcloud api enable compute
Why it's wrong here
This option uses `gcloud api` rather than `gcloud services`; no `api` command group exists in the gcloud CLI for service enablement. Additionally, the argument `compute` is a short service identifier, whereas the required argument is the fully qualified service name `compute.googleapis.com`. The correct call would be `gcloud services enable compute.googleapis.com`.
- ✓
gcloud services enable compute.googleapis.com
Why this is correct
The correct command is `gcloud services enable compute.googleapis.com`. The `gcloud services` group is the standard interface for enabling and disabling Google Cloud APIs, and `compute.googleapis.com` is the unique service name for Compute Engine. This command works asynchronously, so you can verify the operation with `gcloud services list --enabled` or the console. It requires the `serviceusage.services.enable` IAM permission on the project.
Go deeper
Related to this question
Learn chapter
Google Compute Engine
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Compute Engine
Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) offering that lets you create and run virtual machines on Google's infrastructure.
About these practice questions
This ACE question is part of Courseiva's 769-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.