Google Associate Cloud Engineer Question 25
Select 2Google Cloud PlatformYou are tasked with setting up a new Google Cloud project for your development team. One of the requirements is to use Google Cloud Storage and Google Cloud Pub/Sub services. However, you find that these services are not available in the project by default. What should you do to enable these services for your project?
- A
Navigate to the Google Cloud Console, select your project, and enable Cloud Storage and Pub/Sub APIs in the API Library.
- B
Use the gcloud CLI to run 'gcloud services enable storage.googleapis.com pubsub.googleapis.com' for your project.
- C
Contact Google Cloud Support to request access to the Cloud Storage and Pub/Sub services.
- D
Edit the IAM policy of your project to add roles for Cloud Storage and Pub/Sub services.
- E
Go to the Google Cloud Console, create a new project, and start using Cloud Storage and Pub/Sub without enabling any APIs.
Show answer and explanation
Correct answers: A, B
Explanation
To use services like Google Cloud Storage and Google Cloud Pub/Sub in a new project, you must enable the corresponding APIs. This can be done through the Google Cloud Console's API Library or by using the gcloud CLI with the 'gcloud services enable' command. These methods allow you to activate the necessary services without needing to contact support or create new projects unnecessarily.
- A. Correct.
Correct: You can enable required APIs directly through the Google Cloud Console by navigating to the API Library and enabling them for your project.
- B. Correct.
Correct: The gcloud CLI can be used to enable APIs using the 'gcloud services enable' command, which is efficient for scripting and automation.
- C. Incorrect.
Incorrect: Google Cloud Support is not needed to enable APIs. It is a self-service operation available through the Console or CLI.
- D. Incorrect.
Incorrect: Editing the IAM policy assigns roles and permissions but does not enable APIs. API enabling is a separate process.
- E. Incorrect.
Incorrect: Creating a new project does not automatically enable APIs. APIs must be explicitly enabled for each project.