astronomer.providers.amazon.aws.hooks.redshift_cluster

Module Contents

Classes

RedshiftHookAsync

Interact with AWS Redshift using aiobotocore python library

Attributes

log

astronomer.providers.amazon.aws.hooks.redshift_cluster.log[source]
class astronomer.providers.amazon.aws.hooks.redshift_cluster.RedshiftHookAsync(*args, **kwargs)[source]

Bases: astronomer.providers.amazon.aws.hooks.base_aws_async.AwsBaseHookAsync

Interact with AWS Redshift using aiobotocore python library

async cluster_status(self, cluster_identifier)[source]

Connects to the AWS redshift cluster via aiobotocore and get the status and returns the status of the cluster based on the cluster_identifier passed

Parameters

cluster_identifier (str) – unique identifier of a cluster

async pause_cluster(self, cluster_identifier)[source]

Connects to the AWS redshift cluster via aiobotocore and pause the cluster based on the cluster_identifier passed

Parameters

cluster_identifier (str) – unique identifier of a cluster

async resume_cluster(self, cluster_identifier)[source]

Connects to the AWS redshift cluster via aiobotocore and resume the cluster for the cluster_identifier passed

Parameters

cluster_identifier (str) – unique identifier of a cluster

async get_cluster_status(self, cluster_identifier, expected_state, flag)[source]

Make call self.cluster_status to know the status and run till the expected_state is met and set the flag

Parameters
  • cluster_identifier (str) – unique identifier of a cluster

  • expected_state (str) – expected_state example(“available”, “pausing”, “paused””)

  • flag (asyncio.Event) – asyncio even flag set true if success and if any error