astronomer.providers.amazon.aws.operators.redshift_cluster

Module Contents

Classes

RedshiftDeleteClusterOperatorAsync

Delete an AWS Redshift Cluster if cluster status is in available state.

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.RedshiftDeleteClusterOperatorAsync(*, skip_final_cluster_snapshot=True, final_cluster_snapshot_identifier=None, cluster_status_fetch_interval_seconds=10, aws_conn_id='aws_default', poll_interval=5.0, **kwargs)[source]

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

Delete an AWS Redshift Cluster if cluster status is in available state.

Parameters:
  • cluster_identifier – ID of the AWS Redshift Cluster

  • aws_conn_id (str) – aws connection to use

  • skip_final_cluster_snapshot (bool) – determines cluster snapshot creation

  • final_cluster_snapshot_identifier (Optional[str]) – name of final cluster snapshot

  • polling_interval – polling period in seconds to check for the status

execute(context)[source]

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

execute_complete(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.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(context)[source]

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

execute_complete(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(context)[source]

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

execute_complete(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.