airflow.providers.amazon.aws.operators.sns¶
发布消息到 SNS 主题。
类¶
发布消息到 Amazon SNS。 |
模块内容¶
- class airflow.providers.amazon.aws.operators.sns.SnsPublishOperator(*, target_arn, message, subject=None, message_attributes=None, **kwargs)[source]¶
基类:
airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator
[airflow.providers.amazon.aws.hooks.sns.SnsHook
]发布消息到 Amazon SNS。
参见
有关如何使用此 Operator 的更多信息,请参阅指南:发布消息到现有的 SNS 主题
- 参数:
target_arn (str) – TopicArn 或 EndpointArn
message (str) – 要发送的默认消息(可模板化)
subject (str | None) – 要发送的消息主题(可模板化)
message_attributes (dict | None) – 要以平面字典形式发送的消息属性(数据类型将自动确定)
aws_conn_id – 用于 AWS 凭据的 Airflow 连接。如果为
None
或空,则使用 boto3 默认行为。如果在分布式环境中运行 Airflow 并且 aws_conn_id 为 None 或空,则将使用 boto3 默认配置(并且必须在每个 worker 节点上维护此配置)。region_name – AWS 区域名称。如果未指定,则使用 boto3 默认行为。
verify – 是否验证 SSL 证书。参见: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html
botocore_config – 用于 botocore 客户端的配置字典(键值对)。参见: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html
- template_fields: collections.abc.Sequence[str][source]¶