listAlarmModelVersions method

Future<ListAlarmModelVersionsResponse> listAlarmModelVersions({
  1. required String alarmModelName,
  2. int? maxResults,
  3. String? nextToken,
})

Lists all the versions of an alarm model. The operation returns only the metadata associated with each alarm model version.

May throw InternalFailureException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter alarmModelName : The name of the alarm model.

Parameter maxResults : The maximum number of results to be returned per request.

Parameter nextToken : The token that you can use to return the next set of results.

Implementation

Future<ListAlarmModelVersionsResponse> listAlarmModelVersions({
  required String alarmModelName,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  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:
        '/alarm-models/${Uri.encodeComponent(alarmModelName)}/versions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListAlarmModelVersionsResponse.fromJson(response);
}