-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
docs: update FilterPolicy config to match AWS API #215
Conversation
Currently, filterPolicy configuration outlined in this file does not match what is outlined in the AWS documentation and API - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html. The `filterPolicy` should only contain the JSON policy, so no need for the `attributes` property; which in itself was confusing as the policy can apply to the message attributes or body. Further to this, this definition file was missing the `filterPolicyScope` which is needed to determine whether the user wishes to filter on the message attributes or the body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
@@ -97,6 +97,9 @@ | |||
"filterPolicy": { | |||
"$ref": "#/definitions/filterPolicy" | |||
}, | |||
"filterPolicyScope": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As filterPolicy
and filterPolicyScope
will be properties directly on the object they don't need to be $ref
'd.
LGTM! @KhudaDad414 @iancooper You happy with the change? 🐸 |
@dpwdec Approved |
sounds odd to me. Are filterpolicies set by the event producer to be used by the consumer? |
Although the SNS subscription lives under the SNS remit it is under the control of the consumer of the topic. Filter policies are set by the consumer of the event, not the producer. It is the consumer who is deciding how they wish to consume the events sent by the producer, not the producer determining how their events should be consumed. |
Okay, Nevermind, it makes sense from the point of view of "we only receive events that fits this policy". |
Thanks @dpwdec and @iancooper for the approval. @KhudaDad414 can I get a review please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Schemas seems to match with README.
@dpwdec @KhudaDad414 just n info for future - that when you change structure of binding, you should update binding version too |
Currently, filterPolicy configuration outlined in this file does not match what is outlined in the AWS documentation and API - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html. The
filterPolicy
should only contain the JSON policy, so no need for theattributes
property; which in itself was confusing as the policy can apply to the message attributes or body.Further to this, this definition file was missing the
filterPolicyScope
which is needed to determine whether the user wishes to filter on the message attributes or the body.Description
Related issue(s)