Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 348 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 348

Single answerGoogle Cloud Platform

You are developing a serverless application on Google Cloud and need to trigger a Cloud Function whenever a new file is uploaded to a specific Cloud Storage bucket. The function processes the file and stores the result in Firestore. Which trigger should you use to invoke the function?

  1. A

    Cloud Pub/Sub Topic Trigger

  2. B

    Cloud Storage Object Finalize Trigger

  3. C

    HTTP Trigger

  4. D

    Firestore Document Write Trigger

Show answer and explanation

Correct answer: B

Explanation

To trigger a Cloud Function when a new file is uploaded to a Cloud Storage bucket, you should use the Cloud Storage Object Finalize Trigger. This event is emitted when a new object is successfully created in the bucket. Other triggers, such as HTTP or Firestore triggers, are not applicable for this use case.

  • A. Incorrect.

    Cloud Pub/Sub Topic Trigger is used for event-driven architectures but is not a direct trigger for changes in Cloud Storage objects. It would require additional configuration to publish to a topic on a file upload.

  • B. Correct.

    Cloud Storage Object Finalize Trigger is the correct trigger for invoking a function when a new file is uploaded to a Cloud Storage bucket. This event is fired when the file is successfully written and finalized.

  • C. Incorrect.

    HTTP Trigger is used to invoke Cloud Functions via HTTP requests. It is not suitable for events like file uploads in Cloud Storage.

  • D. Incorrect.

    Firestore Document Write Trigger is used for changes to Firestore documents and is not related to Cloud Storage events.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam