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

************
update_probe
************



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

  

  Updates a monitor probe. This action requires both the ``monitorName`` and ``probeId`` parameters. Run ``ListMonitors`` to get a list of monitor names. Run ``GetMonitor`` to get a list of probes and probe IDs.

   

  You can update the following para create a monitor with probes using this command. For each probe, you define the following:

   

  
  * ``state``—The state of the probe.
   
  * ``destination``— The target destination IP address for the probe.
   
  * ``destinationPort``—Required only if the protocol is ``TCP``.
   
  * ``protocol``—The communication protocol between the source and destination. This will be either ``TCP`` or ``ICMP``.
   
  * ``packetSize``—The size of the packets. This must be a number between ``56`` and ``8500``.
   
  * (Optional) ``tags`` —Key-value pairs created and assigned to the probe.
  

  

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


  **Request Syntax**
  ::

    response = client.update_probe(
        monitorName='string',
        probeId='string',
        state='PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
        destination='string',
        destinationPort=123,
        protocol='TCP'|'ICMP',
        packetSize=123
    )
    
  :type monitorName: string
  :param monitorName: **[REQUIRED]** 

    The name of the monitor that the probe was updated for.

    

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

    The ID of the probe to update.

    

  
  :type state: string
  :param state: 

    The state of the probe update.

    

  
  :type destination: string
  :param destination: 

    The updated IP address for the probe destination. This must be either an IPv4 or IPv6 address.

    

  
  :type destinationPort: integer
  :param destinationPort: 

    The updated port for the probe destination. This is required only if the ``protocol`` is ``TCP`` and must be a number between ``1`` and ``65536``.

    

  
  :type protocol: string
  :param protocol: 

    The updated network protocol for the destination. This can be either ``TCP`` or ``ICMP``. If the protocol is ``TCP``, then ``port`` is also required.

    

  
  :type packetSize: integer
  :param packetSize: 

    he updated packets size for network traffic between the source and destination. This must be a number between ``56`` and ``8500``.

    

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

    
    ::

      {
          'probeId': 'string',
          'probeArn': 'string',
          'sourceArn': 'string',
          'destination': 'string',
          'destinationPort': 123,
          'protocol': 'TCP'|'ICMP',
          'packetSize': 123,
          'addressFamily': 'IPV4'|'IPV6',
          'vpcId': 'string',
          'state': 'PENDING'|'ACTIVE'|'INACTIVE'|'ERROR'|'DELETING'|'DELETED',
          'createdAt': datetime(2015, 1, 1),
          'modifiedAt': datetime(2015, 1, 1),
          'tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **probeId** *(string) --* 

        The updated ID of the probe.

        
      

      - **probeArn** *(string) --* 

        The updated ARN of the probe.

        
      

      - **sourceArn** *(string) --* 

        The updated ARN of the source subnet.

        
      

      - **destination** *(string) --* 

        The updated destination IP address for the probe.

        
      

      - **destinationPort** *(integer) --* 

        The updated destination port. This must be a number between ``1`` and ``65536``.

        
      

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

        The updated protocol for the probe.

        
      

      - **packetSize** *(integer) --* 

        The updated packet size for the probe.

        
      

      - **addressFamily** *(string) --* 

        The updated IP address family. This must be either ``IPV4`` or ``IPV6``.

        
      

      - **vpcId** *(string) --* 

        The updated ID of the source VPC subnet ID.

        
      

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

        The state of the updated probe.

        
      

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

        The time and date that the probe was created.

        
      

      - **modifiedAt** *(datetime) --* 

        The time and date that the probe was last updated.

        
      

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

        Update tags for a probe.

        
        

        - *(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`

  