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

****************************
update_proxy_rule_priorities
****************************



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

  

  Updates proxy rule priorities within a proxy rule group.

  

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


  **Request Syntax**
  ::

    response = client.update_proxy_rule_priorities(
        ProxyRuleGroupName='string',
        ProxyRuleGroupArn='string',
        RuleGroupRequestPhase='PRE_DNS'|'PRE_REQ'|'POST_RES',
        Rules=[
            {
                'ProxyRuleName': 'string',
                'NewPosition': 123
            },
        ],
        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 RuleGroupRequestPhase: string
  :param RuleGroupRequestPhase: **[REQUIRED]** 

    Evaluation points in the traffic flow where rules are applied. There are three phases in a traffic where the rule match is applied.

    

  
  :type Rules: list
  :param Rules: **[REQUIRED]** 

    proxy rule resources to update to new positions.

    

  
    - *(dict) --* 

      Proxy rule name and new desired position.

      

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

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

        

      
      - **NewPosition** *(integer) --* 

        Where to move a proxy rule in a proxy rule group.

        

      
    

  :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 group. The token marks the state of the proxy rule group resource at the time of the request.

     

    To make changes to the proxy rule group, you provide the token in your request. Network Firewall uses the token to ensure that the proxy rule group 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 group 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**

    
    ::

      {
          'ProxyRuleGroupName': 'string',
          'ProxyRuleGroupArn': 'string',
          'RuleGroupRequestPhase': 'PRE_DNS'|'PRE_REQ'|'POST_RES',
          'Rules': [
              {
                  'ProxyRuleName': 'string',
                  'NewPosition': 123
              },
          ],
          'UpdateToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ProxyRuleGroupName** *(string) --* 

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

        
      

      - **ProxyRuleGroupArn** *(string) --* 

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

        
      

      - **RuleGroupRequestPhase** *(string) --* 

        Evaluation points in the traffic flow where rules are applied. There are three phases in a traffic where the rule match is applied.

        
      

      - **Rules** *(list) --* 

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

        
        

        - *(dict) --* 

          Proxy rule name and new desired position.

          
          

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

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

            
          

          - **NewPosition** *(integer) --* 

            Where to move a proxy rule in a proxy rule group.

            
      
    
      

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

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

         

        To make changes to the proxy rule group, you provide the token in your request. Network Firewall uses the token to ensure that the proxy rule group 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 group 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`

  