:doc:`VPCLattice <../../vpc-lattice>` / Client / list_target_groups

******************
list_target_groups
******************



.. py:method:: VPCLattice.Client.list_target_groups(**kwargs)

  

  Lists your target groups. You can narrow your search by using the filters below in your request.

  

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


  **Request Syntax**
  ::

    response = client.list_target_groups(
        maxResults=123,
        nextToken='string',
        vpcIdentifier='string',
        targetGroupType='IP'|'LAMBDA'|'INSTANCE'|'ALB'
    )
    
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return.

    

  
  :type nextToken: string
  :param nextToken: 

    A pagination token for the next page of results.

    

  
  :type vpcIdentifier: string
  :param vpcIdentifier: 

    The ID or ARN of the VPC.

    

  
  :type targetGroupType: string
  :param targetGroupType: 

    The target group type.

    

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

    
    ::

      {
          'items': [
              {
                  'id': 'string',
                  'arn': 'string',
                  'name': 'string',
                  'type': 'IP'|'LAMBDA'|'INSTANCE'|'ALB',
                  'createdAt': datetime(2015, 1, 1),
                  'port': 123,
                  'protocol': 'HTTP'|'HTTPS'|'TCP',
                  'ipAddressType': 'IPV4'|'IPV6',
                  'vpcIdentifier': 'string',
                  'lastUpdatedAt': datetime(2015, 1, 1),
                  'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED',
                  'serviceArns': [
                      'string',
                  ],
                  'lambdaEventStructureVersion': 'V1'|'V2'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Information about the target groups.

        
        

        - *(dict) --* 

          Summary information about a target group.

           

          For more information, see `Target groups <https://docs.aws.amazon.com/vpc-lattice/latest/ug/target-groups.html>`__ in the *Amazon VPC Lattice User Guide*.

          
          

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

            The ID of the target group.

            
          

          - **arn** *(string) --* 

            The ARN (Amazon Resource Name) of the target group.

            
          

          - **name** *(string) --* 

            The name of the target group.

            
          

          - **type** *(string) --* 

            The target group type.

            
          

          - **createdAt** *(datetime) --* 

            The date and time that the target group was created, in ISO-8601 format.

            
          

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

            The port of the target group.

            
          

          - **protocol** *(string) --* 

            The protocol of the target group.

            
          

          - **ipAddressType** *(string) --* 

            The type of IP address used for the target group. The possible values are ``IPV4`` and ``IPV6``. This is an optional parameter. If not specified, the default is ``IPV4``.

            
          

          - **vpcIdentifier** *(string) --* 

            The ID of the VPC of the target group.

            
          

          - **lastUpdatedAt** *(datetime) --* 

            The date and time that the target group was last updated, in ISO-8601 format.

            
          

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

            The status.

            
          

          - **serviceArns** *(list) --* 

            The Amazon Resource Names (ARNs) of the service.

            
            

            - *(string) --* 
        
          

          - **lambdaEventStructureVersion** *(string) --* 

            The version of the event structure that your Lambda function receives. Supported only if the target group type is ``LAMBDA``.

            
      
    
      

      - **nextToken** *(string) --* 

        If there are additional results, a pagination token for the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`VPCLattice.Client.exceptions.ValidationException`

  
  *   :py:class:`VPCLattice.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`VPCLattice.Client.exceptions.ThrottlingException`

  
  *   :py:class:`VPCLattice.Client.exceptions.InternalServerException`

  