getChangeLogs method

Future<GetChangeLogsResponse> getChangeLogs({
  1. required String assessmentId,
  2. String? controlId,
  3. String? controlSetId,
  4. int? maxResults,
  5. String? nextToken,
})

Gets a list of changelogs from Audit Manager.

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

Parameter assessmentId : The unique identifier for the assessment.

Parameter controlId : The unique identifier for the control.

Parameter controlSetId : The unique identifier for the control set.

Parameter maxResults : Represents the maximum number of results on a page or for an API request call.

Parameter nextToken : The pagination token that's used to fetch the next set of results.

Implementation

Future<GetChangeLogsResponse> getChangeLogs({
  required String assessmentId,
  String? controlId,
  String? controlSetId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  final $query = <String, List<String>>{
    if (controlId != null) 'controlId': [controlId],
    if (controlSetId != null) 'controlSetId': [controlSetId],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/assessments/${Uri.encodeComponent(assessmentId)}/changelogs',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetChangeLogsResponse.fromJson(response);
}