Connection module for Amazon SNS
configuration: | This module accepts explicit sns credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
If IAM roles are not used you need to specify them either in a pillar or in the minion's config file: sns.keyid: GKTADJGHEIQSXMKKRBJ08H
sns.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
A region may also be specified in the configuration: sns.region: us-east-1
If a region is not specified, the default is us-east-1. It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config: myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
|
---|---|
depends: | boto |
salt.modules.boto_sns.
create
(name, region=None, key=None, keyid=None, profile=None)¶Create an SNS topic.
CLI example to create a topic:
salt myminion boto_sns.create mytopic region=us-east-1
salt.modules.boto_sns.
delete
(name, region=None, key=None, keyid=None, profile=None)¶Delete an SNS topic.
CLI example to delete a topic:
salt myminion boto_sns.delete mytopic region=us-east-1
salt.modules.boto_sns.
exists
(name, region=None, key=None, keyid=None, profile=None)¶Check to see if an SNS topic exists.
CLI example:
salt myminion boto_sns.exists mytopic region=us-east-1
salt.modules.boto_sns.
get_all_subscriptions_by_topic
(name, region=None, key=None, keyid=None, profile=None)¶Get list of all subscriptions to a specific topic.
CLI example to delete a topic:
salt myminion boto_sns.get_all_subscriptions_by_topic mytopic region=us-east-1
salt.modules.boto_sns.
get_all_topics
(region=None, key=None, keyid=None, profile=None)¶Returns a list of the all topics..
CLI example:
salt myminion boto_sns.get_all_topics
salt.modules.boto_sns.
get_arn
(name, region=None, key=None, keyid=None, profile=None)¶Returns the full ARN for a given topic name.
CLI example:
salt myminion boto_sns.get_arn mytopic
salt.modules.boto_sns.
subscribe
(topic, protocol, endpoint, region=None, key=None, keyid=None, profile=None)¶Subscribe to a Topic.
CLI example to delete a topic:
salt myminion boto_sns.subscribe mytopic https https://www.example.com/sns-endpoint region=us-east-1