airflow.providers.amazon.aws.sensors.opensearch_serverless¶
类¶
轮询 Collection 的状态直到其达到最终状态;如果查询失败则失败。 |
模块内容¶
- class airflow.providers.amazon.aws.sensors.opensearch_serverless.OpenSearchServerlessCollectionActiveSensor(*, collection_id=None, collection_name=None, poke_interval=10, max_retries=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]¶
基类:
airflow.providers.amazon.aws.sensors.base_aws.AwsBaseSensor
[airflow.providers.amazon.aws.hooks.opensearch_serverless.OpenSearchServerlessHook
]轮询 Collection 的状态直到其达到最终状态;如果查询失败则失败。
另请参见
有关如何使用此传感器的更多信息,请参阅指南:《等待 Amazon OpenSearch Serverless Collection 变为活跃》
- 参数:
collection_id (str | None) – Collection ID。在同一请求中不能同时提供名称和 ID。
collection_name (str | None) – Collection 名称。在同一请求中不能同时提供名称和 ID。
deferrable (bool) – 如果为 True,传感器将以可延迟模式运行。此模式需要安装 aiobotocore 模块。(默认值:False,但可以在配置文件中设置 default_deferrable 为 True 来覆盖)
poke_interval (int) – 轮询周期,单位为秒,用于检查作业状态。(默认值:10)
max_retries (int) – 返回当前状态前的重试次数(默认值:60)
aws_conn_id – 用于 AWS 凭证的 Airflow 连接。如果此项为
None
或为空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或为空,则将使用默认的 boto3 配置(且必须在每个 worker 节点上维护)。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.html
- template_fields: collections.abc.Sequence[str][source]¶