airflow.providers.amazon.aws.operators.neptune

NeptuneStartDbClusterOperator

启动 Amazon Neptune 数据库集群。

NeptuneStopDbClusterOperator

停止 Amazon Neptune 数据库集群。

函数

handle_waitable_exception(operator, err)

处理因集群或实例状态临时无效而引发的客户端异常。

模块内容

airflow.providers.amazon.aws.operators.neptune.handle_waitable_exception(operator, err)[source]

处理因集群或实例状态临时无效而引发的客户端异常。

状态更改后,可以重试。等待器 (Waiter) 将处理终止状态。

class airflow.providers.amazon.aws.operators.neptune.NeptuneStartDbClusterOperator(db_cluster_id, wait_for_completion=True, waiter_delay=30, waiter_max_attempts=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.neptune.NeptuneHook]

启动 Amazon Neptune 数据库集群。

Amazon Neptune 数据库是专为卓越可扩展性和可用性而设计的无服务器图数据库。Neptune 数据库提供内置安全性、持续备份以及与其他 AWS 服务的集成。

另请参阅

有关如何使用此操作符的更多信息,请参阅指南: 启动 Neptune 数据库集群

参数:
  • db_cluster_id (str) – 要启动的 Neptune 数据库集群的数据库集群标识符。

  • wait_for_completion (bool) – 是否等待集群启动完成。(默认值: True)

  • deferrable (bool) – 如果为 True,操作符将异步等待集群启动完成。这意味着需要等待完成。此模式需要安装 aiobotocore 模块。(默认值: False)

  • waiter_delay (int) – 状态检查之间的等待时间(秒)。

  • waiter_max_attempts (int) – 检查任务完成的最大尝试次数。

  • aws_conn_id – 用于 AWS 凭据的 Airflow 连接。如果为 None 或空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或空,则将使用默认的 boto3 配置(且必须在每个工作节点上维护)。

  • region_name – AWS region_name。如果未指定,则使用默认的 boto3 行为。

  • botocore_config – botocore 客户端的配置字典(键值对)。参见:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

返回值:

包含 Neptune 集群 ID 的字典

aws_hook_class[source]
template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
wait_for_completion = True[source]
deferrable = True[source]
waiter_delay = 30[source]
waiter_max_attempts = 60[source]
execute(context, event=None, **kwargs)[source]

创建操作符时派生。

Context 与渲染 jinja 模板时使用的字典相同。

请参阅 get_template_context 以获取更多上下文信息。

execute_complete(context, event=None)[source]
class airflow.providers.amazon.aws.operators.neptune.NeptuneStopDbClusterOperator(db_cluster_id, wait_for_completion=True, waiter_delay=30, waiter_max_attempts=60, deferrable=conf.getboolean('operators', 'default_deferrable', fallback=False), **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.base_aws.AwsBaseOperator[airflow.providers.amazon.aws.hooks.neptune.NeptuneHook]

停止 Amazon Neptune 数据库集群。

Amazon Neptune 数据库是专为卓越可扩展性和可用性而设计的无服务器图数据库。Neptune 数据库提供内置安全性、持续备份以及与其他 AWS 服务的集成。

另请参阅

有关如何使用此操作符的更多信息,请参阅指南: 启动 Neptune 数据库集群

参数:
  • db_cluster_id (str) – 要停止的 Neptune 数据库集群的数据库集群标识符。

  • wait_for_completion (bool) – 是否等待集群停止完成。(默认值: True)

  • deferrable (bool) – 如果为 True,操作符将异步等待集群停止完成。这意味着需要等待完成。此模式需要安装 aiobotocore 模块。(默认值: False)

  • waiter_delay (int) – 状态检查之间的等待时间(秒)。

  • waiter_max_attempts (int) – 检查任务完成的最大尝试次数。

  • aws_conn_id – 用于 AWS 凭据的 Airflow 连接。如果为 None 或空,则使用默认的 boto3 行为。如果以分布式方式运行 Airflow 且 aws_conn_id 为 None 或空,则将使用默认的 boto3 配置(且必须在每个工作节点上维护)。

  • region_name – AWS region_name。如果未指定,则使用默认的 boto3 行为。

  • botocore_config – botocore 客户端的配置字典(键值对)。参见:https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

返回值:

包含 Neptune 集群 ID 的字典

aws_hook_class[source]
template_fields: collections.abc.Sequence[str][source]
cluster_id[source]
wait_for_completion = True[source]
deferrable = True[source]
waiter_delay = 30[source]
waiter_max_attempts = 60[source]
execute(context, event=None, **kwargs)[source]

创建操作符时派生。

Context 与渲染 jinja 模板时使用的字典相同。

请参阅 get_template_context 以获取更多上下文信息。

execute_complete(context, event=None)[source]

此条目有帮助吗?