listHumanTaskUis method

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

Returns information about the human task user interfaces in your account.

Parameter creationTimeAfter : A filter that returns only human task user interfaces with a creation time greater than or equal to the specified timestamp.

Parameter creationTimeBefore : A filter that returns only human task user interfaces 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<ListHumanTaskUisResponse> listHumanTaskUis({
  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.ListHumanTaskUis'
  };
  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 ListHumanTaskUisResponse.fromJson(jsonResponse.body);
}