Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Restored inadvertently deleted line.
  • Loading branch information
engelke committed Dec 10, 2018
commit ee19cdefaa59ed9fcf95887d91c77e730f54c241
1 change: 1 addition & 0 deletions monitoring/api/v3/alerts-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def enable_alert_policies(project_name, enable, filter_=None):
# [START monitoring_alert_replace_channels]
def replace_notification_channels(project_name, alert_policy_id, channel_ids):
_, project_id = project_name.split('/')
alert_client = monitoring_v3.AlertPolicyServiceClient()
channel_client = monitoring_v3.NotificationChannelServiceClient()
policy = monitoring_v3.types.alert_pb2.AlertPolicy()
policy.name = alert_client.alert_policy_path(project_id, alert_policy_id)
Expand Down