put_evidence
async
¶
put_evidence(
environment_arn: EnvironmentArn,
project: ProjectName,
*,
config_overrides: Optional[AsyncAssuranceClientConfig] = None,
content: Optional[EvidenceContent] = None,
title: Optional[EvidenceTitle] = None,
description: Optional[EvidenceDescription] = None,
evidence_id: Optional[str] = None,
content_mime_type: Optional[str] = None,
reference: Optional[EvidenceReference] = None,
connection_id: Optional[ConnectionId] = None,
control_references: Optional[ControlReferenceList] = None,
link_mode: Optional[LinkMode] = None,
purpose: Optional[EvidencePurpose] = None,
) -> PutEvidenceOutput
Adds evidence to support a compliance assessment. To add a new version of existing evidence, specify evidenceId.
Provide either the file content in content or a link to the document in reference, but not both.
Parameters:
-
environment_arn(EnvironmentArn) –The Amazon Resource Name (ARN) of this governance environment.
-
content(Optional[EvidenceContent], default:None) –The file content. Required for a direct upload. You can't specify both
contentandreference. -
title(Optional[EvidenceTitle], default:None) –The title of the evidence. When you create new evidence, AWS Assurance derives the evidence ID from the title, in the form
assurance://{sanitized-title}.Required when you specify
content. Optional when you specifyreference. If you omit it, AWS Assurance uses the name of the referenced document. -
description(Optional[EvidenceDescription], default:None) –The optional description of the evidence.
-
evidence_id(Optional[str], default:None) –The ID of existing evidence. Specify it to add a new version of that evidence. Omit it to create new evidence.
-
content_mime_type(Optional[str], default:None) –The declared Multipurpose Internet Mail Extensions (MIME) type of the file, for example
application/pdf. AWS Assurance checks the declared type against the actual file content. For the list of registered types, see Media Types on the IANA website. -
project(ProjectName) –Project scope for the evidence.
-
reference(Optional[EvidenceReference], default:None) –A link to the document. You can't specify both
referenceandcontent. Supported formats:-
For a file in GitHub, a link in the form https://github.com/{owner}/{repo}/blob/{ref}/{path}.
-
For a document in SharePoint, any link to the document in the form https://{tenant}.sharepoint.com/{path}, including a sharing link.
-
For an object in Amazon S3, a URI in the form s3://{bucket}/{key}. The bucket must be the evidence bucket configured for the environment.
-
-
connection_id(Optional[ConnectionId], default:None) –The ID of the connection to read
referencethrough, as returned byListEnvironmentConnections. Each new version of the document uses this connection too.Use this parameter only with
reference.If you omit this parameter, the operation uses the single connection that can read the document. If the environment has more than one connection to the same provider, specify this parameter.
-
control_references(Optional[ControlReferenceList], default:None) –The controls to link the evidence to when you add it. You can specify control links only when
purposeisCONTROL_EVIDENCE. -
link_mode(Optional[LinkMode], default:None) –Specifies whether AWS Assurance analyzes the evidence and links it to relevant controls. A link shows that the evidence is relevant to a control, not that you meet the control. An assessment determines whether you meet the control. Specify one of the following values:
-
AUTO– AWS Assurance analyzes the evidence and adds control links. -
MANUAL– AWS Assurance doesn't analyze the evidence. You add control links yourself.
Automatic linking is available only to some accounts during the preview. If you omit this parameter, the default is
AUTOfor those accounts andMANUALfor all other accounts. Evidence whosepurposeisn'tCONTROL_EVIDENCEalways has the modeDISABLED, which means that it can't be linked to controls. You can't specifyAUTOfor that evidence. -
-
purpose(Optional[EvidencePurpose], default:None) –What the evidence is for. Specify one of the following values:
-
CONTROL_EVIDENCE– Evidence that supports controls. -
FRAMEWORK_SOURCE– The document that you create a custom framework from. AWS Assurance never links this evidence to controls.
You can't specify
SCAN_EVIDENCE. If you omit this parameter, a new version keeps the purpose of the existing evidence, and new evidence usesCONTROL_EVIDENCE. You can't change the purpose in a new version. -
Raises:
-
AccessDeniedException–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.
-
InternalServerException–An internal server error occurred.
-
ResourceNotFoundException–The requested resource was not found.
-
ThrottlingException–The request was throttled.
-
ValidationException–The request failed validation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Add evidence for an assessment Adds a user access review as evidence for the payments-prod PCI-DSS assessment.
>>> await client.put_evidence(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', content='JVBERi0xLjQK', title='PCI-DSS user access review.pdf', project='payments-prod')
Source code in docs_src/capo_assurance/_services/async_assurance.py
6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 | |