| :mod:`airflow.contrib.hooks.aws_sns_hook` |
| ========================================= |
| |
| .. py:module:: airflow.contrib.hooks.aws_sns_hook |
| |
| .. autoapi-nested-parse:: |
| |
| This module contains AWS SNS hook |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| .. function:: _get_message_attribute(o) |
| |
| .. py:class:: AwsSnsHook(*args, **kwargs) |
| |
| Bases: :class:`airflow.contrib.hooks.aws_hook.AwsHook` |
| |
| Interact with Amazon Simple Notification Service. |
| |
| |
| .. method:: get_conn(self) |
| |
| Get an SNS connection |
| |
| |
| |
| |
| .. method:: publish_to_target(self, target_arn, message, subject=None, message_attributes=None) |
| |
| Publish a message to a topic or an endpoint. |
| |
| :param target_arn: either a TopicArn or an EndpointArn |
| :type target_arn: str |
| :param message: the default message you want to send |
| :param message: str |
| :param subject: subject of message |
| :type subject: str |
| :param message_attributes: additional attributes to publish for message filtering. This should be |
| a flat dict; the DataType to be sent depends on the type of the value: |
| |
| - bytes = Binary |
| - str = String |
| - int, float = Number |
| - iterable = String.Array |
| :type message_attributes: dict |
| |
| |
| |
| |