class_docstr: Interact with Amazon QuickSight.
  
  Provide thin wrapper around :external+boto3:py:class:`boto3.client("quicksight") <QuickSight.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`
class_docstr_tok: ["Interact","with","Amazon","QuickSight",".","Provide","thin","wrapper","around",":","external+boto3",":","py",":","class",":","`","boto3.client","(","``","quicksight","''",")","<","QuickSight.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","`"]
docstr: Check status of a QuickSight Create Ingestion API.
  
  :param aws_account_id: An AWS Account ID, if set to ``None`` then use associated AWS Account ID.
  :param data_set_id: QuickSight Data Set ID
  :param ingestion_id: QuickSight Ingestion ID
  :param target_state: Describes the QuickSight Job's Target State
  :param check_interval: the time interval in seconds which the operator
      will check the status of QuickSight Ingestion
  :return: response of describe_ingestion call after Ingestion is done
docstr_tok: ["Check","status","of","a","QuickSight","Create","Ingestion","API",".",":","param","aws_account_id",":","An","AWS","Account","ID",",","if","set","to","``","None","``","then","use","associated","AWS","Account","ID",".",":","param","data_set_id",":","QuickSight","Data","Set","ID",":","param","ingestion_id",":","QuickSight","Ingestion","ID",":","param","target_state",":","Describes","the","QuickSight","Job","'s","Target","State",":","param","check_interval",":","the","time","interval","in","seconds","which","the","operator","will","check","the","status","of","QuickSight","Ingestion",":","return",":","response","of","describe_ingestion","call","after","Ingestion","is","done"]
code: def wait_for_state(
      self,
      aws_account_id: str | None,
      data_set_id: str,
      ingestion_id: str,
      target_state: set,
      check_interval: int,
  ):
      """
      Check status of a QuickSight Create Ingestion API.
  
      :param aws_account_id: An AWS Account ID, if set to ``None`` then use associated AWS Account ID.
      :param data_set_id: QuickSight Data Set ID
      :param ingestion_id: QuickSight Ingestion ID
      :param target_state: Describes the QuickSight Job's Target State
      :param check_interval: the time interval in seconds which the operator
          will check the status of QuickSight Ingestion
      :return: response of describe_ingestion call after Ingestion is done
      """
      aws_account_id = aws_account_id or self.account_id
  
      while True:
          status = self.get_status(
              aws_account_id, data_set_id, ingestion_id
          )
          self.log.info("Current status is %s", status)
          if status in self.FAILED_STATES:
              info = self.get_error_info(
                  aws_account_id, data_set_id, ingestion_id
              )
              raise AirflowException(
                  f"The Amazon QuickSight Ingestion failed. Error info: {info}"
              )
          if status == "CANCELLED":
              raise AirflowException(
                  "The Amazon QuickSight SPICE ingestion cancelled!"
              )
          if (
              status not in self.NON_TERMINAL_STATES
              or status == target_state
          ):
              break
          time.sleep(check_interval)
  
      self.log.info("QuickSight Ingestion completed")
      return status
  
file_path: airflow/airflow/providers/amazon/aws/hooks/quicksight.py
imports: from __future__ import annotations
  import time
  import warnings
  from functools import cached_property
  from botocore.exceptions import ClientError
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
label_desc: Use image node_id 5 for calling the QuickSightHook obj's underlying member method code with example usage: obj.wait_for_state(aws_account_id, data_set_id, ingestion_id, target_state, check_interval) and returns: status