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

**********
list_rules
**********



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

  

  Lists the rules for the specified listener.

  

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


  **Request Syntax**
  ::

    response = client.list_rules(
        serviceIdentifier='string',
        listenerIdentifier='string',
        maxResults=123,
        nextToken='string'
    )
    
  :type serviceIdentifier: string
  :param serviceIdentifier: **[REQUIRED]** 

    The ID or ARN of the service.

    

  
  :type listenerIdentifier: string
  :param listenerIdentifier: **[REQUIRED]** 

    The ID or ARN of the listener.

    

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

    

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

    
    ::

      {
          'items': [
              {
                  'arn': 'string',
                  'id': 'string',
                  'name': 'string',
                  'isDefault': True|False,
                  'priority': 123,
                  'createdAt': datetime(2015, 1, 1),
                  'lastUpdatedAt': datetime(2015, 1, 1)
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Information about the rules.

        
        

        - *(dict) --* 

          Summary information about a listener rule.

          
          

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

            The Amazon Resource Name (ARN) of the rule.

            
          

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

            The ID of the rule.

            
          

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

            The name of the rule.

            
          

          - **isDefault** *(boolean) --* 

            Indicates whether this is the default listener rule.

            
          

          - **priority** *(integer) --* 

            The priority of the rule.

            
          

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

            The date and time that the listener rule was created, in ISO-8601 format.

            
          

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

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

            
      
    
      

      - **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.ResourceNotFoundException`

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

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

  