Courseiva
Setting Up a Cloud Solution EnvironmentmediumMultiple ChoiceObjective-mapped

Google ACE Setting Up a Cloud Solution Environment Practice Question

An engineer needs to enable the Compute Engine API for a project using the CLI. 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 'gcloud services enable' command enables APIs in a project. The service name for Compute Engine 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

    Why it's wrong here

    The command 'gcloud compute enable' is invalid because the 'gcloud compute' command group is used to manage Compute Engine resources (e.g., instances, disks, networks), not to enable APIs. The 'enable' subcommand does not exist under this group. To enable a Google Cloud API, you must use the 'gcloud services' command group, which is the dedicated interface for managing service states. Attempting this command will result in an error such as 'Unknown command'.

  • gcloud services enable compute

    Why it's wrong here

    'gcloud services enable compute' is incorrect because the 'gcloud services enable' command requires the full, fully qualified service name, not just a short product label. Google Cloud's Service Usage API identifies services by their complete DNS-style name, such as 'compute.googleapis.com'. Passing 'compute' alone will not resolve to a recognizable service and will trigger an error like 'Service not found'. Always specify the full service resource name when enabling an API.

  • gcloud api enable compute.googleapis.com

    Why it's wrong here

    The command 'gcloud api enable compute.googleapis.com' fails because there is no 'api' command group in the gcloud CLI. The correct parent command is 'gcloud services', which contains the 'enable' subcommand. Using a nonexistent command group will cause gcloud to return an invalid command error. The proper syntax is 'gcloud services enable', followed by the full service name.

  • gcloud services enable compute.googleapis.com

    Why this is correct

    'gcloud services enable compute.googleapis.com' is the correct command to enable the Compute Engine API for the active project. The 'gcloud services' command group interacts with the Service Usage API to manage service availability. This command uses the fully qualified service name 'compute.googleapis.com', which is required for successful enablement. You can also specify a project with the '--project' flag if the API should be enabled for a different project than the current one.

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 →

How Courseiva writes practice questions · Editorial policy

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.