startFlowFlush method

Future<StartFlowFlushResponse> startFlowFlush({
  1. required String firewallArn,
  2. required List<FlowFilter> flowFilters,
  3. String? availabilityZone,
  4. int? minimumFlowAgeInSeconds,
  5. String? vpcEndpointAssociationArn,
  6. String? vpcEndpointId,
})

Begins the flushing of traffic from the firewall, according to the filters you define. When the operation starts, impacted flows are temporarily marked as timed out before the Suricata engine prunes, or flushes, the flows from the firewall table.

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

Parameter firewallArn : The Amazon Resource Name (ARN) of the firewall.

Parameter flowFilters : Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.

Parameter availabilityZone : The ID of the Availability Zone where the firewall is located. For example, us-east-2a.

Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.

Parameter minimumFlowAgeInSeconds : The reqested FlowOperation ignores flows with an age (in seconds) lower than MinimumFlowAgeInSeconds. You provide this for start commands.

Parameter vpcEndpointAssociationArn : The Amazon Resource Name (ARN) of a VPC endpoint association.

Parameter vpcEndpointId : A unique identifier for the primary endpoint associated with a firewall.

Implementation

Future<StartFlowFlushResponse> startFlowFlush({
  required String firewallArn,
  required List<FlowFilter> flowFilters,
  String? availabilityZone,
  int? minimumFlowAgeInSeconds,
  String? vpcEndpointAssociationArn,
  String? vpcEndpointId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'NetworkFirewall_20201112.StartFlowFlush'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FirewallArn': firewallArn,
      'FlowFilters': flowFilters,
      if (availabilityZone != null) 'AvailabilityZone': availabilityZone,
      if (minimumFlowAgeInSeconds != null)
        'MinimumFlowAgeInSeconds': minimumFlowAgeInSeconds,
      if (vpcEndpointAssociationArn != null)
        'VpcEndpointAssociationArn': vpcEndpointAssociationArn,
      if (vpcEndpointId != null) 'VpcEndpointId': vpcEndpointId,
    },
  );

  return StartFlowFlushResponse.fromJson(jsonResponse.body);
}