Skip to content

batch_import_evidence_to_assessment_control async

batch_import_evidence_to_assessment_control(
    assessment_id: UUID,
    control_set_id: ControlSetId,
    control_id: UUID,
    manual_evidence: ManualEvidenceList,
    *,
    config_overrides: Optional[AsyncAuditManagerClientConfig] = None,
) -> BatchImportEvidenceToAssessmentControlResponse

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.

Parameters:

  • assessment_id (UUID) –

    The identifier for the assessment.

  • control_set_id (ControlSetId) –

    The identifier for the control set.

  • control_id (UUID) –

    The identifier for the control.

  • manual_evidence (ManualEvidenceList) –

    The list of manual evidence objects.

Raises:

Source code in docs_src/capo_auditmanager/_services/async_audit_manager.py
async def batch_import_evidence_to_assessment_control(
    self,
    assessment_id: "capo_auditmanager.types.uuid.UUID",
    control_set_id: "capo_auditmanager.types.control_set_id.ControlSetId",
    control_id: "capo_auditmanager.types.uuid.UUID",
    manual_evidence: "capo_auditmanager.types.manual_evidence_list.ManualEvidenceList",
    *,
    config_overrides: Optional[AsyncAuditManagerClientConfig] = None,
) -> "capo_auditmanager.types.batch_import_evidence_to_assessment_control_response.BatchImportEvidenceToAssessmentControlResponse":
    """<p>Adds one or more pieces of evidence to a control in an Audit Manager assessment. </p> <p>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. </p> <p>The following restrictions apply to this action:</p> <ul> <li> <p> <code>manualEvidence</code> can be only one of the following: <code>evidenceFileName</code>, <code>s3ResourcePath</code>, or <code>textResponse</code> </p> </li> <li> <p>Maximum size of an individual evidence file: 100 MB</p> </li> <li> <p>Number of daily manual evidence uploads per control: 100</p> </li> <li> <p>Supported file formats: See <a href="https://docs.aws.amazon.com/audit-manager/latest/userguide/upload-evidence.html#supported-manual-evidence-files">Supported file types for manual evidence</a> in the <i>Audit Manager User Guide</i> </p> </li> </ul> <p>For more information about Audit Manager service restrictions, see <a href="https://docs.aws.amazon.com/audit-manager/latest/userguide/service-quotas.html">Quotas and restrictions for Audit Manager</a>.</p>

    Args:
        assessment_id: <p> The identifier for the assessment. </p>
        control_set_id: <p> The identifier for the control set. </p>
        control_id: <p> The identifier for the control. </p>
        manual_evidence: <p> The list of manual evidence objects. </p>

    Raises:
        capo_auditmanager.errors.access_denied_exception.AccessDeniedException: <p> Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again. </p>
        capo_auditmanager.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
        capo_auditmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource that's specified in the request can't be found. </p>
        capo_auditmanager.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_auditmanager.errors.validation_exception.ValidationException: <p> The request has invalid or missing parameters. </p>
        capo_auditmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_auditmanager.types.batch_import_evidence_to_assessment_control_request.BatchImportEvidenceToAssessmentControlRequest]",
    ) -> AsyncOperationResponse[
        "capo_auditmanager.types.batch_import_evidence_to_assessment_control_response.BatchImportEvidenceToAssessmentControlResponse"
    ]:
        import capo_auditmanager._operations.bedrock_assessment_manager_lambda.batch_import_evidence_to_assessment_control

        (
            output,
            http_response,
        ) = await capo_auditmanager._operations.bedrock_assessment_manager_lambda.batch_import_evidence_to_assessment_control.async_batch_import_evidence_to_assessment_control(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_auditmanager.types.batch_import_evidence_to_assessment_control_request.BatchImportEvidenceToAssessmentControlRequest",
    ) -> dict[str, Any]:
        import capo_auditmanager.types.batch_import_evidence_to_assessment_control_request

        return capo_auditmanager.types.batch_import_evidence_to_assessment_control_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_auditmanager.types.batch_import_evidence_to_assessment_control_response.BatchImportEvidenceToAssessmentControlResponse",
    ) -> dict[str, Any]:
        import capo_auditmanager.types.batch_import_evidence_to_assessment_control_response

        return capo_auditmanager.types.batch_import_evidence_to_assessment_control_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "BatchImportEvidenceToAssessmentControl",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_auditmanager.types.batch_import_evidence_to_assessment_control_request.BatchImportEvidenceToAssessmentControlRequest = {
        "assessment_id": assessment_id,
        "control_set_id": control_set_id,
        "control_id": control_id,
        "manual_evidence": manual_evidence,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output