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}, }, }; })