Google Professional Cloud Developer Question 430
Single answerGoogle Cloud PlatformYou are developing an application that uses Google Cloud APIs for managing Compute Engine instances. When testing the application in a new Google Cloud project, you notice that API calls to the Compute Engine service are failing. What is the most likely action you should take to resolve this issue?
- A
Enable the Compute Engine API for the project using the Google Cloud Console or gcloud CLI.
- B
Grant the service account 'roles/owner' permissions for the project.
- C
Upgrade the project to a premium Google Cloud support plan.
- D
Add a firewall rule to allow traffic to the Compute Engine API endpoint.
Show answer and explanation
Correct answer: A
Explanation
When using Google Cloud services, you must enable the corresponding API for the project before making API calls. In this case, the Compute Engine API must be enabled via the Google Cloud Console or gcloud CLI. Without enabling the API, any requests to the service will fail, regardless of permissions or network configurations.
- A. Correct.
This is correct. Google Cloud services like Compute Engine require their respective APIs to be enabled in a project before they can be used. You can enable the API via the Google Cloud Console or the gcloud command-line tool.
- B. Incorrect.
This is incorrect. While permissions are necessary, granting 'roles/owner' to a service account is overly permissive and not directly related to enabling a service. The issue described is about the API not being enabled, not about permissions.
- C. Incorrect.
This is incorrect. A support plan upgrade is not required to use Google Cloud APIs. The issue is related to the Compute Engine API not being enabled.
- D. Incorrect.
This is incorrect. Firewall rules control network traffic but are unrelated to enabling a Google Cloud service API.