searchFlows method

Future<SearchFlowsOutput> searchFlows({
  1. required String awsAccountId,
  2. required List<SearchFlowsFilter> filters,
  3. int? maxResults,
  4. String? nextToken,
})

Search for the flows in an Amazon Web Services account.

May throw AccessDeniedException. May throw InternalFailureException. May throw InvalidParameterValueException. May throw ThrottlingException.

Parameter awsAccountId : The ID of the Amazon Web Services account where you are searching for flows from.

Parameter filters : The filters applied to the search when searching for flows in the Amazon Web Services account.

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : The token to request the next set of results, or null if you want to retrieve the first set.

Implementation

Future<SearchFlowsOutput> searchFlows({
  required String awsAccountId,
  required List<SearchFlowsFilter> filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/flows/searchFlows',
    exceptionFnMap: _exceptionFns,
  );
  return SearchFlowsOutput.fromJson(response);
}