Implement basic SNS message filtering (#1521)

* Add support for FilterPolicy to sns subscription set_filter_attributes

* Add basic support for sns message filtering

This adds support for exact string value matching along with AND/OR
logic as described here:

https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html

It does not provide support for:
- Anything-but string matching
- Prefix string matching
- Numeric Value Matching

The above filter policies (if configured) will not match messages.
This commit is contained in:
Iain Bullard 2018-03-21 15:49:11 +00:00 committed by Jack Danger
commit d3d9557d49
5 changed files with 194 additions and 8 deletions

View file

@ -30,7 +30,7 @@ class SQSResponse(BaseResponse):
@property
def attribute(self):
if not hasattr(self, '_attribute'):
self._attribute = self._get_map_prefix('Attribute', key_end='Name', value_end='Value')
self._attribute = self._get_map_prefix('Attribute', key_end='.Name', value_end='.Value')
return self._attribute
def _get_queue_name(self):