airflow.providers.amazon.aws.notifications.sns

Module Contents

Classes

SnsNotifier

Amazon SNS (Simple Notification Service) Notifier.

Attributes

send_sns_notification

class airflow.providers.amazon.aws.notifications.sns.SnsNotifier(*, aws_conn_id=SnsHook.default_conn_name, target_arn, message, subject=None, message_attributes=None, region_name=None)[source]

Bases: airflow.notifications.basenotifier.BaseNotifier

Amazon SNS (Simple Notification Service) Notifier.

See also

For more information on how to use this notifier, take a look at the guide: How-to Guide for Amazon Simple Notification Service (Amazon SNS) notifications

Parameters
  • aws_conn_id (str | None) – The Amazon Web Services Connection id used for AWS credentials. If this is None or empty then the default boto3 behaviour is used.

  • target_arn (str) – Either a TopicArn or an EndpointArn.

  • message (str) – The message you want to send.

  • subject (str | None) – The message subject you want to send.

  • message_attributes (dict | None) – The message attributes you want to send as a flat dict (data type will be determined automatically).

  • region_name (str | None) – AWS region_name. If not specified then the default boto3 behaviour is used.

template_fields: Sequence[str] = ('target_arn', 'message', 'subject', 'message_attributes', 'aws_conn_id', 'region_name')[source]
hook()[source]

Amazon SNS Hook (cached).

notify(context)[source]

Publish the notification message to Amazon SNS.

airflow.providers.amazon.aws.notifications.sns.send_sns_notification[source]

Was this entry helpful?