How to set up and use Pub Sub Notifications for Cloud Storage

0 votes
I want to set up and use Pub/Sub Notifications for Cloud Storage, so that I can track changes to your Cloud Storage objects. How can I set this up?
Nov 22, 2019 in GCP by anonymous
• 19,610 points
2,294 views

1 answer to this question.

0 votes

The following steps add a notification configuration to your bucket that sends notifications for all supported events. 

To send notifications for a subset of events, include the -e flag with your gsutil command or the event_types key in the body of your JSON request.

Here's how you can do it using gsutil:

Use the gsutil notification create command, replacing [VALUES_IN_BRACKETS] with the appropriate values:

gsutil notification create -t [TOPIC_NAME] -f json gs://[BUCKET_NAME]

If you use a [TOPIC_NAME] that doesn't exist in your project, gsutil creates one for you.

Hope this helped!!

To know more about Google Cloud, It is recommended to go for Google Cloud Certification training today.

Thank you!

answered Nov 22, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer

How to verify that Cloud Pub/Sub actually got the message?

To verify that your Cloud Pub/Sub topic ...READ MORE

answered Nov 6, 2019 in GCP by Sirajul
• 59,230 points
1,807 views
+1 vote
1 answer

Set up log delivery for a cloud storage bucket.

The following steps describe how to set ...READ MORE

answered Nov 22, 2019 in GCP by Sirajul
• 59,230 points
1,052 views
+2 votes
2 answers

How to download multiple files in Google Cloud Storage?

You can achieve this through the gsutil ...READ MORE

answered May 9, 2018 in GCP by kurt_cobain
• 9,350 points
23,579 views
0 votes
1 answer

GCP Error: 403: Access Denied

Check that your credentials are correct. For ...READ MORE

answered Oct 9, 2019 in GCP by Sirajul
• 59,230 points
4,006 views
0 votes
1 answer

Permissions issue with Google Cloud Storage Bucket.

You can regain access to the object by assigning an applicable role, like roles/storage.objectAdmin, to ...READ MORE

answered Oct 10, 2019 in GCP by Sirajul
• 59,230 points
4,944 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP