Skip to content

Commit

Permalink
docs: Add filter field libary sample for UpdateNotificationConfig (#288)
Browse files Browse the repository at this point in the history
* Add filter field libary sample for UpdateNotificationConfig

* Add filter field libary sample for UpdateNotificationConfig

* docs: Add filter field libary sample for UpdateNotificationConfig

* docs: Update Security Command Center UpdateNotificationConfig sample, adding filter to mutable field

Co-authored-by: Justin Beckwith <justin.beckwith@gmail.com>
Co-authored-by: Benjamin E. Coe <bencoe@google.com>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
  • Loading branch information
4 people authored Jul 16, 2020
1 parent 424f2b9 commit 20acb12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion security-center/snippets/v1/updateNotificationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ function main(

async function updateNotificationConfig() {
const [response] = await client.updateNotificationConfig({
updateMask: {paths: ['description', 'pubsub_topic']},
updateMask: {
paths: ['description', 'pubsub_topic', 'streaming_config.filter'],
},
notificationConfig: {
name: formattedConfigName,
description: 'Updated config description',
pubsubTopic: pubsubTopic,
streamingConfig: {filter: 'state = "INACTIVE"'},
},
});
console.log('notification config update succeeded: ', response);
Expand Down

0 comments on commit 20acb12

Please sign in to comment.