listFlowDefinitions method

Future<ListFlowDefinitionsResponse> listFlowDefinitions({
  1. DateTime? creationTimeAfter,
  2. DateTime? creationTimeBefore,
  3. int? maxResults,
  4. String? nextToken,
  5. SortOrder? sortOrder,
})

Returns information about the flow definitions in your account.

Parameter creationTimeAfter : A filter that returns only flow definitions with a creation time greater than or equal to the specified timestamp.

Parameter creationTimeBefore : A filter that returns only flow definitions that were created before the specified timestamp.

Parameter maxResults : The total number of items to return. If the total number of available items is more than the value specified in MaxResults, then a NextToken will be provided in the output that you can use to resume pagination.

Parameter nextToken : A token to resume pagination.

Parameter sortOrder : An optional value that specifies whether you want the results sorted in Ascending or Descending order.

Implementation

Future<ListFlowDefinitionsResponse> listFlowDefinitions({
  DateTime? creationTimeAfter,
  DateTime? creationTimeBefore,
  int? maxResults,
  String? nextToken,
  SortOrder? sortOrder,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    8192,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.ListFlowDefinitions'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (creationTimeAfter != null)
        'CreationTimeAfter': unixTimestampToJson(creationTimeAfter),
      if (creationTimeBefore != null)
        'CreationTimeBefore': unixTimestampToJson(creationTimeBefore),
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
      if (sortOrder != null) 'SortOrder': sortOrder.toValue(),
    },
  );

  return ListFlowDefinitionsResponse.fromJson(jsonResponse.body);
}