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

此條目是否有幫助?