Commit Graph

99 Commits

Author SHA1 Message Date
Jack Danger
d596560971
Merge pull request #2657 from gruebel/add-missing-regions
Add missing regions to all services
2020-01-02 17:27:25 -08:00
gruebel
2fb5004dc2 Fix sns unsubscribe & delete_topic behavior 2019-12-27 16:04:12 +01:00
gruebel
d7ba355a65 Add missing regions to all services 2019-12-26 17:12:22 +01:00
Mike Grima
91983b4823
Merge pull request #2610 from gruebel/fix-sns-get-subscription-attributes
Add missing attributes to SNS subscription
2019-12-17 08:36:59 -08:00
Fabio Dias
743dd46399 black linting 2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5 ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override 2019-12-16 21:05:29 -05:00
Fabio Dias
b83a750630 Added references to moto.iam.models.ACCOUNT_ID instead of hardcoded id 2019-12-16 19:56:11 -05:00
gruebel
deaeef521b Add missing attributes to SNS subscription 2019-11-30 15:51:43 +01:00
Asher Foa
3bb31c84fd Fix some typos 2019-11-16 12:31:45 -08:00
gruebel
3d5d477f7f Fix sns.publish with number type and 0 value 2019-11-16 14:46:05 +01:00
gruebel
58daa428f3 Fix sns.subscribe validation for sms numbers 2019-11-04 22:57:53 +01:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
gruebel
6b7294a018 Fix sns.add_permission & remove_permission 2019-10-25 17:57:50 +02:00
Mike Grima
4da9ec1346
Merge pull request #2442 from titibike/sns_subscription_attributes
Issue #2441 Add informations in SNS subscriptions `attributes`
2019-10-15 10:05:20 -07:00
gruebel
26ef792690 Add sns.untag_resource 2019-10-12 21:10:51 +02:00
gruebel
726775678c Add sns.tag_resource 2019-10-12 20:37:59 +02:00
gruebel
8d527743d5 Add sns.list_tags_for_resource 2019-10-11 17:58:48 +02:00
Ivan Dromigny
03986df929 Update syntax 2019-10-03 09:53:04 +02:00
Ivan Dromigny
83c8740b91 Add informations in subscriptions attributes 2019-10-02 18:06:34 +02:00
Steve Pulec
8867e91f9e
Merge pull request #2391 from gruebel/master
Add exact Number, exact String.Array and attribute key matching to SN…
2019-09-11 21:46:06 -05:00
gruebel
d8a922811c Add exact Number, exact String.Array and attribute key matching to SNS subscription filter policy and validate filter policy 2019-08-25 21:08:02 +02:00
Randy Westergren
ccceb70397
And event source mapping endpoints and SQS trigger support 2019-08-20 21:54:57 -04:00
Steve Pulec
ac33845367
Merge pull request #2070 from bkovacki/add-attributes-parameter-for-sns-create_topic-api
Add attributes parameter support for sns create_topic API
2019-07-07 23:04:40 -05:00
Brian Engen
6838d7964f handles empty string in SNS next token (#2177) 2019-05-25 10:24:46 +01:00
Berislav Kovacki
7e863b0260 Add attributes parameter support for sns create_topic API 2019-02-21 22:08:46 +01:00
Michael Bell
51db19067c Allow attributes to be set with subscribe command (#1705) 2018-07-13 10:21:33 +01:00
Iain Bullard
cd4dd3cfbf SNS - Enforce 'Message too long' exception when publishing messages 2018-06-04 13:38:58 +00:00
hsuhans
d9a4501d24 Change SNS http header to actual setting 2018-06-02 06:18:27 +08:00
Steve Pulec
b6909ff64c
Merge pull request #1654 from Birne94/sns-raw-message-delivery
Add RawMessageDelivery for SNS subscriptions (fixes #1571)
2018-05-30 09:46:59 -04:00
Daniel Birnstiel
222cb1535c Add RawMessageDelivery for SNS subscriptions (fixes #1571) 2018-05-30 09:30:18 +02:00
Ben Jolitz
289d361463 add check for at least 1 character as the minumum length
REF: http://boto3.readthedocs.io/en/latest/reference/services/sns.html#SNS.Client.create_topic
2018-05-04 19:17:37 -07:00
Ben Jolitz
0ed18c8b8a remove extraneous backslash 2018-05-04 16:33:43 -07:00
Ben Jolitz
b08fc8bede
allow topic names to start/end with _, - 2018-05-04 16:30:47 -07:00
wblackconv
ba2ea8e1b3 Add tests for message attribute validation in SNS (#1582)
* Add tests for message attribute validation in SNS

Fixes up bug in return value of
moto.sns.responses.SNSResponse._parse_message_attributes due to
accidental recycling of a variable.

* Fix test_sns.test_publish_to_http in py36 env

Http response is encoded as a byte string which json.loads can't handle.
2018-04-27 15:10:30 -07:00
Steve Pulec
f37bae5b57
Merge pull request #1574 from wblackconv/add-msg-attributes
Include SNS message attributes with message body when delivering to SQS.
2018-04-18 21:19:21 -04:00
Mike Grima
794b8ba59e SNS now supports all modern boto3 regions. 2018-04-18 11:29:02 -07:00
wblack
f401c60825 Include SNS message attributes with message body when delivering to SQS. 2018-04-18 13:42:36 +00:00
Steve Pulec
3373c5bf13 Fix SNS max subject length. Closes #1503. 2018-04-13 15:17:38 -04:00
Alexander Mohr
941d817da4 fix lambda endpoint parsing (#1395)
* fix endpoint parsing

* add new unittest

* finish test
2018-03-21 22:14:10 -07:00
Iain Bullard
d3d9557d49 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.
2018-03-21 08:49:11 -07:00
Boris Gvozdev
633decc6c0 SNS: do not duplicate subscriptions 2018-01-02 11:30:39 +11:00
Alexander Mohr
9d087b0729 add subject support (#1387) 2017-12-10 21:59:04 +00:00
Adam Gilman
2ad0f2fc1c SNS create_topic should only accept valid characters (#1329)
* SNS create_topic should only accept valid characters

Closes #1328

* Fix flake8 errors

* Updated regex to match full TopicName constraints

Fixed test_server as it contained invalid TopicNames’ per constraints

* fix error message for invalid topic name
2017-11-13 18:27:11 +00:00
Adam Gilman
307ef8ead1 Makes Creating SNS topics idempotent (#1324)
Make creating SNS topics idempotent

Closes #1323
2017-11-06 19:06:55 +00:00
Terry Cain
dce81cf875 Fixed typos ;-)
Thanks @hwine
2017-10-20 14:52:24 +01:00
Terry Cain
bca8e11290 Fixes #1276 SNS Subject validation 2017-10-20 13:19:55 +01:00
Andrew Miller
194da53a0e Correct the type of a default attribute in SNS PlatformEndpoint (#1267)
The `Enabled` Attribute in the PlatformEndpoint of SNS current returns a boolean, however, the 'enabled' property is expecting a string as `.lower()` is called on the result.

This change simply changes the default from `True` to `'True'` so the property works as expected.
2017-10-17 10:42:29 -07:00
Alexander Mohr
9008b85299 lambda + SNS enhancements (#1048)
* updates

- support lambda messages from SNS
- run lambda in docker container

* decode output

* populate timeout

* simplify

* whoops

* skeletons of cloudwatchlogs

* impl filter log streams

* fix logging

* PEP fixes

* PEP fixes

* fix reset

* fix reset

* add new endpoint

* fix region name

* add docker

* try to fix tests

* try to fix travis issue with boto

* fix escaping in urls

* fix environment variables

* fix PEP

* more pep

* switch back to precise

* another fix attempt

* fix typo

* fix lambda invoke

* fix more unittests

* work on getting this to work in new scheme

* fix py2

* fix error

* fix tests when running in server mode

* more lambda fixes

* try running with latest docker

adapted from aiodocker

* switch to docker python client

* pep fixes

* switch to docker volume

* fix unittest

* fix invoke from sns

* fix zip2tar

* add hack impl for get_function with zip

* try fix

* fix for py < 3.6

* add volume refcount

* try to fix travis

* docker test

* fix yaml

* try fix

* update endpoints

* fix

* another attempt

* try again

* fix recursive import

* refactor fix

* revert changes with better fix

* more reverts

* wait for service to come up

* add back detached mode

* sleep and add another exception type

* put this back for logging

* put back with note

* whoops :)

* docker in docker!

* fix invalid url

* hopefully last fix!

* fix lambda regions

* fix protocol

* travis!!!!

* just run lambda test for now

* use one print

* fix escaping

* another attempt

* yet another

* re-enable all tests

* fixes

* fix for py2

* revert change

* fix for py2.7

* fix output ordering

* remove this given there's a new unittest that covers it

* changes based on review

- add skeleton logs test file
- switch to docker image that matches test env
- fix mock_logs import

* add readme entry
2017-09-27 16:04:58 -07:00
Terry Cain
56c65bc67c
Added in publish by phone number 2017-09-26 00:21:07 +01:00
Terry Cain
18cb0bce54
General tidy up 2017-09-21 21:16:00 +01:00