listApplicationStates method

Future<ListApplicationStatesResult> listApplicationStates({
  1. List<String>? applicationIds,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all the migration statuses for your applications. If you use the optional ApplicationIds parameter, only the migration statuses for those applications will be returned.

May throw AccessDeniedException. May throw ThrottlingException. May throw InternalServerError. May throw ServiceUnavailableException. May throw InvalidInputException. May throw HomeRegionNotSetException.

Parameter applicationIds : The configurationIds from the Application Discovery Service that uniquely identifies your applications.

Parameter maxResults : Maximum number of results to be returned per page.

Parameter nextToken : If a NextToken was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in NextToken.

Implementation

Future<ListApplicationStatesResult> listApplicationStates({
  List<String>? applicationIds,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    0,
    2048,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSMigrationHub.ListApplicationStates'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (applicationIds != null) 'ApplicationIds': applicationIds,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListApplicationStatesResult.fromJson(jsonResponse.body);
}