: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, polling_period_seconds, aws_conn_id, cluster_identifier, operation_type) 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 .. py:method:: serialize(self) Serializes RedshiftClusterTrigger arguments and classpath. .. py:method:: run(self) :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, polling_period_seconds) 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 polling_period_seconds: polling period in seconds to check for the status .. py:method:: serialize(self) Serializes RedshiftClusterSensorTrigger arguments and classpath. .. py:method:: run(self) :async: Simple async function run until the cluster status match the target status.