class_docstr: Terminate EC2 Instances using boto3.
  
  .. seealso::
      For more information on how to use this operator, take a look at the guide:
      :ref:`howto/operator:EC2TerminateInstanceOperator`
  
  :param instance_id: ID of the instance to be terminated.
  :param aws_conn_id: AWS connection to use
  :param region_name: AWS region name associated with the client.
  :param poll_interval: Number of seconds to wait before attempting to
      check state of instance. Only used if wait_for_completion is True. Default is 20.
  :param max_attempts: Maximum number of attempts when checking state of instance.
      Only used if wait_for_completion is True. Default is 20.
  :param wait_for_completion: If True, the operator will wait for the instance to be
      in the `terminated` state before returning.
code: def __init__(
      self,
      instance_ids: str | list[str],
      aws_conn_id: str = "aws_default",
      region_name: str | None = None,
      poll_interval: int = 20,
      max_attempts: int = 20,
      wait_for_completion: bool = False,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.instance_ids = instance_ids
      self.aws_conn_id = aws_conn_id
      self.region_name = region_name
      self.poll_interval = poll_interval
      self.max_attempts = max_attempts
      self.wait_for_completion = wait_for_completion
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Sequence
  from airflow.exceptions import AirflowException
  from airflow.models import BaseOperator
  from airflow.providers.amazon.aws.hooks.ec2 import EC2Hook
label_desc: Use image node_id 1 to create a new EC2TerminateInstanceOperator object from inherited base classes: BaseOperator with example: obj = EC2TerminateInstanceOperator(instance_ids, aws_conn_id, region_name, poll_interval, max_attempts, wait_for_completion)