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

**************
update_monitor
**************



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

  

  Updates the ``aggregationPeriod`` for a monitor. Monitors support an ``aggregationPeriod`` of either ``30`` or ``60`` seconds. This action requires the ``monitorName`` and ``probeId`` parameter. Run ``ListMonitors`` to get a list of monitor names.

  

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


  **Request Syntax**
  ::

    response = client.update_monitor(
        monitorName='string',
        aggregationPeriod=123
    )
    
  :type monitorName: string
  :param monitorName: **[REQUIRED]** 

    The name of the monitor to update.

    

  
  :type aggregationPeriod: integer
  :param aggregationPeriod: **[REQUIRED]** 

    The aggregation time, in seconds, to change to. This must be either ``30`` or ``60``.

    

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

    
    ::

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

    

    - *(dict) --* 
      

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

        The ARN of the monitor that was updated.

        
      

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

        The name of the monitor that was updated.

        
      

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

        The state of the updated monitor.

        
      

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

        The changed aggregation period.

        
      

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

        The list of key-value pairs associated with the monitor.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`CloudWatchNetworkMonitor.Client.exceptions.AccessDeniedException`

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

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

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

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

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

  