listFlowOperations method
Returns a list of all flow operations ran in a specific firewall. You can optionally narrow the request scope by specifying the operation type or Availability Zone associated with a firewall's flow operations.
Flow operations let you manage the flows tracked in the flow table, also known as the firewall table.
A flow is network traffic that is monitored by a firewall, either by stateful or stateless rules. For traffic to be considered part of a flow, it must share Destination, DestinationPort, Direction, Protocol, Source, and SourcePort.
May throw InternalServerError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter firewallArn :
The Amazon Resource Name (ARN) of the firewall.
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 flowOperationType :
An optional string that defines whether any or all operation types are
returned.
Parameter maxResults :
The maximum number of objects that you want Network Firewall to return for
this request. If more objects are available, in the response, Network
Firewall provides a NextToken value that you can use in a
subsequent call to get the next batch of objects.
Parameter nextToken :
When you request a list of objects with a MaxResults setting,
if the number of objects that are still available for retrieval exceeds
the maximum you requested, Network Firewall returns a
NextToken value in the response. To retrieve the next batch
of objects, use the token returned from the prior request in your next
request.
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<ListFlowOperationsResponse> listFlowOperations({
required String firewallArn,
String? availabilityZone,
FlowOperationType? flowOperationType,
int? maxResults,
String? nextToken,
String? vpcEndpointAssociationArn,
String? vpcEndpointId,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'NetworkFirewall_20201112.ListFlowOperations'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FirewallArn': firewallArn,
if (availabilityZone != null) 'AvailabilityZone': availabilityZone,
if (flowOperationType != null)
'FlowOperationType': flowOperationType.value,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (vpcEndpointAssociationArn != null)
'VpcEndpointAssociationArn': vpcEndpointAssociationArn,
if (vpcEndpointId != null) 'VpcEndpointId': vpcEndpointId,
},
);
return ListFlowOperationsResponse.fromJson(jsonResponse.body);
}