:py:mod:`astronomer.providers.amazon.aws.triggers.redshift_cluster` =================================================================== .. py:module:: astronomer.providers.amazon.aws.triggers.redshift_cluster Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: astronomer.providers.amazon.aws.triggers.redshift_cluster.RedshiftClusterTrigger astronomer.providers.amazon.aws.triggers.redshift_cluster.RedshiftClusterSensorTrigger .. py:class:: RedshiftClusterTrigger(task_id, aws_conn_id, cluster_identifier, operation_type, polling_period_seconds = 5.0, skip_final_cluster_snapshot = True, final_cluster_snapshot_identifier = None) Bases: :py:obj:`airflow.triggers.base.BaseTrigger` RedshiftClusterTrigger is fired as deferred class with params to run the task in trigger worker :param task_id: Reference to task id of the Dag :param polling_period_seconds: polling period in seconds to check for the status :param aws_conn_id: Reference to AWS connection id for redshift :param cluster_identifier: unique identifier of a cluster :param operation_type: Reference to the type of operation need to be performed eg: pause_cluster, resume_cluster, delete_cluster :param skip_final_cluster_snapshot: determines cluster snapshot creation :param final_cluster_snapshot_identifier: name of final cluster snapshot .. py:method:: serialize() Serializes RedshiftClusterTrigger arguments and classpath. .. py:method:: run() :async: Make async connection to redshift, based on the operation type call the RedshiftHookAsync functions if operation_type is 'resume_cluster' it will call the resume_cluster function in RedshiftHookAsync if operation_type is 'pause_cluster it will call the pause_cluster function in RedshiftHookAsync .. py:class:: RedshiftClusterSensorTrigger(task_id, aws_conn_id, cluster_identifier, target_status, poke_interval) Bases: :py:obj:`airflow.triggers.base.BaseTrigger` RedshiftClusterSensorTrigger is fired as deferred class with params to run the task in trigger worker :param task_id: Reference to task id of the Dag :param aws_conn_id: Reference to AWS connection id for redshift :param cluster_identifier: unique identifier of a cluster :param target_status: Reference to the status which needs to be checked :param poke_interval: polling period in seconds to check for the status .. py:method:: serialize() Serializes RedshiftClusterSensorTrigger arguments and classpath. .. py:method:: run() :async: Simple async function run until the cluster status match the target status.