Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new region tag #1844

Merged
merged 1 commit into from
Nov 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions monitoring/api/v3/alerts-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def default(self, obj):
# [START monitoring_alert_create_policy]
# [START monitoring_alert_create_channel]
# [START monitoring_alert_update_channel]
# [START monitoring_alert_enable_channel]
def restore(project_name):
print('Loading alert policies and notification channels from backup.json.')
record = json.load(open('backup.json', 'rt'))
Expand Down Expand Up @@ -197,6 +198,7 @@ def restore(project_name):
condition.ClearField("name")
policy = alert_client.create_alert_policy(project_name, policy)
print('Updated', policy.name)
# [END monitoring_alert_enable_channel]
# [END monitoring_alert_restore_policies]
# [END monitoring_alert_create_policy]
# [END monitoring_alert_create_channel]
Expand Down