:doc:`CloudWatchNetworkMonitor <../../networkmonitor>` / Client / list_monitors

*************
list_monitors
*************



.. py:method:: CloudWatchNetworkMonitor.Client.list_monitors(**kwargs)

  

  Returns a list of all of your monitors.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/networkmonitor-2023-08-01/ListMonitors>`_  


  **Request Syntax**
  ::

    response = client.list_monitors(
        nextToken='string',
        maxResults=123,
        state='string'
    )
    
  :type nextToken: string
  :param nextToken: 

    The token for the next page of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned ``nextToken`` value.

     

    If ``MaxResults`` is given a value larger than 100, only 100 results are returned.

    

  
  :type state: string
  :param state: 

    The list of all monitors and their states.

    

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

    
    ::

      {
          'monitors': [
              {
                  'monitorArn': 'string',
                  'monitorName': 'string',
                  'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING',
                  'aggregationPeriod': 123,
                  'tags': {
                      'string': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **monitors** *(list) --* 

        Lists individual details about each of your monitors.

        
        

        - *(dict) --* 

          Displays summary information about a monitor.

          
          

          - **monitorArn** *(string) --* 

            The ARN of the monitor.

            
          

          - **monitorName** *(string) --* 

            The name of the monitor.

            
          

          - **state** *(string) --* 

            The state of the monitor.

            
          

          - **aggregationPeriod** *(integer) --* 

            The time, in seconds, that metrics are collected and sent to Amazon CloudWatch. Valid values are either ``30`` or ``60``.

            
          

          - **tags** *(dict) --* 

            The list of key-value pairs assigned to the monitor.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

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

        The token for the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`CloudWatchNetworkMonitor.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`CloudWatchNetworkMonitor.Client.exceptions.ValidationException`

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

  