Skip to content

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 authored and dandhlee committed Jan 26, 2023
1 parent c9a0d4f commit c97ff4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion securitycenter/snippets/snippets_notification_configs.py
Original file line number Diff line number Diff line change
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 c97ff4a

Please sign in to comment.