listTemplates method

Future<ListMigrationWorkflowTemplatesResponse> listTemplates({
  1. int? maxResults,
  2. String? name,
  3. String? nextToken,
})

List the templates available in Migration Hub Orchestrator to create a migration workflow.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException.

Parameter maxResults : The maximum number of results that can be returned.

Parameter name : The name of the template.

Parameter nextToken : The pagination token.

Implementation

Future<ListMigrationWorkflowTemplatesResponse> listTemplates({
  int? maxResults,
  String? name,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (name != null) 'name': [name],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/migrationworkflowtemplates',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListMigrationWorkflowTemplatesResponse.fromJson(response);
}