airflow.providers.amazon.aws.hooks.neptune

Module Contents

Classes

NeptuneHook

Interact with Amazon Neptune.

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

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

Interact with Amazon Neptune.

Additional arguments (such as aws_conn_id) may be specified and are passed down to the underlying AwsBaseHook.

See also

AVAILABLE_STATES = ['available'][source]
STOPPED_STATES = ['stopped'][source]
wait_for_cluster_availability(cluster_id, delay=30, max_attempts=60)[source]

Wait for Neptune cluster to start.

Parameters
  • cluster_id (str) – The ID of the cluster to wait for.

  • delay (int) – Time in seconds to delay between polls.

  • max_attempts (int) – Maximum number of attempts to poll for completion.

Returns

The status of the cluster.

Return type

str

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

Wait for Neptune cluster to stop.

Parameters
  • cluster_id (str) – The ID of the cluster to wait for.

  • delay (int) – Time in seconds to delay between polls.

  • max_attempts (int) – Maximum number of attempts to poll for completion.

Returns

The status of the cluster.

Return type

str

get_cluster_status(cluster_id)[source]

Get the status of a Neptune cluster.

Parameters

cluster_id (str) – The ID of the cluster to get the status of.

Returns

The status of the cluster.

Return type

str

Was this entry helpful?