ExAws.SNS (ExAws.SNS v2.2.0) View Source

Operations on AWS Simple Notification Service (SNS).

See http://docs.aws.amazon.com/sns/latest/api/API_Operations.html for details.

Link to this section Summary

Functions

Delete topic.

Get endpoint attributes.

Get subscription attributes.

Get topic attributes.

List endpoints and endpoint attributes for devices in a supported push notification service.

List phone numbers opted out.

List platform applications.

List Subscriptions.

Opt in phone number.

Publish message to a target/topic ARN.

Verify message signature.

Link to this section Types

Specs

endpoint_arn() :: binary()

Specs

endpoint_attributes() :: [
  token: binary(),
  enabled: boolean(),
  custom_user_data: binary()
]
Link to this type

list_endpoints_by_platform_application_opt()

View Source

Specs

list_endpoints_by_platform_application_opt() :: {:next_token, binary()}
Link to this type

list_subscriptions_by_topic_opt()

View Source

Specs

list_subscriptions_by_topic_opt() :: {:next_token, binary()}

Specs

message_attribute() :: %{
  name: binary(),
  data_type: :string | :number | :binary,
  value: {:string, binary()} | {:binary, binary()}
}
Link to this type

platform_application_arn()

View Source

Specs

platform_application_arn() :: binary()

Specs

publish_opts() :: [
  message_attributes: [message_attribute()],
  message_structure: :json,
  subject: binary(),
  phone_number: binary(),
  target_arn: binary(),
  topic_arn: binary()
]

Specs

subscribe_opt() :: {:return_subscription_arn, boolean()}
Link to this type

subscription_attribute_name()

View Source

Specs

subscription_attribute_name() ::
  :delivery_policy | :filter_policy | :raw_message_delivery

Specs

topic_arn() :: binary()
Link to this type

topic_attribute_name()

View Source

Specs

topic_attribute_name() :: :policy | :display_name | :delivery_policy

Specs

topic_attributes() :: [
  {atom(), binary()} | {atom(), boolean()} | {atom(), integer()}
]

Specs

topic_name() :: binary()

Link to this section Functions

Link to this function

build_message_attribute(arg, params)

View Source
Link to this function

confirm_subscription(topic_arn, token, authenticate_on_unsubscribe \\ false)

View Source

Specs

confirm_subscription(
  topic_arn :: binary(),
  token :: binary(),
  authenticate_on_unsubscribe :: boolean()
) :: ExAws.Operation.Query.t()

Confirm Subscription.

Link to this function

create_platform_application(name, platform, attributes)

View Source

Specs

create_platform_application(
  name :: binary(),
  platform :: binary(),
  attributes :: %{required(String.t()) => String.t()}
) :: ExAws.Operation.Query.t()

Create plaform application.

Link to this function

create_platform_endpoint(platform_application_arn, token, custom_user_data \\ nil)

View Source

Specs

create_platform_endpoint(
  platform_application_arn :: platform_application_arn(),
  token :: binary(),
  custom_user_data :: binary() | nil
) :: ExAws.Operation.Query.t()

Create platform endpoint.

Link to this function

create_topic(topic_name, attributes \\ [])

View Source

Specs

create_topic(topic_name :: topic_name(), attributes :: topic_attributes()) ::
  ExAws.Operation.Query.t()

Create topic.

Link to this function

delete_endpoint(endpoint_arn)

View Source

Specs

delete_endpoint(endpoint_arn :: endpoint_arn()) :: ExAws.Operation.Query.t()

Delete endpoint.

Link to this function

delete_platform_application(platform_application_arn)

View Source

Specs

delete_platform_application(
  platform_application_arn :: platform_application_arn()
) :: ExAws.Operation.Query.t()

Delete platform application.

Specs

delete_topic(topic_arn :: topic_arn()) :: ExAws.Operation.Query.t()

Delete topic.

Link to this function

get_endpoint_attributes(endpoint_arn)

View Source

Specs

get_endpoint_attributes(endpoint_arn :: endpoint_arn()) ::
  ExAws.Operation.Query.t()

Get endpoint attributes.

Link to this function

get_platform_application_attributes(platform_application_arn)

View Source

Specs

get_platform_application_attributes(
  platform_application_arn :: platform_application_arn()
) :: ExAws.Operation.Query.t()

Get platform application attributes.

Link to this function

get_subscription_attributes(subscription_arn)

View Source

Specs

get_subscription_attributes(subscription_arn :: binary()) ::
  ExAws.Operation.Query.t()

Get subscription attributes.

Link to this function

get_topic_attributes(topic_arn)

View Source

Specs

get_topic_attributes(topic_arn :: topic_arn()) :: ExAws.Operation.Query.t()

Get topic attributes.

Link to this function

list_endpoints_by_platform_application(platform_application_arn, opts \\ [])

View Source

Specs

list_endpoints_by_platform_application(topic_arn :: topic_arn(), [
  list_endpoints_by_platform_application_opt()
]) :: ExAws.Operation.Query.t()

List endpoints and endpoint attributes for devices in a supported push notification service.

Link to this function

list_phone_numbers_opted_out()

View Source

Specs

list_phone_numbers_opted_out() :: ExAws.Operation.Query.t()

List phone numbers opted out.

Link to this function

list_phone_numbers_opted_out(next_token)

View Source

Specs

list_phone_numbers_opted_out(next_token :: binary()) ::
  ExAws.Operation.Query.t()
Link to this function

list_platform_applications()

View Source

Specs

list_platform_applications() :: ExAws.Operation.Query.t()

List platform applications.

Link to this function

list_platform_applications(next_token)

View Source

Specs

list_platform_applications(next_token :: binary()) :: ExAws.Operation.Query.t()

Specs

list_subscriptions() :: ExAws.Operation.Query.t()

List Subscriptions.

Link to this function

list_subscriptions(next_token)

View Source

Specs

list_subscriptions(next_token :: binary()) :: ExAws.Operation.Query.t()
Link to this function

list_subscriptions_by_topic(topic_arn, opts \\ [])

View Source

Specs

list_subscriptions_by_topic(topic_arn :: topic_arn(), [
  list_subscriptions_by_topic_opt()
]) :: ExAws.Operation.Query.t()

List Subscriptions by Topic.

Specs

list_topics(opts :: [{:next_token, binary()}]) :: ExAws.Operation.Query.t()

List topics

Link to this function

opt_in_phone_number(phone_number)

View Source

Specs

opt_in_phone_number(phone_number :: binary()) :: ExAws.Operation.Query.t()

Opt in phone number.

Specs

publish(message :: binary(), opts :: publish_opts()) ::
  ExAws.Operation.Query.t()

Publish message to a target/topic ARN.

You must set either :phone_number, :target_arn or :topic_arn but only one, via the options argument.

Do NOT assume that because your message is a JSON blob that you should set :message_structure to :json. This has a very specific meaning, see http://docs.aws.amazon.com/sns/latest/api/API_Publish.html for details.

Link to this function

set_endpoint_attributes(endpoint_arn, attributes)

View Source

Specs

set_endpoint_attributes(
  endpoint_arn :: endpoint_arn(),
  attributes :: endpoint_attributes()
) :: ExAws.Operation.Query.t()

Set endpoint attributes.

Link to this function

set_subscription_attributes(attribute_name, attribute_value, subscription_arn)

View Source

Specs

set_subscription_attributes(
  attribute_name :: subscription_attribute_name(),
  attribute_value :: binary(),
  subscription_arn :: binary()
) :: ExAws.Operation.Query.t()

Set subscription attributes.

Link to this function

set_topic_attributes(attribute_name, attribute_value, topic_arn)

View Source

Specs

set_topic_attributes(
  attribute_name :: topic_attribute_name(),
  attribute_value :: binary(),
  topic_arn :: topic_arn()
) :: ExAws.Operation.Query.t()

Set topic attributes.

Link to this function

subscribe(topic_arn, protocol, endpoint, opts \\ [])

View Source

Specs

subscribe(topic_arn :: binary(), protocol :: binary(), endpoint :: binary(), [
  subscribe_opt()
]) :: ExAws.Operation.Query.t()

Create Subscription.

Link to this function

unsubscribe(subscription_arn)

View Source

Specs

unsubscribe(subscription_arn :: binary()) :: ExAws.Operation.Query.t()

Unsubscribe.

Link to this function

verify_message(message_params)

View Source

Specs

verify_message(message_params :: %{required(String.t()) => String.t()}) ::
  :ok | {:error, String.t()}

Verify message signature.