updateFirewallRuleGroupAssociation method

Future<UpdateFirewallRuleGroupAssociationResponse> updateFirewallRuleGroupAssociation({
  1. required String firewallRuleGroupAssociationId,
  2. MutationProtectionStatus? mutationProtection,
  3. String? name,
  4. int? priority,
})

Changes the association of a FirewallRuleGroup with a VPC. The association enables DNS filtering for the VPC.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServiceErrorException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter firewallRuleGroupAssociationId : The identifier of the FirewallRuleGroupAssociation.

Parameter mutationProtection : If enabled, this setting disallows modification or removal of the association, to help prevent against accidentally altering DNS firewall protections.

Parameter name : The name of the rule group association.

Parameter priority : The setting that determines the processing order of the rule group among the rule groups that you associate with the specified VPC. DNS Firewall filters VPC traffic starting from the rule group with the lowest numeric priority setting.

You must specify a unique priority for each rule group that you associate with a single VPC. To make it easier to insert rule groups later, leave space between the numbers, for example, use 100, 200, and so on. You can change the priority setting for a rule group association after you create it.

Implementation

Future<UpdateFirewallRuleGroupAssociationResponse>
    updateFirewallRuleGroupAssociation({
  required String firewallRuleGroupAssociationId,
  MutationProtectionStatus? mutationProtection,
  String? name,
  int? priority,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.UpdateFirewallRuleGroupAssociation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FirewallRuleGroupAssociationId': firewallRuleGroupAssociationId,
      if (mutationProtection != null)
        'MutationProtection': mutationProtection.value,
      if (name != null) 'Name': name,
      if (priority != null) 'Priority': priority,
    },
  );

  return UpdateFirewallRuleGroupAssociationResponse.fromJson(
      jsonResponse.body);
}