Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new field filter to pubsub. #3759

Merged
merged 6 commits into from
Aug 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions products/pubsub/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ objects:
If ttl is not set, the associated resource never expires.
A duration in seconds with up to nine fractional digits, terminated by 's'.
Example - "3.5s".
- !ruby/object:Api::Type::String
name: 'filter'
required: false
description: |
The subscription only delivers the messages that match the filter.
Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages
by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription,
you can't modify the filter.
input: true
- !ruby/object:Api::Type::NestedObject
name: 'deadLetterPolicy'
send_empty_value: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ resource "google_pubsub_topic" "foo" {
}

resource "google_pubsub_subscription" "foo" {
name = "%s"
topic = google_pubsub_topic.foo.id
name = "%s"
topic = google_pubsub_topic.foo.id
filter = "attributes.foo = \"bar\""
labels = {
foo = "%s"
}
Expand Down