Skip to content

list_inventory_findings

list_inventory_findings(
    certificate_identifier: ContentHashIdentifier,
    *,
    config_overrides: Optional[ACMClientConfig] = None,
    severity: Optional[FindingSeverity] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> ListInventoryFindingsOutput

Lists the open findings for one certificate. Returns one page of findings and the total number of findings. A finding says that a certificate series has a problem you can fix, and how severe it is. A series is the set of certificates that one AWS Certificate Manager (ACM) certificate holds across renewals and reimports. A certificate's findings are the open findings of every series in which it is a current certificate. A rule that passes or does not apply produces no finding, so a certificate with no problems returns an empty list. Findings are sorted by severity, highest first, and then by RuleId in alphabetical order. Ties are broken in a fixed order that is unique to each finding, so paging returns every finding at least once. A finding can change while you page, for example when its severity rises. Then it is returned again, with its new values, at the top of a later page. Its FindingId does not change, so you can replace the copy you already have. To read the next page, repeat the request with the NextToken from the previous response. Keep the same CertificateIdentifier and Severity. A NextToken from a request with a different CertificateIdentifier or Severity returns ValidationException. Every response also reports the certificate's HighestFindingSeverity. It is NOT_EVALUATED until the certificate's findings have been evaluated. The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition. The operation returns ResourceNotFoundException in two cases, each with its own message: - The inventory is not configured: no PutInventoryConfiguration call has run. - The inventory has no certificate with the identifier. Do not match on the message to tell the cases apart. GetInventoryConfiguration says whether the inventory is configured. Before the first PutInventoryConfiguration call, only the management account can call it; a delegated administrator receives AccessDeniedException.

Parameters:

  • certificate_identifier (ContentHashIdentifier) –

    The identifier of the certificate whose findings to list, as SearchInventory returns it.

  • severity (Optional[FindingSeverity], default: None ) –

    Return only findings of this severity. Omit it to return findings of every severity.

  • max_results (Optional[int], default: None ) –

    The maximum number of findings to return, 1 to 100. Defaults to 25.

  • next_token (Optional[str], default: None ) –

    The NextToken from the previous response, to read the next page.

Raises:

Examples:

List the findings of a certificate ACM has not renewed the exported certificate. The inventory cannot observe where an exported certificate is used.

>>> client.list_inventory_findings(certificate_identifier='38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883')
List the findings of a healthy certificate
Every rule that applies to the certificate passes.
>>> client.list_inventory_findings(certificate_identifier='5b2d8e1f4a7c0936d2e5f8b1a4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1')
List the findings of a certificate the inventory has not observed
No certificate in the organization's inventory has this identifier.
>>> client.list_inventory_findings(certificate_identifier='9c1e4b7a2d5f8036e9b2c5f8a1d4e7b0c3f6a9d2e5b8c1f4a7d0e3b6c9f2a5d8')
Continue with a token from another severity
The NextToken came from a request for HIGH findings, and this request asks for CRITICAL findings.
>>> client.list_inventory_findings(certificate_identifier='38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883', severity='CRITICAL', next_token='AAEXAMPLENextTokenFindings1111')
Source code in docs_src/capo_acm/_services/acm.py
def list_inventory_findings(
    self,
    certificate_identifier: "capo_acm.types.content_hash_identifier.ContentHashIdentifier",
    *,
    config_overrides: Optional[ACMClientConfig] = None,
    severity: Optional["capo_acm.types.finding_severity.FindingSeverity"] = None,
    max_results: Optional[int] = None,
    next_token: Optional[str] = None,
) -> "capo_acm.types.list_inventory_findings_output.ListInventoryFindingsOutput":
    """Lists the open findings for one certificate. Returns one page of findings and the total number of findings. A finding says that a certificate series has a problem you can fix, and how severe it is. A series is the set of certificates that one AWS Certificate Manager (ACM) certificate holds across renewals and reimports. A certificate's findings are the open findings of every series in which it is a current certificate. A rule that passes or does not apply produces no finding, so a certificate with no problems returns an empty list. Findings are sorted by severity, highest first, and then by RuleId in alphabetical order. Ties are broken in a fixed order that is unique to each finding, so paging returns every finding at least once. A finding can change while you page, for example when its severity rises. Then it is returned again, with its new values, at the top of a later page. Its FindingId does not change, so you can replace the copy you already have. To read the next page, repeat the request with the NextToken from the previous response. Keep the same CertificateIdentifier and Severity. A NextToken from a request with a different CertificateIdentifier or Severity returns ValidationException. Every response also reports the certificate's HighestFindingSeverity. It is NOT_EVALUATED until the certificate's findings have been evaluated. The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition. The operation returns ResourceNotFoundException in two cases, each with its own message: - The inventory is not configured: no PutInventoryConfiguration call has run. - The inventory has no certificate with the identifier. Do not match on the message to tell the cases apart. GetInventoryConfiguration says whether the inventory is configured. Before the first PutInventoryConfiguration call, only the management account can call it; a delegated administrator receives AccessDeniedException.

    Args:
        certificate_identifier: The identifier of the certificate whose findings to list, as SearchInventory returns it.
        severity: Return only findings of this severity. Omit it to return findings of every severity.
        max_results: The maximum number of findings to return, 1 to 100. Defaults to 25.
        next_token: The NextToken from the previous response, to read the next page.

    Raises:
        capo_acm.errors.access_denied_exception.AccessDeniedException: <p>You do not have access required to perform this action.</p>
        capo_acm.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
        capo_acm.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified certificate cannot be found in the caller's account or the caller's account cannot be found.</p>
        capo_acm.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded a quota.</p>
        capo_acm.errors.validation_exception.ValidationException: <p>The supplied input failed to satisfy constraints of an Amazon Web Services service.</p>
        capo_acm.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List the findings of a certificate
        ACM has not renewed the exported certificate. The inventory cannot observe where an exported certificate is used.

        >>> client.list_inventory_findings(certificate_identifier='38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883')
        List the findings of a healthy certificate
        Every rule that applies to the certificate passes.

        >>> client.list_inventory_findings(certificate_identifier='5b2d8e1f4a7c0936d2e5f8b1a4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1')
        List the findings of a certificate the inventory has not observed
        No certificate in the organization's inventory has this identifier.

        >>> client.list_inventory_findings(certificate_identifier='9c1e4b7a2d5f8036e9b2c5f8a1d4e7b0c3f6a9d2e5b8c1f4a7d0e3b6c9f2a5d8')
        Continue with a token from another severity
        The NextToken came from a request for HIGH findings, and this request asks for CRITICAL findings.

        >>> client.list_inventory_findings(certificate_identifier='38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883', severity='CRITICAL', next_token='AAEXAMPLENextTokenFindings1111')
    """

    def _handler(
        req: "OperationRequest[capo_acm.types.list_inventory_findings_input.ListInventoryFindingsInput]",
    ) -> OperationResponse[
        "capo_acm.types.list_inventory_findings_output.ListInventoryFindingsOutput"
    ]:
        import capo_acm._operations.certificate_manager.list_inventory_findings

        output, http_response = (
            capo_acm._operations.certificate_manager.list_inventory_findings.list_inventory_findings(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInventoryFindings")
    )
    input_: capo_acm.types.list_inventory_findings_input.ListInventoryFindingsInput = {
        "certificate_identifier": certificate_identifier
    }
    if severity is not None:
        input_["severity"] = severity
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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