listFlowOperationResults method

Future<ListFlowOperationResultsResponse> listFlowOperationResults({
  1. required String firewallArn,
  2. required String flowOperationId,
  3. String? availabilityZone,
  4. int? maxResults,
  5. String? nextToken,
  6. String? vpcEndpointAssociationArn,
  7. String? vpcEndpointId,
})

Returns the results of a specific flow operation.

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 flowOperationId : A unique identifier for the flow operation. This ID is returned in the responses to start and list commands. You provide to describe commands.

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 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<ListFlowOperationResultsResponse> listFlowOperationResults({
  required String firewallArn,
  required String flowOperationId,
  String? availabilityZone,
  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.ListFlowOperationResults'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'FirewallArn': firewallArn,
      'FlowOperationId': flowOperationId,
      if (availabilityZone != null) 'AvailabilityZone': availabilityZone,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (vpcEndpointAssociationArn != null)
        'VpcEndpointAssociationArn': vpcEndpointAssociationArn,
      if (vpcEndpointId != null) 'VpcEndpointId': vpcEndpointId,
    },
  );

  return ListFlowOperationResultsResponse.fromJson(jsonResponse.body);
}