ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 153 - Associate Cloud Engineer discussion

Report
Export

You have created a code snippet that should be triggered whenever a new file is uploaded to a Cloud Storage bucket. You want to deploy this code snippet. What should you do?

A.
Use App Engine and configure Cloud Scheduler to trigger the application using Pub/Sub.
Answers
A.
Use App Engine and configure Cloud Scheduler to trigger the application using Pub/Sub.
B.
Use Cloud Functions and configure the bucket as a trigger resource.
Answers
B.
Use Cloud Functions and configure the bucket as a trigger resource.
C.
Use Google Kubernetes Engine and configure a CronJob to trigger the application using Pub/Sub.
Answers
C.
Use Google Kubernetes Engine and configure a CronJob to trigger the application using Pub/Sub.
D.
Use Dataflow as a batch job, and configure the bucket as a data source.
Answers
D.
Use Dataflow as a batch job, and configure the bucket as a data source.
Suggested answer: B

Explanation:

Google Cloud Storage Triggers

Cloud Functions can respond to change notifications emerging from Google Cloud Storage. These notifications can be configured to trigger in response to various events inside a bucket---object creation, deletion, archiving and metadata updates.

Note: Cloud Functions can only be triggered by Cloud Storage buckets in the same Google Cloud Platform project.

Event types

Cloud Storage events used by Cloud Functions are based on Cloud Pub/Sub Notifications for Google Cloud Storage and can be configured in a similar way.

Supported trigger type values are:

google.storage.object.finalize

google.storage.object.delete

google.storage.object.archive

google.storage.object.metadataUpdate

Object Finalize

Trigger type value: google.storage.object.finalize

This event is sent when a new object is created (or an existing object is overwritten, and a new generation of that object is created) in the bucket.

https://cloud.google.com/functions/docs/calling/storage#event_types

asked 18/09/2024
Peter Takacs
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first