updateProxyRulePriorities method

Future<UpdateProxyRulePrioritiesResponse> updateProxyRulePriorities({
  1. required RuleGroupRequestPhase ruleGroupRequestPhase,
  2. required List<ProxyRulePriority> rules,
  3. required String updateToken,
  4. String? proxyRuleGroupArn,
  5. String? proxyRuleGroupName,
})

Updates proxy rule priorities within a proxy rule group.

May throw InternalServerError. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

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

Parameter rules : proxy rule resources to update to new positions.

Parameter updateToken : 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.

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

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

Parameter 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.

Implementation

Future<UpdateProxyRulePrioritiesResponse> updateProxyRulePriorities({
  required RuleGroupRequestPhase ruleGroupRequestPhase,
  required List<ProxyRulePriority> rules,
  required String updateToken,
  String? proxyRuleGroupArn,
  String? proxyRuleGroupName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'NetworkFirewall_20201112.UpdateProxyRulePriorities'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RuleGroupRequestPhase': ruleGroupRequestPhase.value,
      'Rules': rules,
      'UpdateToken': updateToken,
      if (proxyRuleGroupArn != null) 'ProxyRuleGroupArn': proxyRuleGroupArn,
      if (proxyRuleGroupName != null)
        'ProxyRuleGroupName': proxyRuleGroupName,
    },
  );

  return UpdateProxyRulePrioritiesResponse.fromJson(jsonResponse.body);
}