deleteFirewallManagerRuleGroups method

Future<DeleteFirewallManagerRuleGroupsResponse> deleteFirewallManagerRuleGroups({
  1. required String webACLArn,
  2. required String webACLLockToken,
})

Deletes all rule groups that are managed by AWS Firewall Manager for the specified web ACL.

You can only use this if ManagedByFirewallManager is false in the specified WebACL.

May throw WAFInternalErrorException. May throw WAFInvalidParameterException. May throw WAFNonexistentItemException. May throw WAFOptimisticLockException. May throw WAFInvalidOperationException.

Parameter webACLArn : The Amazon Resource Name (ARN) of the web ACL.

Parameter webACLLockToken : A token used for optimistic locking. AWS WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. AWS WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

Implementation

Future<DeleteFirewallManagerRuleGroupsResponse>
    deleteFirewallManagerRuleGroups({
  required String webACLArn,
  required String webACLLockToken,
}) async {
  ArgumentError.checkNotNull(webACLArn, 'webACLArn');
  _s.validateStringLength(
    'webACLArn',
    webACLArn,
    20,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(webACLLockToken, 'webACLLockToken');
  _s.validateStringLength(
    'webACLLockToken',
    webACLLockToken,
    1,
    36,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSWAF_20190729.DeleteFirewallManagerRuleGroups'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WebACLArn': webACLArn,
      'WebACLLockToken': webACLLockToken,
    },
  );

  return DeleteFirewallManagerRuleGroupsResponse.fromJson(jsonResponse.body);
}