getEvidenceFoldersByAssessment method

Future<GetEvidenceFoldersByAssessmentResponse> getEvidenceFoldersByAssessment({
  1. required String assessmentId,
  2. int? maxResults,
  3. String? nextToken,
})

Gets the evidence folders from a specified assessment in Audit Manager.

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

Parameter assessmentId : The unique identifier for the assessment.

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<GetEvidenceFoldersByAssessmentResponse>
    getEvidenceFoldersByAssessment({
  required String assessmentId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1000,
  );
  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:
        '/assessments/${Uri.encodeComponent(assessmentId)}/evidenceFolders',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetEvidenceFoldersByAssessmentResponse.fromJson(response);
}