
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
An App Engine app needs to publish messages to Pub/Sub, but the API is disabled. What is the first step?
A
Create a service account
B
Enable the Pub/Sub API
C
Grant IAM permissions
D
Deploy the app again
Explanation:
When an App Engine app needs to publish messages to Pub/Sub but the API is disabled, the first step is to enable the Pub/Sub API. Here's why:
API Enablement is Prerequisite: Before any service (including App Engine) can use Google Cloud APIs, those APIs must be enabled in the project. Without enabling the Pub/Sub API, no application can interact with Pub/Sub services, regardless of IAM permissions or service accounts.
Logical Sequence of Operations:
Why Other Options Are Not First Steps:
How to Enable the API:
gcloud services enable pubsub.googleapis.comgoogle_project_service resourceKey Takeaway: Always enable required APIs first before configuring authentication, permissions, or deploying applications that depend on those services.