:doc:`EC2 <../../ec2>` / Paginator / DescribeImageReferences

***********************
DescribeImageReferences
***********************



.. py:class:: EC2.Paginator.DescribeImageReferences

  ::

    
    paginator = client.get_paginator('describe_image_references')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`EC2.Client.describe_image_references`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeImageReferences>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          ImageIds=[
              'string',
          ],
          IncludeAllResourceTypes=True|False,
          ResourceTypes=[
              {
                  'ResourceType': 'ec2:Instance'|'ec2:LaunchTemplate'|'ssm:Parameter'|'imagebuilder:ImageRecipe'|'imagebuilder:ContainerRecipe',
                  'ResourceTypeOptions': [
                      {
                          'OptionName': 'state-name'|'version-depth',
                          'OptionValues': [
                              'string',
                          ]
                      },
                  ]
              },
          ],
          DryRun=True|False,
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type ImageIds: list
    :param ImageIds: **[REQUIRED]** 

      The IDs of the images to check for resource references.

      

    
      - *(string) --* 

      
  
    :type IncludeAllResourceTypes: boolean
    :param IncludeAllResourceTypes: 

      Specifies whether to check all supported Amazon Web Services resource types for image references. When specified, default values are applied for ``ResourceTypeOptions``. For the default values, see `How AMI reference checks work <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-ami-references.html#how-ami-references-works>`__ in the *Amazon EC2 User Guide*. If you also specify ``ResourceTypes`` with ``ResourceTypeOptions``, your specified values override the default values.

       

      Supported resource types: ``ec2:Instance`` | ``ec2:LaunchTemplate`` | ``ssm:Parameter`` | ``imagebuilder:ImageRecipe`` | ``imagebuilder:ContainerRecipe``

       

      Either ``IncludeAllResourceTypes`` or ``ResourceTypes`` must be specified.

      

    
    :type ResourceTypes: list
    :param ResourceTypes: 

      The Amazon Web Services resource types to check for image references.

       

      Either ``IncludeAllResourceTypes`` or ``ResourceTypes`` must be specified.

      

    
      - *(dict) --* 

        A resource type to check for image references. Associated options can also be specified if the resource type is an EC2 instance or launch template.

        

      
        - **ResourceType** *(string) --* 

          The resource type.

          

        
        - **ResourceTypeOptions** *(list) --* 

          The options that affect the scope of the response. Valid only when ``ResourceType`` is ``ec2:Instance`` or ``ec2:LaunchTemplate``.

          

        
          - *(dict) --* 

            The options that affect the scope of the response.

            

          
            - **OptionName** *(string) --* 

              The name of the option.

               

              
              * For ``ec2:Instance``: Specify ``state-name`` - The current state of the EC2 instance.
               
              * For ``ec2:LaunchTemplate``: Specify ``version-depth`` - The number of launch template versions to check, starting from the most recent version.
              

              

            
            - **OptionValues** *(list) --* 

              A value for the specified option.

               

              
              * For ``state-name``: 

                
                * Valid values: ``pending`` | ``running`` | ``shutting-down`` | ``terminated`` | ``stopping`` | ``stopped``
                 
                * Default: All states
                

              
               
              * For ``version-depth``: 

                
                * Valid values: Integers between ``1`` and ``10000``
                 
                * Default: ``10``
                

              
              

              

            
              - *(string) --* 

              
          
          
      
      
  
    :type DryRun: boolean
    :param DryRun: 

      Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      A dictionary that provides parameters to control pagination.

      

    
      - **MaxItems** *(integer) --* 

        The total number of items to return. If the total number of items available is more than the value specified in max-items then a ``NextToken`` will be provided in the output that you can use to resume pagination.

        

      
      - **PageSize** *(integer) --* 

        The size of each page.

        

      
      - **StartingToken** *(string) --* 

        A token to specify where to start paginating. This is the ``NextToken`` from a previous response.

        

      
    
    
    :rtype: dict
    :returns: 
      
      **Response Syntax**

      
      ::

        {
            'ImageReferences': [
                {
                    'ImageId': 'string',
                    'ResourceType': 'ec2:Instance'|'ec2:LaunchTemplate'|'ssm:Parameter'|'imagebuilder:ImageRecipe'|'imagebuilder:ContainerRecipe',
                    'Arn': 'string'
                },
            ]
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **ImageReferences** *(list) --* 

          The resources that are referencing the specified images.

          
          

          - *(dict) --* 

            A resource that is referencing an image.

            
            

            - **ImageId** *(string) --* 

              The ID of the referenced image.

              
            

            - **ResourceType** *(string) --* 

              The type of resource referencing the image.

              
            

            - **Arn** *(string) --* 

              The Amazon Resource Name (ARN) of the resource referencing the image.

              
        
      
    