ExAwsConfigurator.SNS (ExAwsConfigurator v1.4.1) View Source
Link to this section Summary
Functions
Create an sns topic, based on ex_aws_configurator configuration
Publish an message to a topic based on clan configuration
Link to this section Functions
Specs
Create an sns topic, based on ex_aws_configurator configuration
raises ExAwsConfigurator.NoResultsError
if no configuration was found.
for the example below, we will consider the following settings
# config/config.exs
config :ex_aws_configurator,
...
topics: %{
an_topic: %{
region: "us-east-1",
prefix: "topic_prefix",
environment: "environment"
}
}
Examples
ExAwsConfigurator.create_topic(:an_topic)
#=> {:ok, term()}
will create a topic named prefix + environment + map_key
, the result will be topic_prefix_environment_an_topic on region us-east-1
the response term() will be the ExAws
response without any modification
ExAwsConfigurator.get_queue(:not_exist)
#=> ** (ExAwsConfigurator.NoResultsError) the configuration for queue not_exist is not set
Specs
Publish an message to a topic based on clan configuration