class_docstr: Interact with Amazon Elastic Compute Cloud (EC2).
  
  Provide thick wrapper around :external+boto3:py:class:`boto3.client("ec2") <EC2.Client>`
  or :external+boto3:py:class:`boto3.resource("ec2") <EC2.ServiceResource>`.
  
  :param api_type: If set to ``client_type`` then hook use ``boto3.client("ec2")`` capabilities,
      If set to ``resource_type`` then hook use ``boto3.resource("ec2")`` capabilities.
  
  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","Elastic","Compute","Cloud","(","EC2",")",".","Provide","thick","wrapper","around",":","external+boto3",":","py",":","class",":","`","boto3.client","(","``","ec2","''",")","<","EC2.Client",">","`","or",":","external+boto3",":","py",":","class",":","`","boto3.resource","(","``","ec2","''",")","<","EC2.ServiceResource",">","`",".",":","param","api_type",":","If","set","to","``","client_type","``","then","hook","use","``","boto3.client","(","``","ec2","''",")","``","capabilities",",","If","set","to","``","resource_type","``","then","hook","use","``","boto3.resource","(","``","ec2","''",")","``","capabilities",".","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: Get list of instance details, optionally applying filters and selective instance ids.
  
  :param instance_ids: List of ids to get instances for
  :param filters: List of filters to specify instances to get
  :return: List of instances
docstr_tok: ["Get","list","of","instance","details",",","optionally","applying","filters","and","selective","instance","ids",".",":","param","instance_ids",":","List","of","ids","to","get","instances","for",":","param","filters",":","List","of","filters","to","specify","instances","to","get",":","return",":","List","of","instances"]
code: def get_instances(
      self,
      filters: list | None = None,
      instance_ids: list | None = None,
  ) -> list:
      """
      Get list of instance details, optionally applying filters and selective instance ids.
  
      :param instance_ids: List of ids to get instances for
      :param filters: List of filters to specify instances to get
      :return: List of instances
      """
      description = self.describe_instances(
          filters=filters, instance_ids=instance_ids
      )
  
      return [
          instance
          for reservation in description["Reservations"]
          for instance in reservation["Instances"]
      ]
  
file_path: airflow/airflow/providers/amazon/aws/hooks/ec2.py
imports: from __future__ import annotations
  import functools
  import time
  from typing import Callable, TypeVar
  from airflow.exceptions import AirflowException
  from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
  from airflow.typing_compat import ParamSpec
label_desc: Use image node_id 7 for calling the EC2Hook obj's underlying member method code with example usage: obj.get_instances(filters, instance_ids) and returns: unknown