:doc:`NetworkFirewall <../../network-firewall>` / Client / update_proxy_rule

*****************
update_proxy_rule
*****************



.. py:method:: NetworkFirewall.Client.update_proxy_rule(**kwargs)

  

  Updates the properties of the specified proxy rule.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/network-firewall-2020-11-12/UpdateProxyRule>`_  


  **Request Syntax**
  ::

    response = client.update_proxy_rule(
        ProxyRuleGroupName='string',
        ProxyRuleGroupArn='string',
        ProxyRuleName='string',
        Description='string',
        Action='ALLOW'|'DENY'|'ALERT',
        AddConditions=[
            {
                'ConditionOperator': 'string',
                'ConditionKey': 'string',
                'ConditionValues': [
                    'string',
                ]
            },
        ],
        RemoveConditions=[
            {
                'ConditionOperator': 'string',
                'ConditionKey': 'string',
                'ConditionValues': [
                    'string',
                ]
            },
        ],
        UpdateToken='string'
    )
    
  :type ProxyRuleGroupName: string
  :param ProxyRuleGroupName: 

    The descriptive name of the proxy rule group. You can't change the name of a proxy rule group after you create it.

     

    You must specify the ARN or the name, and you can specify both.

    

  
  :type ProxyRuleGroupArn: string
  :param ProxyRuleGroupArn: 

    The Amazon Resource Name (ARN) of a proxy rule group.

     

    You must specify the ARN or the name, and you can specify both.

    

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

    The descriptive name of the proxy rule. You can't change the name of a proxy rule after you create it.

    

  
  :type Description: string
  :param Description: 

    A description of the proxy rule.

    

  
  :type Action: string
  :param Action: 

    Depending on the match action, the proxy either stops the evaluation (if the action is terminal - allow or deny), or continues it (if the action is alert) until it matches a rule with a terminal action.

    

  
  :type AddConditions: list
  :param AddConditions: 

    Proxy rule conditions to add. Match criteria that specify what traffic attributes to examine. Conditions include operators (StringEquals, StringLike) and values to match against.

    

  
    - *(dict) --* 

      Match criteria that specify what traffic attributes to examine.

      

    
      - **ConditionOperator** *(string) --* 

        Defines how to perform a match.

        

      
      - **ConditionKey** *(string) --* 

        Defines what is to be matched.

        

      
      - **ConditionValues** *(list) --* 

        Specifes the exact value that needs to be matched against.

        

      
        - *(string) --* 

        
    
    

  :type RemoveConditions: list
  :param RemoveConditions: 

    Proxy rule conditions to remove. Match criteria that specify what traffic attributes to examine. Conditions include operators (StringEquals, StringLike) and values to match against.

    

  
    - *(dict) --* 

      Match criteria that specify what traffic attributes to examine.

      

    
      - **ConditionOperator** *(string) --* 

        Defines how to perform a match.

        

      
      - **ConditionKey** *(string) --* 

        Defines what is to be matched.

        

      
      - **ConditionValues** *(list) --* 

        Specifes the exact value that needs to be matched against.

        

      
        - *(string) --* 

        
    
    

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

    A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy rule. The token marks the state of the proxy rule resource at the time of the request.

     

    To make changes to the proxy rule, you provide the token in your request. Network Firewall uses the token to ensure that the proxy rule hasn't changed since you last retrieved it. If it has changed, the operation fails with an ``InvalidTokenException``. If this happens, retrieve the proxy rule again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.

    

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

    
    ::

      {
          'ProxyRule': {
              'ProxyRuleName': 'string',
              'Description': 'string',
              'Action': 'ALLOW'|'DENY'|'ALERT',
              'Conditions': [
                  {
                      'ConditionOperator': 'string',
                      'ConditionKey': 'string',
                      'ConditionValues': [
                          'string',
                      ]
                  },
              ]
          },
          'RemovedConditions': [
              {
                  'ConditionOperator': 'string',
                  'ConditionKey': 'string',
                  'ConditionValues': [
                      'string',
                  ]
              },
          ],
          'UpdateToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ProxyRule** *(dict) --* 

        The updated proxy rule resource that reflects the updates from the request.

        
        

        - **ProxyRuleName** *(string) --* 

          The descriptive name of the proxy rule. You can't change the name of a proxy rule after you create it.

          
        

        - **Description** *(string) --* 

          A description of the proxy rule.

          
        

        - **Action** *(string) --* 

          Action to take.

          
        

        - **Conditions** *(list) --* 

          Match criteria that specify what traffic attributes to examine. Conditions include operators (StringEquals, StringLike) and values to match against.

          
          

          - *(dict) --* 

            Match criteria that specify what traffic attributes to examine.

            
            

            - **ConditionOperator** *(string) --* 

              Defines how to perform a match.

              
            

            - **ConditionKey** *(string) --* 

              Defines what is to be matched.

              
            

            - **ConditionValues** *(list) --* 

              Specifes the exact value that needs to be matched against.

              
              

              - *(string) --* 
          
        
      
    
      

      - **RemovedConditions** *(list) --* 

        Proxy rule conditions removed from the rule.

        
        

        - *(dict) --* 

          Match criteria that specify what traffic attributes to examine.

          
          

          - **ConditionOperator** *(string) --* 

            Defines how to perform a match.

            
          

          - **ConditionKey** *(string) --* 

            Defines what is to be matched.

            
          

          - **ConditionValues** *(list) --* 

            Specifes the exact value that needs to be matched against.

            
            

            - *(string) --* 
        
      
    
      

      - **UpdateToken** *(string) --* 

        A token used for optimistic locking. Network Firewall returns a token to your requests that access the proxy rule. The token marks the state of the proxy rule resource at the time of the request.

         

        To make changes to the proxy rule, you provide the token in your request. Network Firewall uses the token to ensure that the proxy rule hasn't changed since you last retrieved it. If it has changed, the operation fails with an ``InvalidTokenException``. If this happens, retrieve the proxy rule again to get a current copy of it with a current token. Reapply your changes as needed, then try the operation again using the new token.

        
  
  **Exceptions**
  
  *   :py:class:`NetworkFirewall.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`NetworkFirewall.Client.exceptions.InternalServerError`

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

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

  