batchImportEvidenceToAssessmentControl method

Future<BatchImportEvidenceToAssessmentControlResponse> batchImportEvidenceToAssessmentControl({
  1. required String assessmentId,
  2. required String controlId,
  3. required String controlSetId,
  4. required List<ManualEvidence> manualEvidence,
})

Adds one or more pieces of evidence to a control in an Audit Manager assessment.

You can import manual evidence from any S3 bucket by specifying the S3 URI of the object. You can also upload a file from your browser, or enter plain text in response to a risk assessment question.

The following restrictions apply to this action:

  • manualEvidence can be only one of the following: evidenceFileName, s3ResourcePath, or textResponse
  • Maximum size of an individual evidence file: 100 MB
  • Number of daily manual evidence uploads per control: 100
  • Supported file formats: See Supported file types for manual evidence in the Audit Manager User Guide
For more information about Audit Manager service restrictions, see Quotas and restrictions for Audit Manager.

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

Parameter assessmentId : The identifier for the assessment.

Parameter controlId : The identifier for the control.

Parameter controlSetId : The identifier for the control set.

Parameter manualEvidence : The list of manual evidence objects.

Implementation

Future<BatchImportEvidenceToAssessmentControlResponse>
    batchImportEvidenceToAssessmentControl({
  required String assessmentId,
  required String controlId,
  required String controlSetId,
  required List<ManualEvidence> manualEvidence,
}) async {
  final $payload = <String, dynamic>{
    'manualEvidence': manualEvidence,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/assessments/${Uri.encodeComponent(assessmentId)}/controlSets/${Uri.encodeComponent(controlSetId)}/controls/${Uri.encodeComponent(controlId)}/evidence',
    exceptionFnMap: _exceptionFns,
  );
  return BatchImportEvidenceToAssessmentControlResponse.fromJson(response);
}