Skip to content

delete_evidence async

delete_evidence(
    environment_arn: EnvironmentArn,
    evidence_id: str,
    project: ProjectName,
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
) -> DeleteEvidenceOutput

Removes an evidence item.

Parameters:

  • environment_arn (EnvironmentArn) –

    The ARN of this governance environment.

  • evidence_id (str) –

    The unique identifier of the evidence item.

  • project (ProjectName) –

    The name of the project.

Raises:

Examples:

Delete an evidence item Removes the user access review evidence from the payments-prod project.

>>> await client.delete_evidence(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', evidence_id='assurance://PCI-DSS-user-access-review.pdf', project='payments-prod')
Source code in docs_src/capo_assurance/_services/async_assurance.py
async def delete_evidence(
    self,
    environment_arn: "capo_assurance.types.environment_arn.EnvironmentArn",
    evidence_id: str,
    project: "capo_assurance.types.project_name.ProjectName",
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
) -> "capo_assurance.types.delete_evidence_output.DeleteEvidenceOutput":
    """<p>Removes an evidence item.</p>

    Args:
        environment_arn: <p>The ARN of this governance environment.</p>
        evidence_id: <p>The unique identifier of the evidence item.</p>
        project: <p>The name of the project.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Delete an evidence item
        Removes the user access review evidence from the payments-prod project.

        >>> await client.delete_evidence(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', evidence_id='assurance://PCI-DSS-user-access-review.pdf', project='payments-prod')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_assurance.types.delete_evidence_input.DeleteEvidenceInput]",
    ) -> AsyncOperationResponse[
        "capo_assurance.types.delete_evidence_output.DeleteEvidenceOutput"
    ]:
        import capo_assurance._operations.assurance.delete_evidence

        (
            output,
            http_response,
        ) = await capo_assurance._operations.assurance.delete_evidence.async_delete_evidence(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEvidence")
    )
    input_: capo_assurance.types.delete_evidence_input.DeleteEvidenceInput = {
        "environment_arn": environment_arn,
        "evidence_id": evidence_id,
        "project": project,
    }

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