listAppVersions method

Future<ListAppVersionsResponse> listAppVersions({
  1. required String appArn,
  2. DateTime? endTime,
  3. int? maxResults,
  4. String? nextToken,
  5. DateTime? startTime,
})

Lists the different versions for the Resilience Hub applications.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter appArn : Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

Parameter endTime : Upper limit of the time range to filter the application versions.

Parameter maxResults : Maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

Parameter nextToken : Null, or the token from a previous call to get the next set of results.

Parameter startTime : Lower limit of the time range to filter the application versions.

Implementation

Future<ListAppVersionsResponse> listAppVersions({
  required String appArn,
  DateTime? endTime,
  int? maxResults,
  String? nextToken,
  DateTime? startTime,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $payload = <String, dynamic>{
    'appArn': appArn,
    if (endTime != null) 'endTime': unixTimestampToJson(endTime),
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (startTime != null) 'startTime': unixTimestampToJson(startTime),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/list-app-versions',
    exceptionFnMap: _exceptionFns,
  );
  return ListAppVersionsResponse.fromJson(response);
}