put_evidence
¶
put_evidence(
environment_arn: EnvironmentArn,
project: ProjectName,
*,
config_overrides: Optional[AssuranceClientConfig] = 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.
>>> 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/assurance.py
6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 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 | |