salt.modules.boto3_sns

Connection module for Amazon SNS

configuration

This module accepts explicit sns credentials but can also utilize IAM roles assigned to the instance through 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

boto3

salt.modules.boto3_sns.create_topic(Name, region=None, key=None, keyid=None, profile=None)

Create an SNS topic.

CLI Example:

salt myminion boto3_sns.create_topic mytopic region=us-east-1

salt.modules.boto3_sns.delete_topic(TopicArn, region=None, key=None, keyid=None, profile=None)

Delete an SNS topic.

CLI Example:

salt myminion boto3_sns.delete_topic mytopic region=us-east-1

salt.modules.boto3_sns.describe_topic(name, region=None, key=None, keyid=None, profile=None)

Returns details about a specific SNS topic, specified by name or ARN.

CLI Example:

salt my_favorite_client boto3_sns.describe_topic a_sns_topic_of_my_choice

salt.modules.boto3_sns.get_subscription_attributes(SubscriptionArn, region=None, key=None, keyid=None, profile=None)

Returns all of the properties of a subscription.

CLI Example:

salt myminion boto3_sns.get_subscription_attributes somesubscription region=us-west-1

salt.modules.boto3_sns.get_topic_attributes(TopicArn, region=None, key=None, keyid=None, profile=None)

Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.

CLI Example:

salt myminion boto3_sns.get_topic_attributes someTopic region=us-west-1

salt.modules.boto3_sns.list_subscriptions(region=None, key=None, keyid=None, profile=None)

Returns a list of the requester's topics

CLI Example:

salt myminion boto3_sns.list_subscriptions region=us-east-1

salt.modules.boto3_sns.list_subscriptions_by_topic(TopicArn, region=None, key=None, keyid=None, profile=None)

Returns a list of the subscriptions to a specific topic

CLI Example:

salt myminion boto3_sns.list_subscriptions_by_topic mytopic region=us-east-1

salt.modules.boto3_sns.list_topics(region=None, key=None, keyid=None, profile=None)

Returns a list of the requester's topics

CLI Example:

salt myminion boto3_sns.list_topics

salt.modules.boto3_sns.set_subscription_attributes(SubscriptionArn, AttributeName, AttributeValue, region=None, key=None, keyid=None, profile=None)

Set an attribute of a subscription to a new value.

CLI Example:

salt myminion boto3_sns.set_subscription_attributes someSubscription RawMessageDelivery jsonStringValue

salt.modules.boto3_sns.set_topic_attributes(TopicArn, AttributeName, AttributeValue, region=None, key=None, keyid=None, profile=None)

Set an attribute of a topic to a new value.

CLI Example:

salt myminion boto3_sns.set_topic_attributes someTopic DisplayName myDisplayNameValue

salt.modules.boto3_sns.subscribe(TopicArn, Protocol, Endpoint, region=None, key=None, keyid=None, profile=None)

Subscribe to a Topic.

CLI Example:

salt myminion boto3_sns.subscribe mytopic https https://www.example.com/sns-endpoint

salt.modules.boto3_sns.topic_exists(name, region=None, key=None, keyid=None, profile=None)

Check to see if an SNS topic exists.

CLI Example:

salt myminion boto3_sns.topic_exists mytopic region=us-east-1

salt.modules.boto3_sns.unsubscribe(SubscriptionArn, region=None, key=None, keyid=None, profile=None)

Unsubscribe a specific SubscriptionArn of a topic.

CLI Example:

salt myminion boto3_sns.unsubscribe my_subscription_arn region=us-east-1

© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.boto3_sns.html