airflow.providers.amazon.aws.notifications.sqs

屬性

send_sqs_notification

SqsNotifier

Amazon SQS (Simple Queue Service) 通知器。

模組內容

class airflow.providers.amazon.aws.notifications.sqs.SqsNotifier(*, aws_conn_id=SqsHook.default_conn_name, queue_url, message_body, message_attributes=None, message_group_id=None, delay_seconds=0, region_name=None)[source]

基類: airflow.providers.common.compat.notifier.BaseNotifier

Amazon SQS (Simple Queue Service) 通知器。

另請參閱

有關如何使用此通知器的更多資訊,請參閱指南: Amazon Simple Queue Service (Amazon SQS) 通知操作指南

引數:
  • aws_conn_id (str | None) – 用於 AWS 憑證的 Amazon Web Services 連線 id。如果為 None 或為空,則使用預設的 boto3 行為。

  • queue_url (str) – 傳送訊息到的 Amazon SQS 佇列的 URL。

  • message_body (str) – 要傳送的訊息。

  • message_attributes (dict | None) – 訊息的附加屬性。有關 attributes 引數的詳細資訊,請參閱 botocore.client.SQS.send_message()

  • message_group_id (str | None) – 此引數僅適用於 FIFO (first-in-first-out) 佇列。有關 attributes 引數的詳細資訊,請參閱 botocore.client.SQS.send_message()

  • delay_seconds (int) – 延遲訊息的時間長度,以秒為單位。

  • region_name (str | None) – AWS region_name。如果未指定,則使用預設的 boto3 行為。

template_fields: collections.abc.Sequence[str] = ('queue_url', 'message_body', 'message_attributes', 'message_group_id', 'delay_seconds',...[source]
aws_conn_id = 'aws_default'[source]
region_name = None[source]
queue_url[source]
message_body[source]
message_attributes[source]
message_group_id = None[source]
delay_seconds = 0[source]
property hook: airflow.providers.amazon.aws.hooks.sqs.SqsHook[source]

Amazon SQS Hook(已快取)。

notify(context)[source]

將通知訊息釋出到 Amazon SQS 佇列。

airflow.providers.amazon.aws.notifications.sqs.send_sqs_notification[source]

此條目有幫助嗎?