Lists the resources that one certificate maps to: AWS Certificate Manager certificates, AWS Private Certificate Authority (AWS Private CA) certificates, and AWS Private CA certificate authorities. Returns one page of related resources and the total number of related resources. Related resources are sorted by ResourceArn, in ascending order. To read the next page, repeat the request with the NextToken from the previous response and the same CertificateIdentifier. A NextToken from a request for a different certificate returns ValidationException. 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 before the first PutInventoryConfiguration call. Until then, only the management account can call it; a delegated administrator receives AccessDeniedException. It also returns ResourceNotFoundException when the inventory has no certificate with the identifier.
Parameters:
-
certificate_identifier
(ContentHashIdentifier)
–
The identifier of the certificate whose related resources to list, as SearchInventory returns it.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of related resources 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 resources a certificate maps to
The certificate is the one an ACM certificate holds now. The inventory last read the ACM certificate on November 2, 2026.
>>> client.list_inventory_related_resources(certificate_identifier='3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91')
Continue with a token from another certificate
The NextToken came from a request for a different certificate.
>>> client.list_inventory_related_resources(certificate_identifier='3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91', next_token='AAEXAMPLENextTokenRelated11111')
Source code in docs_src/capo_acm/_services/acm.py
| def list_inventory_related_resources(
self,
certificate_identifier: "capo_acm.types.content_hash_identifier.ContentHashIdentifier",
*,
config_overrides: Optional[ACMClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
) -> "capo_acm.types.list_inventory_related_resources_output.ListInventoryRelatedResourcesOutput":
"""Lists the resources that one certificate maps to: AWS Certificate Manager certificates, AWS Private Certificate Authority (AWS Private CA) certificates, and AWS Private CA certificate authorities. Returns one page of related resources and the total number of related resources. Related resources are sorted by ResourceArn, in ascending order. To read the next page, repeat the request with the NextToken from the previous response and the same CertificateIdentifier. A NextToken from a request for a different certificate returns ValidationException. 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 before the first PutInventoryConfiguration call. Until then, only the management account can call it; a delegated administrator receives AccessDeniedException. It also returns ResourceNotFoundException when the inventory has no certificate with the identifier.
Args:
certificate_identifier: The identifier of the certificate whose related resources to list, as SearchInventory returns it.
max_results: The maximum number of related resources 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 resources a certificate maps to
The certificate is the one an ACM certificate holds now. The inventory last read the ACM certificate on November 2, 2026.
>>> client.list_inventory_related_resources(certificate_identifier='3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91')
Continue with a token from another certificate
The NextToken came from a request for a different certificate.
>>> client.list_inventory_related_resources(certificate_identifier='3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91', next_token='AAEXAMPLENextTokenRelated11111')
"""
def _handler(
req: "OperationRequest[capo_acm.types.list_inventory_related_resources_input.ListInventoryRelatedResourcesInput]",
) -> OperationResponse[
"capo_acm.types.list_inventory_related_resources_output.ListInventoryRelatedResourcesOutput"
]:
import capo_acm._operations.certificate_manager.list_inventory_related_resources
output, http_response = (
capo_acm._operations.certificate_manager.list_inventory_related_resources.list_inventory_related_resources(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListInventoryRelatedResources")
)
input_: capo_acm.types.list_inventory_related_resources_input.ListInventoryRelatedResourcesInput = {
"certificate_identifier": certificate_identifier
}
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
|