listJobTemplates method

Future<ListJobTemplatesResponse> listJobTemplates({
  1. DateTime? createdAfter,
  2. DateTime? createdBefore,
  3. int? maxResults,
  4. String? nextToken,
})

Lists job templates based on a set of parameters. Job template stores values of StartJobRun API request in a template and can be used to start a job run. Job template allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun API request.

May throw InternalServerException. May throw ValidationException.

Parameter createdAfter : The date and time after which the job templates were created.

Parameter createdBefore : The date and time before which the job templates were created.

Parameter maxResults : The maximum number of job templates that can be listed.

Parameter nextToken : The token for the next set of job templates to return.

Implementation

Future<ListJobTemplatesResponse> listJobTemplates({
  DateTime? createdAfter,
  DateTime? createdBefore,
  int? maxResults,
  String? nextToken,
}) async {
  final $query = <String, List<String>>{
    if (createdAfter != null)
      'createdAfter': [_s.iso8601ToJson(createdAfter).toString()],
    if (createdBefore != null)
      'createdBefore': [_s.iso8601ToJson(createdBefore).toString()],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/jobtemplates',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListJobTemplatesResponse.fromJson(response);
}