class_docstr: Interact with Amazon AppFlow.
  
  Provide thin wrapper around :external+boto3:py:class:`boto3.client("appflow") <Appflow.Client>`.
  
  Additional arguments (such as ``aws_conn_id``) may be specified and
  are passed down to the underlying AwsBaseHook.
  
  .. seealso::
      - :class:`airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook`
      - `Amazon Appflow API Reference <https://docs.aws.amazon.com/appflow/1.0/APIReference/Welcome.html>`__
docstr: Update the flow task filter; all filters will be removed if an empty array is passed to filter_tasks.
  
  :param flow_name: The flow name
  :param filter_tasks: List flow tasks to be added
  :param set_trigger_ondemand: If True, set the trigger to on-demand; otherwise, keep the trigger as is
  :return: None
code: def update_flow_filter(
      self,
      flow_name: str,
      filter_tasks,
      set_trigger_ondemand: bool = False,
  ) -> None:
      """
      Update the flow task filter; all filters will be removed if an empty array is passed to filter_tasks.
  
      :param flow_name: The flow name
      :param filter_tasks: List flow tasks to be added
      :param set_trigger_ondemand: If True, set the trigger to on-demand; otherwise, keep the trigger as is
      :return: None
      """
      response = self.conn.describe_flow(flowName=flow_name)
      connector_type = response["sourceFlowConfig"]["connectorType"]
      tasks = []
  
      # cleanup old filter tasks
      for task in response["tasks"]:
          if (
              task["taskType"] == "Filter"
              and task.get("connectorOperator", {}).get(connector_type)
              != "PROJECTION"
          ):
              self.log.info("Removing task: %s", task)
          else:
              tasks.append(task)  # List of non-filter tasks
  
      tasks += filter_tasks  # Add the new filter tasks
  
      if set_trigger_ondemand:
          # Clean up attribute to force on-demand trigger
          del response["triggerConfig"]["triggerProperties"]
  
      self.conn.update_flow(
          flowName=response["flowName"],
          destinationFlowConfigList=response[
              "destinationFlowConfigList"
          ],
          sourceFlowConfig=response["sourceFlowConfig"],
          triggerConfig=response["triggerConfig"],
          description=response.get("description", "Flow description."),
          tasks=tasks,
      )
  
file_path: airflow/airflow/providers/amazon/aws/hooks/appflow.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from airflow.providers.amazon.aws.hooks.base_aws import AwsGenericHook
  from airflow.providers.amazon.aws.utils.waiter_with_logging import wait
label_desc: Use image node_id 4 for calling the AppflowHook obj's underlying member method code with example usage: obj.update_flow_filter(flow_name, filter_tasks, set_trigger_ondemand) without return types