airflow.providers.amazon.aws.operators.eventbridge¶
类¶
将事件放置到 Amazon EventBridge 上。 |
|
创建或更新指定的 EventBridge 规则。 |
|
启用 EventBridge 规则。 |
|
禁用 EventBridge 规则。 |
模块内容¶
- 类 airflow.providers.amazon.aws.operators.eventbridge.EventBridgePutEventsOperator(*, entries, endpoint_id=None, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator
[airflow.providers.amazon.aws.hooks.eventbridge.EventBridgeHook
]将事件放置到 Amazon EventBridge 上。
另请参阅
有关如何使用此操作符的更多信息,请参阅指南:发送事件到 Amazon EventBridge
- 参数:
entries (list[dict]) – 要放置到 EventBridge 上的事件列表,每个事件是一个字典(必填)
endpoint_id (str | None) – 端点的 URL 子域名
aws_conn_id – 用于 AWS 凭证的 Airflow 连接。如果为
None
或为空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或为空,则将使用默认的 boto3 配置(且必须在每个工作节点上维护)。region_name – AWS region_name。如果未指定,则使用默认的 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.htmlt
- template_fields: collections.abc.Sequence[str][source]¶
- 类 airflow.providers.amazon.aws.operators.eventbridge.EventBridgePutRuleOperator(*, name, description=None, event_bus_name=None, event_pattern=None, role_arn=None, schedule_expression=None, state=None, tags=None, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator
[airflow.providers.amazon.aws.hooks.eventbridge.EventBridgeHook
]创建或更新指定的 EventBridge 规则。
另请参阅
有关如何使用此操作符的更多信息,请参阅指南:在 Amazon EventBridge 上创建或更新规则
- 参数:
name (str) – 要创建或更新的规则名称(必填)
description (str | None) – 规则描述
event_bus_name (str | None) – 要与此规则关联的事件总线的名称或 ARN
event_pattern (str | None) – 要与此规则匹配的事件模式
role_arn (str | None) – 与规则关联的 IAM 角色的 Amazon Resource Name
schedule_expression (str | None) – 调度表达式(例如,cron 或 rate 表达式)
state (str | None) – 指示规则是设置为“ENABLED”还是“DISABLED”
tags (list | None) – 要与规则关联的键值对列表
aws_conn_id – 用于 AWS 凭证的 Airflow 连接。如果为
None
或为空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或为空,则将使用默认的 boto3 配置(且必须在每个工作节点上维护)。region_name – AWS region_name。如果未指定,则使用默认的 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.htmlt
- template_fields: collections.abc.Sequence[str][source]¶
- 类 airflow.providers.amazon.aws.operators.eventbridge.EventBridgeEnableRuleOperator(*, name, event_bus_name=None, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator
[airflow.providers.amazon.aws.hooks.eventbridge.EventBridgeHook
]启用 EventBridge 规则。
另请参阅
有关如何使用此操作符的更多信息,请参阅指南:在 Amazon EventBridge 上启用规则
- 参数:
name (str) – 要启用的规则名称
event_bus_name (str | None) – 与规则关联的事件总线的名称或 ARN(如果省略则为默认值)
aws_conn_id – 用于 AWS 凭证的 Airflow 连接。如果为
None
或为空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或为空,则将使用默认的 boto3 配置(且必须在每个工作节点上维护)。region_name – AWS region_name。如果未指定,则使用默认的 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.htmlt
- template_fields: collections.abc.Sequence[str][source]¶
- 类 airflow.providers.amazon.aws.operators.eventbridge.EventBridgeDisableRuleOperator(*, name, event_bus_name=None, **kwargs)[source]¶
Bases:
airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator
[airflow.providers.amazon.aws.hooks.eventbridge.EventBridgeHook
]禁用 EventBridge 规则。
另请参阅
有关如何使用此操作符的更多信息,请参阅指南:在 Amazon EventBridge 上禁用规则
- 参数:
name (str) – 要禁用的规则名称
event_bus_name (str | None) – 与规则关联的事件总线的名称或 ARN(如果省略则为默认值)
aws_conn_id – 用于 AWS 凭证的 Airflow 连接。如果为
None
或为空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或为空,则将使用默认的 boto3 配置(且必须在每个工作节点上维护)。region_name – AWS region_name。如果未指定,则使用默认的 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.htmlt
- template_fields: collections.abc.Sequence[str][source]¶