Easy1 markMultiple Choice

GCP ACE · Question 03 · Domain 1.1: Setting up cloud projects and accounts

You have created a new GCP project using the Cloud Console. You want to deploy a Cloud Function using the gcloud CLI, but you receive an error stating that the API is not enabled.

Which gcloud command should you use to enable the Cloud Functions API?

Answer options:

A.

gcloud api enable cloudfunctions

B.

gcloud services enable cloudfunctions.googleapis.com

C.

gcloud projects enable-api cloudfunctions

D.

gcloud components install cloudfunctions

How to approach this question

Recall the gcloud command group used for managing APIs and services.

Full Answer

B.gcloud services enable cloudfunctions.googleapis.com✓ Correct
To enable an API via the CLI, you use the `gcloud services enable [SERVICE_NAME]` command. The service name for Cloud Functions is `cloudfunctions.googleapis.com`.

Common mistakes

Confusing `gcloud components install` (local SDK tools) with `gcloud services enable` (cloud project APIs).

Practice the full GCP Associate Cloud Engineer Practice Exam 2

50 questions · hints · full answers · grading

More questions from this exam