From 492f806dcf4acd1231e42b932c9bbed7e76fe250 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 3 Oct 2019 10:37:27 -0400 Subject: [PATCH] fix: update sample for enabling or disabling a policy (#305) --- monitoring/snippets/alerts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monitoring/snippets/alerts.js b/monitoring/snippets/alerts.js index efe53a226f..ab5e2ca4f2 100644 --- a/monitoring/snippets/alerts.js +++ b/monitoring/snippets/alerts.js @@ -1,5 +1,5 @@ /** - * Copyright 2018, Google, Inc. + * Copyright 2018 Google LLC * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -244,10 +244,10 @@ async function enablePolicies(projectId, enabled, filter) { policies .map(policy => { return { - updateMask: {paths: ['disabled']}, + updateMask: {paths: ['enabled']}, alertPolicy: { name: policy.name, - disabled: enabled ? false : true, + enabled: {value: enabled}, }, }; })