searchFlowTemplates method

Future<SearchFlowTemplatesResponse> searchFlowTemplates({
  1. List<FlowTemplateFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
})

Searches for summary information about workflows.

May throw InvalidRequestException. May throw ThrottlingException. May throw InternalFailureException.

Parameter filters : An array of objects that limit the result set. The only valid filter is DEVICE_MODEL_ID.

Parameter maxResults : The maximum number of results to return in the response.

Parameter nextToken : The string that specifies the next page of results. Use this when you're paginating results.

Implementation

Future<SearchFlowTemplatesResponse> searchFlowTemplates({
  List<FlowTemplateFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'IotThingsGraphFrontEndService.SearchFlowTemplates'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (filters != null) 'filters': filters,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return SearchFlowTemplatesResponse.fromJson(jsonResponse.body);
}