
Answer-first summary for fast verification
Answer: Enable the Cloud Pub/Sub API in the API Library on the GCP Console.
The correct answer is A: Enable the Cloud Pub/Sub API in the API Library on the GCP Console. Before your App Engine application can interact with the Cloud Pub/Sub service, you need to ensure that the Cloud Pub/Sub API is enabled in your Google Cloud project. Without enabling the API, your service account will not be able to access the Cloud Pub/Sub functionalities, and hence your application will not be able to send or consume messages.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are developing an App Engine application and you need to send and consume messages using Google Cloud Pub/Sub. However, you have noticed that the Cloud Pub/Sub API is currently disabled in your project. To facilitate secure communication between your application and the Cloud Pub/Sub API, you plan to utilize a service account for authentication purposes. How can you ensure that your application can effectively use Cloud Pub/Sub?
A
Enable the Cloud Pub/Sub API in the API Library on the GCP Console.
B
Rely on the automatic enablement of the Cloud Pub/Sub API when the Service Account accesses it.
C
Use Deployment Manager to deploy your application. Rely on the automatic enablement of all APIs used by the application being deployed.
D
Grant the App Engine Default service account the role of Cloud Pub/Sub Admin. Have your application enable the API on the first connection to Cloud Pub/Sub.
No comments yet.