listRoutes method

Future<ListRoutesResponse> listRoutes({
  1. required String applicationIdentifier,
  2. required String environmentIdentifier,
  3. int? maxResults,
  4. String? nextToken,
})

Lists all the Amazon Web Services Migration Hub Refactor Spaces routes within an application.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter applicationIdentifier : The ID of the application.

Parameter environmentIdentifier : The ID of the environment.

Parameter maxResults : The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Parameter nextToken : The token for the next page of results.

Implementation

Future<ListRoutesResponse> listRoutes({
  required String applicationIdentifier,
  required String environmentIdentifier,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/environments/${Uri.encodeComponent(environmentIdentifier)}/applications/${Uri.encodeComponent(applicationIdentifier)}/routes',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRoutesResponse.fromJson(response);
}