airflow.providers.amazon.aws.hooks.neptune

NeptuneHook

与 Amazon Neptune 交互。

模块内容

class airflow.providers.amazon.aws.hooks.neptune.NeptuneHook(*args, **kwargs)[source]

Bases: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook

与 Amazon Neptune 交互。

可指定其他参数(例如 aws_conn_id),这些参数将传递给底层 AwsBaseHook。

另请参阅

AVAILABLE_STATES = ['available'][source]
STOPPED_STATES = ['stopped'][source]
ERROR_STATES = ['cloning-failed', 'inaccessible-encryption-credentials',...[source]
wait_for_cluster_availability(cluster_id, delay=30, max_attempts=60)[source]

等待 Neptune 集群启动。

参数:
  • cluster_id (str) – 要等待的集群 ID。

  • delay (int) – 两次轮询之间的延迟时间(秒)。

  • max_attempts (int) – 轮询完成的最大尝试次数。

返回:

集群的状态。

返回类型:

str

wait_for_cluster_stopped(cluster_id, delay=30, max_attempts=60)[source]

等待 Neptune 集群停止。

参数:
  • cluster_id (str) – 要等待的集群 ID。

  • delay (int) – 两次轮询之间的延迟时间(秒)。

  • max_attempts (int) – 轮询完成的最大尝试次数。

返回:

集群的状态。

返回类型:

str

get_cluster_status(cluster_id)[source]

获取 Neptune 集群的状态。

参数:

cluster_id (str) – 要获取状态的集群 ID。

返回:

集群的状态。

返回类型:

str

get_db_instance_status(instance_id)[source]

获取 Neptune 实例的状态。

参数:

instance_id (str) – 要获取状态的实例 ID。

返回:

实例的状态。

返回类型:

str

wait_for_cluster_instance_availability(cluster_id, delay=30, max_attempts=60)[source]

等待集群中的 Neptune 实例可用。

参数:
  • cluster_id (str) – 要等待的实例所属集群的 ID。

  • delay (int) – 两次轮询之间的延迟时间(秒)。

  • max_attempts (int) – 轮询完成的最大尝试次数。

返回:

实例的状态。

返回类型:

None

此条目是否有帮助?