Reputation: 1
I need to get an email alert to my email when a specific file in GCP bucket is arrived/available. Which functionality/tool i can use in GCP.
Upvotes: 0
Views: 1134
Reputation: 8806
You can look at the following approach:
google.storage.object.finalize
. Check out sample code here.Upvotes: 1
Reputation: 75715
@Romin solution will work, you can also have a look to Eventarc and Cloud Run.
However, you can use a hack fully managed by Google Cloud.
Firstly, activate the Cloud Storage Audit Logs (be careful, if you have a lot of activity, it can generate a lot of logs and be costly).
Then, create a log based metrics on the audit logs that mentionned the file creation and with the filter on the file path (you can use the =~ operator for regex filtering)
Finally, create an alert on that metrics, and send an email when the alert is triggered
Upvotes: 0