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?
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
Q01Your company is migrating to Google Cloud and needs to establish a resource hierarchy. You have t...EasyQ02You are managing access to a GCP project. You need to grant 15 developers the ability to view Com...MediumQ04Your startup has a strict monthly cloud budget of $500. You want to be notified immediately if yo...EasyQ05Your finance team wants to perform complex SQL analysis on your GCP billing data to understand co...MediumQ06You have just installed the Google Cloud SDK on your local machine. You want to authenticate, set...Medium
Expert