Send email notification upon "Migrate Traffic" event?
48 views
Skip to first unread message
Sky Diver
unread,
Jan 29, 2017, 11:25:19 AM1/29/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
Is there any way to trigger an email notification event once traffic is migrated to a different version?
Adam (Cloud Platform Support)
unread,
Jan 29, 2017, 4:41:41 PM1/29/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google App Engine
This feature doesn't exist currently, however you could do something like set up a shell script that wraps gcloud app services set-traffic to do the traffic migration and also send an email using the UNIX mail command. As a trivial example:
#!/usr/bin/env sh
gcloud app services set-traffic ${2}--splits ${1}=1--migrate cat "Traffic migrated to version ${1}."| mail -s "Traffic migration alert" someemail@somedomain.com
This could be saved as migrate-traffic.sh and invoked as ./migrate-traffic.sh my-version or ./migrate-traffic.sh my-version my-service.
Adam (Cloud Platform Support)
unread,
Jan 29, 2017, 4:43:26 PM1/29/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message