:doc:`VPCLattice <../../vpc-lattice>` / Paginator / ListTargets

***********
ListTargets
***********



.. py:class:: VPCLattice.Paginator.ListTargets

  ::

    
    paginator = client.get_paginator('list_targets')

  
  

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

    Creates an iterator that will paginate through responses from :py:meth:`VPCLattice.Client.list_targets`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/vpc-lattice-2022-11-30/ListTargets>`_    


    **Request Syntax**
    ::

      response_iterator = paginator.paginate(
          targetGroupIdentifier='string',
          targets=[
              {
                  'id': 'string',
                  'port': 123
              },
          ],
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type targetGroupIdentifier: string
    :param targetGroupIdentifier: **[REQUIRED]** 

      The ID or ARN of the target group.

      

    
    :type targets: list
    :param targets: 

      The targets.

      

    
      - *(dict) --* 

        Describes a target.

        

      
        - **id** *(string) --* **[REQUIRED]** 

          The ID of the target. If the target group type is ``INSTANCE``, this is an instance ID. If the target group type is ``IP``, this is an IP address. If the target group type is ``LAMBDA``, this is the ARN of a Lambda function. If the target group type is ``ALB``, this is the ARN of an Application Load Balancer.

          

        
        - **port** *(integer) --* 

          The port on which the target is listening. For HTTP, the default is 80. For HTTPS, the default is 443.

          

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

      
      ::

        {
            'items': [
                {
                    'id': 'string',
                    'port': 123,
                    'status': 'DRAINING'|'UNAVAILABLE'|'HEALTHY'|'UNHEALTHY'|'INITIAL'|'UNUSED',
                    'reasonCode': 'string'
                },
            ],
            'NextToken': 'string'
        }
        
      **Response Structure**

      

      - *(dict) --* 
        

        - **items** *(list) --* 

          Information about the targets.

          
          

          - *(dict) --* 

            Summary information about a target.

            
            

            - **id** *(string) --* 

              The ID of the target. If the target group type is ``INSTANCE``, this is an instance ID. If the target group type is ``IP``, this is an IP address. If the target group type is ``LAMBDA``, this is the ARN of a Lambda function. If the target type is ``ALB``, this is the ARN of an Application Load Balancer.

              
            

            - **port** *(integer) --* 

              The port on which the target is listening.

              
            

            - **status** *(string) --* 

              The status of the target.

               

              
              * ``DRAINING``: The target is being deregistered. No new connections are sent to this target while current connections are being drained. The default draining time is 5 minutes.
               
              * ``UNAVAILABLE``: Health checks are unavailable for the target group.
               
              * ``HEALTHY``: The target is healthy.
               
              * ``UNHEALTHY``: The target is unhealthy.
               
              * ``INITIAL``: Initial health checks on the target are being performed.
               
              * ``UNUSED``: Target group is not used in a service.
              

              
            

            - **reasonCode** *(string) --* 

              The code for why the target status is what it is.

              
        
      
        

        - **NextToken** *(string) --* 

          A token to resume pagination.

          
    