:doc:`GuardDuty <../../guardduty>` / Client / update_filter

*************
update_filter
*************



.. py:method:: GuardDuty.Client.update_filter(**kwargs)

  

  Updates the filter specified by the filter name.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/UpdateFilter>`_  


  **Request Syntax**
  ::

    response = client.update_filter(
        DetectorId='string',
        FilterName='string',
        Description='string',
        Action='NOOP'|'ARCHIVE',
        Rank=123,
        FindingCriteria={
            'Criterion': {
                'string': {
                    'Eq': [
                        'string',
                    ],
                    'Neq': [
                        'string',
                    ],
                    'Gt': 123,
                    'Gte': 123,
                    'Lt': 123,
                    'Lte': 123,
                    'Equals': [
                        'string',
                    ],
                    'NotEquals': [
                        'string',
                    ],
                    'GreaterThan': 123,
                    'GreaterThanOrEqual': 123,
                    'LessThan': 123,
                    'LessThanOrEqual': 123,
                    'Matches': [
                        'string',
                    ],
                    'NotMatches': [
                        'string',
                    ]
                }
            }
        }
    )
    
  :type DetectorId: string
  :param DetectorId: **[REQUIRED]** 

    The unique ID of the detector that specifies the GuardDuty service where you want to update a filter.

     

    To find the ``detectorId`` in the current Region, see the Settings page in the GuardDuty console, or run the `ListDetectors <https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html>`__ API.

    

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

    The name of the filter.

    

  
  :type Description: string
  :param Description: 

    The description of the filter. Valid characters include alphanumeric characters, and special characters such as hyphen, period, colon, underscore, parentheses ( ``{ }``, ``[ ]``, and ``( )``), forward slash, horizontal tab, vertical tab, newline, form feed, return, and whitespace.

    

  
  :type Action: string
  :param Action: 

    Specifies the action that is to be applied to the findings that match the filter.

    

  
  :type Rank: integer
  :param Rank: 

    Specifies the position of the filter in the list of current filters. Also specifies the order in which this filter is applied to the findings.

    

  
  :type FindingCriteria: dict
  :param FindingCriteria: 

    Represents the criteria to be used in the filter for querying findings.

    

  
    - **Criterion** *(dict) --* 

      Represents a map of finding properties that match specified conditions and values when querying findings.

      

    
      - *(string) --* 

      
        - *(dict) --* 

          Contains information about the condition.

          

        
          - **Eq** *(list) --* 

            Represents the *equal* condition to be applied to a single field when querying for findings.

            

          
            - *(string) --* 

            
        
          - **Neq** *(list) --* 

            Represents the *not equal* condition to be applied to a single field when querying for findings.

            

          
            - *(string) --* 

            
        
          - **Gt** *(integer) --* 

            Represents a *greater than* condition to be applied to a single field when querying for findings.

            

          
          - **Gte** *(integer) --* 

            Represents a *greater than or equal* condition to be applied to a single field when querying for findings.

            

          
          - **Lt** *(integer) --* 

            Represents a *less than* condition to be applied to a single field when querying for findings.

            

          
          - **Lte** *(integer) --* 

            Represents a *less than or equal* condition to be applied to a single field when querying for findings.

            

          
          - **Equals** *(list) --* 

            Represents an *equal*  condition to be applied to a single field when querying for findings.

            

          
            - *(string) --* 

            
        
          - **NotEquals** *(list) --* 

            Represents a *not equal*  condition to be applied to a single field when querying for findings.

            

          
            - *(string) --* 

            
        
          - **GreaterThan** *(integer) --* 

            Represents a *greater than* condition to be applied to a single field when querying for findings.

            

          
          - **GreaterThanOrEqual** *(integer) --* 

            Represents a *greater than or equal* condition to be applied to a single field when querying for findings.

            

          
          - **LessThan** *(integer) --* 

            Represents a *less than* condition to be applied to a single field when querying for findings.

            

          
          - **LessThanOrEqual** *(integer) --* 

            Represents a *less than or equal* condition to be applied to a single field when querying for findings.

            

          
          - **Matches** *(list) --* 

            Represents the *match* condition to be applied to a single field when querying for findings.

             

            .. note::

              

              The *matches* condition is available only for create-filter and update-filter APIs.

              

            

          
            - *(string) --* 

            
        
          - **NotMatches** *(list) --* 

            Represents the *not match* condition to be applied to a single field when querying for findings.

             

            .. note::

              

              The *not-matches* condition is available only for create-filter and update-filter APIs.

              

            

          
            - *(string) --* 

            
        
        
  

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

    
    ::

      {
          'Name': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Name** *(string) --* 

        The name of the filter.

        
  
  **Exceptions**
  
  *   :py:class:`GuardDuty.Client.exceptions.BadRequestException`

  
  *   :py:class:`GuardDuty.Client.exceptions.InternalServerErrorException`

  