Skip to content

get_evidence_file_upload_url

get_evidence_file_upload_url(
    file_name: ManualEvidenceLocalFileName,
    *,
    config_overrides: Optional[AuditManagerClientConfig] = None,
) -> GetEvidenceFileUploadUrlResponse

Creates a presigned Amazon S3 URL that can be used to upload a file as manual evidence. For instructions on how to use this operation, see Upload a file from your browser in the Audit Manager User Guide.

The following restrictions apply to this operation:

  • 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:

Raises:

  • AccessDeniedException –

    Your account isn't registered with Audit Manager. Check the delegated administrator setup on the Audit Manager settings page, and try again.

  • InternalServerException –

    An internal service error occurred during the processing of your request. Try again later.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The request has invalid or missing parameters.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_auditmanager/_services/audit_manager.py
def get_evidence_file_upload_url(
    self,
    file_name: "capo_auditmanager.types.manual_evidence_local_file_name.ManualEvidenceLocalFileName",
    *,
    config_overrides: Optional[AuditManagerClientConfig] = None,
) -> "capo_auditmanager.types.get_evidence_file_upload_url_response.GetEvidenceFileUploadUrlResponse":
    """<p>Creates a presigned Amazon S3 URL that can be used to upload a file as manual evidence. For instructions on how to use this operation, see <a href="https://docs.aws.amazon.com/audit-manager/latest/userguide/upload-evidence.html#how-to-upload-manual-evidence-files">Upload a file from your browser </a> in the <i>Audit Manager User Guide</i>.</p> <p>The following restrictions apply to this operation:</p> <ul> <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:
        file_name: <p>The file that you want to upload. For a list of 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>

    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.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.
    """

    def _handler(
        req: "OperationRequest[capo_auditmanager.types.get_evidence_file_upload_url_request.GetEvidenceFileUploadUrlRequest]",
    ) -> OperationResponse[
        "capo_auditmanager.types.get_evidence_file_upload_url_response.GetEvidenceFileUploadUrlResponse"
    ]:
        import capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_evidence_file_upload_url

        output, http_response = (
            capo_auditmanager._operations.bedrock_assessment_manager_lambda.get_evidence_file_upload_url.get_evidence_file_upload_url(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return capo_auditmanager.types.get_evidence_file_upload_url_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetEvidenceFileUploadUrl", redact_input=_redact_input),
    )
    input_: capo_auditmanager.types.get_evidence_file_upload_url_request.GetEvidenceFileUploadUrlRequest = {
        "file_name": file_name
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output