Skip to content

list_certificate_authorities async

list_certificate_authorities(
    *,
    config_overrides: Optional[AsyncACMPCAClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    resource_owner: Optional[ResourceOwner] = None,
) -> ListCertificateAuthoritiesResponse

Lists the private certificate authorities that you created by using the CreateCertificateAuthority action.

Parameters:

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

    Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.

    Although the maximum value is 1000, the action only returns a maximum of 100 items.

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

    Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

  • resource_owner (Optional[ResourceOwner], default: None ) –

    Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.

Raises:

Source code in docs_src/capo_acm_pca/_services/async_acmpca.py
async def list_certificate_authorities(
    self,
    *,
    config_overrides: Optional[AsyncACMPCAClientConfig] = None,
    max_results: Optional["capo_acm_pca.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_acm_pca.types.next_token.NextToken"] = None,
    resource_owner: Optional[
        "capo_acm_pca.types.resource_owner.ResourceOwner"
    ] = None,
) -> "capo_acm_pca.types.list_certificate_authorities_response.ListCertificateAuthoritiesResponse":
    """<p>Lists the private certificate authorities that you created by using the <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html">CreateCertificateAuthority</a> action.</p>

    Args:
        max_results: <p>Use this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the <code>NextToken</code> element is sent in the response. Use this <code>NextToken</code> value in a subsequent request to retrieve additional items.</p> <p>Although the maximum value is 1000, the action only returns a maximum of 100 items.</p>
        next_token: <p>Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the <code>NextToken</code> parameter from the response you just received.</p>
        resource_owner: <p>Use this parameter to filter the returned set of certificate authorities based on their owner. The default is SELF.</p>

    Raises:
        capo_acm_pca.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The token specified in the <code>NextToken</code> argument is not valid. Use the token returned from your previous call to <a href="https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListCertificateAuthorities.html">ListCertificateAuthorities</a>.</p>
        capo_acm_pca.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_acm_pca.types.list_certificate_authorities_request.ListCertificateAuthoritiesRequest]",
    ) -> AsyncOperationResponse[
        "capo_acm_pca.types.list_certificate_authorities_response.ListCertificateAuthoritiesResponse"
    ]:
        import capo_acm_pca._operations.acm_private_ca.list_certificate_authorities

        (
            output,
            http_response,
        ) = await capo_acm_pca._operations.acm_private_ca.list_certificate_authorities.async_list_certificate_authorities(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCertificateAuthorities")
    )
    input_: capo_acm_pca.types.list_certificate_authorities_request.ListCertificateAuthoritiesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if resource_owner is not None:
        input_["resource_owner"] = resource_owner

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