astronomer.providers.amazon.aws.operators.redshift_cluster

Module Contents

Classes

RedshiftResumeClusterOperatorAsync

Resume a paused AWS Redshift Cluster, and

RedshiftPauseClusterOperatorAsync

Pause an AWS Redshift Cluster if cluster status is in available state, and

class astronomer.providers.amazon.aws.operators.redshift_cluster.RedshiftResumeClusterOperatorAsync(*, poll_interval=5, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.redshift_cluster.RedshiftResumeClusterOperator

Resume a paused AWS Redshift Cluster, and Few points on the cluster creation to avoid this type of Exception ex:- ‘You can’t Resume cluster redshift-cluster-1 because no recently available backup was found. Create a manual snapshot or wait for an automated snapshot, then retry’ 1.While creating the cluster make sure it is created in unique and snapshot is created (or) 2.If it is created with previously deleted cluster name make sure there is a snapshot in the cluster. (or) 3.Delete the cluster with snapshot created (it is not suggested because this snapshot storage is chargeable)

Parameters
  • cluster_identifier – id of the AWS Redshift Cluster

  • aws_conn_id – aws connection to use

execute(self, context)[source]

Logic that the operator uses to correctly identify which trigger to execute, and defer execution as expected.

execute_complete(self, context, event=None)[source]

Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful.

class astronomer.providers.amazon.aws.operators.redshift_cluster.RedshiftPauseClusterOperatorAsync(*, poll_interval=5, **kwargs)[source]

Bases: airflow.providers.amazon.aws.operators.redshift_cluster.RedshiftPauseClusterOperator

Pause an AWS Redshift Cluster if cluster status is in available state, and Few points on the cluster creation to avoid this type of Exception ex:- ‘You can’t pause cluster redshift-cluster-1 because no recently available backup was found. Create a manual snapshot or wait for an automated snapshot, then retry’ 1.While creating the cluster make sure it is created in unique and snapshot is created (or) 2.If it is created with previously deleted cluster name make sure there is a snapshot in the cluster. (or) 3.Delete the cluster with snapshot created (it is not suggested because this snapshot storage is chargeable)

Parameters
  • cluster_identifier – id of the AWS Redshift Cluster

  • aws_conn_id – aws connection to use

execute(self, context)[source]

Logic that the operator uses to correctly identify which trigger to execute, and defer execution as expected.

execute_complete(self, context, event=None)[source]

Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful.