airflow.providers.amazon.aws.notifications.sns

属性

send_sns_notification

SnsNotifier

Amazon SNS(Simple Notification Service)通知器。

模块内容

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, **kwargs)[source]

Bases: airflow.providers.common.compat.notifier.BaseNotifier

Amazon SNS(Simple Notification Service)通知器。

另请参阅

欲了解如何使用此通知器,请参阅指南: Amazon 简单通知服务(Amazon SNS)通知使用指南

参数:
  • aws_conn_id (str | None) – 用于 AWS 凭证的 Amazon Web Services 连接 ID。如果为 None 或为空,则使用默认的 boto3 行为。

  • target_arn (str) – 可以是 TopicArn 或 EndpointArn。

  • message (str) – 您想发送的消息。

  • subject (str | None) – 您想发送的消息主题。

  • message_attributes (dict | None) – 您想发送的消息属性,采用平面字典形式(数据类型将自动确定)。

  • region_name (str | None) – AWS 区域名称。如果未指定,则使用默认的 boto3 行为。

template_fields: collections.abc.Sequence[str] = ('target_arn', 'message', 'subject', 'message_attributes', 'aws_conn_id', 'region_name')[source]
aws_conn_id = 'aws_default'[source]
region_name = None[source]
target_arn[source]
message[source]
subject = None[source]
message_attributes = None[source]
property hook: airflow.providers.amazon.aws.hooks.sns.SnsHook[source]

Amazon SNS Hook(已缓存)。

notify(context)[source]

将通知消息发布到 Amazon SNS。

async async_notify(context)[source]

将通知消息异步发布到 Amazon SNS。

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

此条目是否有帮助?