:py:mod:`astronomer.providers.amazon.aws.operators.redshift_cluster` ==================================================================== .. py:module:: astronomer.providers.amazon.aws.operators.redshift_cluster Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: astronomer.providers.amazon.aws.operators.redshift_cluster.RedshiftDeleteClusterOperatorAsync astronomer.providers.amazon.aws.operators.redshift_cluster.RedshiftResumeClusterOperatorAsync astronomer.providers.amazon.aws.operators.redshift_cluster.RedshiftPauseClusterOperatorAsync .. py:class:: 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) Bases: :py:obj:`airflow.providers.amazon.aws.operators.redshift_cluster.RedshiftDeleteClusterOperator` Delete an AWS Redshift Cluster if cluster status is in `available` state. :param cluster_identifier: ID of the AWS Redshift Cluster :param aws_conn_id: aws connection to use :param skip_final_cluster_snapshot: determines cluster snapshot creation :param final_cluster_snapshot_identifier: name of final cluster snapshot :param polling_interval: polling period in seconds to check for the status .. py:method:: execute(context) Logic that the operator uses to correctly identify which trigger to execute, and defer execution as expected. .. py:method:: execute_complete(context, event = None) Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful. .. py:class:: RedshiftResumeClusterOperatorAsync(*, poll_interval = 5, **kwargs) Bases: :py:obj:`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) :param cluster_identifier: id of the AWS Redshift Cluster :param aws_conn_id: aws connection to use .. py:method:: execute(context) Logic that the operator uses to correctly identify which trigger to execute, and defer execution as expected. .. py:method:: execute_complete(context, event = None) Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful. .. py:class:: RedshiftPauseClusterOperatorAsync(*, poll_interval = 5, **kwargs) Bases: :py:obj:`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) :param cluster_identifier: id of the AWS Redshift Cluster :param aws_conn_id: aws connection to use .. py:method:: execute(context) Logic that the operator uses to correctly identify which trigger to execute, and defer execution as expected. .. py:method:: execute_complete(context, event = None) Callback for when the trigger fires - returns immediately. Relies on trigger to throw an exception, otherwise it assumes execution was successful.