Skip to content

Commit ce0d48f

Browse files
fhinkelJustinBeckwith
authored andcommitted
fix: update sample for enabling or disabling a policy (#305)
1 parent 9439618 commit ce0d48f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

monitoring/snippets/alerts.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018, Google, Inc.
2+
* Copyright 2018 Google LLC
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -244,10 +244,10 @@ async function enablePolicies(projectId, enabled, filter) {
244244
policies
245245
.map(policy => {
246246
return {
247-
updateMask: {paths: ['disabled']},
247+
updateMask: {paths: ['enabled']},
248248
alertPolicy: {
249249
name: policy.name,
250-
disabled: enabled ? false : true,
250+
enabled: {value: enabled},
251251
},
252252
};
253253
})

0 commit comments

Comments
 (0)