Complete the code to specify the trigger type for a Cloud Function that runs when a file is uploaded to a Cloud Storage bucket.
trigger = [1]The event type "google.storage.object.finalize" triggers the function when a new file is created or overwritten in a Cloud Storage bucket.
Complete the code to specify the resource (bucket name) that triggers the Cloud Function.
resource = "projects/_/buckets/[1]"
The resource must be the name of the Cloud Storage bucket that triggers the function, such as "my-bucket".
Fix the error in the function signature to correctly receive the event data and context in a Cloud Function triggered by a storage event.
def hello_[1](event, context): print(f"File {event['name']} uploaded.")
The first parameter should be named event to match the event data passed by Cloud Functions for storage triggers.
Fill both blanks to complete the deployment command for a Cloud Function triggered by a Pub/Sub topic.
gcloud functions deploy my-function --trigger-[1] [2] --runtime python312
The flag --trigger-topic specifies a Pub/Sub topic trigger, and the topic name follows it.
Fill all three blanks to complete the event trigger configuration in a Cloud Function deployment YAML for a storage event.
eventTrigger: eventType: [1] resource: projects/_/buckets/[2] failurePolicy: [3]: {}
The eventType should be a storage event like google.storage.object.delete, the resource is the bucket name, and failurePolicy: retry enables automatic retries on failure.