
Google Associate Cloud Engineer
Get started today
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?
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?
Explanation:
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.