:doc:`AutoScaling <../../autoscaling>` / Paginator / DescribeAutoScalingInstances

****************************
DescribeAutoScalingInstances
****************************



.. py:class:: AutoScaling.Paginator.DescribeAutoScalingInstances

  ::

    
    paginator = client.get_paginator('describe_auto_scaling_instances')

  
  

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

    Creates an iterator that will paginate through responses from :py:meth:`AutoScaling.Client.describe_auto_scaling_instances`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeAutoScalingInstances>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          InstanceIds=[
              'string',
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type InstanceIds: list
    :param InstanceIds: 

      The IDs of the instances. If you omit this property, all Auto Scaling instances are described. If you specify an ID that does not exist, it is ignored with no error.

       

      Array Members: Maximum number of 50 items.

      

    
      - *(string) --* 

      
  
    :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**

      
      ::

        {
            'AutoScalingInstances': [
                {
                    'InstanceId': 'string',
                    'InstanceType': 'string',
                    'AutoScalingGroupName': 'string',
                    'AvailabilityZone': 'string',
                    'LifecycleState': 'string',
                    'HealthStatus': 'string',
                    'LaunchConfigurationName': 'string',
                    'LaunchTemplate': {
                        'LaunchTemplateId': 'string',
                        'LaunchTemplateName': 'string',
                        'Version': 'string'
                    },
                    'ImageId': 'string',
                    'ProtectedFromScaleIn': True|False,
                    'WeightedCapacity': 'string'
                },
            ],
            
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **AutoScalingInstances** *(list) --* 

          The instances.

          
          

          - *(dict) --* 

            Describes an EC2 instance associated with an Auto Scaling group.

            
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **InstanceType** *(string) --* 

              The instance type of the EC2 instance.

              
            

            - **AutoScalingGroupName** *(string) --* 

              The name of the Auto Scaling group for the instance.

              
            

            - **AvailabilityZone** *(string) --* 

              The Availability Zone for the instance.

              
            

            - **LifecycleState** *(string) --* 

              The lifecycle state for the instance. The ``Quarantined`` state is not used. For more information, see `Amazon EC2 Auto Scaling instance lifecycle <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-lifecycle.html>`__ in the *Amazon EC2 Auto Scaling User Guide*.

               

              Valid values: ``Pending`` | ``Pending:Wait`` | ``Pending:Proceed`` | ``Quarantined`` | ``InService`` | ``Terminating`` | ``Terminating:Wait`` | ``Terminating:Proceed`` | ``Terminating:Retained`` | ``Terminated`` | ``Detaching`` | ``Detached`` | ``EnteringStandby`` | ``Standby`` | ``Warmed:Pending`` | ``Warmed:Pending:Wait`` | ``Warmed:Pending:Proceed`` | ``Warmed:Pending:Retained`` | ``Warmed:Terminating`` | ``Warmed:Terminating:Wait`` | ``Warmed:Terminating:Proceed`` | ``Warmed:Terminating:Retained`` | ``Warmed:Terminated`` | ``Warmed:Stopped`` | ``Warmed:Running``

              
            

            - **HealthStatus** *(string) --* 

              The last reported health status of this instance. ``Healthy`` means that the instance is healthy and should remain in service. ``Unhealthy`` means that the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and replace it.

              
            

            - **LaunchConfigurationName** *(string) --* 

              The launch configuration used to launch the instance. This value is not available if you attached the instance to the Auto Scaling group.

              
            

            - **LaunchTemplate** *(dict) --* 

              The launch template for the instance.

              
              

              - **LaunchTemplateId** *(string) --* 

                The ID of the launch template. To get the template ID, use the Amazon EC2 `DescribeLaunchTemplates <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html>`__ API operation. New launch templates can be created using the Amazon EC2 `CreateLaunchTemplate <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html>`__ API.

                 

                Conditional: You must specify either a ``LaunchTemplateId`` or a ``LaunchTemplateName``.

                
              

              - **LaunchTemplateName** *(string) --* 

                The name of the launch template. To get the template name, use the Amazon EC2 `DescribeLaunchTemplates <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplates.html>`__ API operation. New launch templates can be created using the Amazon EC2 `CreateLaunchTemplate <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html>`__ API.

                 

                Conditional: You must specify either a ``LaunchTemplateId`` or a ``LaunchTemplateName``.

                
              

              - **Version** *(string) --* 

                The version number, ``$Latest``, or ``$Default``. To get the version number, use the Amazon EC2 `DescribeLaunchTemplateVersions <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeLaunchTemplateVersions.html>`__ API operation. New launch template versions can be created using the Amazon EC2 `CreateLaunchTemplateVersion <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplateVersion.html>`__ API. If the value is ``$Latest``, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is ``$Default``, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is ``$Default``.

                
          
            

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

              The ID of the Amazon Machine Image (AMI) associated with the instance. This field shows the current AMI ID of the instance's root volume. It may differ from the original AMI used when the instance was first launched.

               

              This field appears for:

               

              
              * Instances with root volume replacements through Instance Refresh
               
              * Instances launched with AMI overrides
              

               

              This field won't appear for:

               

              
              * Existing instances launched from Launch Templates without overrides
               
              * Existing instances that didn’t have their root volume replaced through Instance Refresh
              

              
            

            - **ProtectedFromScaleIn** *(boolean) --* 

              Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.

              
            

            - **WeightedCapacity** *(string) --* 

              The number of capacity units contributed by the instance based on its instance type.

               

              Valid Range: Minimum value of 1. Maximum value of 999.

              
        
      
    