Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
docs: Update Security Command Center UpdateNotificationConfig sample,…
Browse files Browse the repository at this point in the history
… adding filter to mutable field (#39)

Fixes b/155346619
Add "filter" to mutable fields for UpdateNotificationConfig.
  • Loading branch information
hannah-tsai committed Jul 23, 2020
1 parent e842237 commit c70d790
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion samples/snippets/snippets_notification_configs.py
Expand Up @@ -120,15 +120,19 @@ def update_notification_config(organization_id, notification_config_id, pubsub_t
)

updated_description = "New updated description"
updated_filter = 'state = "INACTIVE"'

# Only description and pubsub_topic can be updated.
field_mask = field_mask_pb2.FieldMask(paths=["description", "pubsub_topic"])
field_mask = field_mask_pb2.FieldMask(
paths=["description", "pubsub_topic", "streaming_config.fitler"]
)

updated_notification_config = client.update_notification_config(
{
"name": notification_config_name,
"description": updated_description,
"pubsub_topic": pubsub_topic,
"streaming_config": {"filter": updated_filter},
},
update_mask=field_mask,
)
Expand Down

0 comments on commit c70d790

Please sign in to comment.