Skip to content

list_certificate_authorities async

list_certificate_authorities(
    cluster_name: String,
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    max_results: Optional[CertificateAuthorityMaxResults] = None,
    next_token: Optional[String] = None,
) -> ListCertificateAuthoritiesResponse

Lists the certificate authorities (CAs) for your cluster. A cluster has at most two certificate authorities: the outgoing CA that's currently signing and, during a rotation, one successor CA.

Parameters:

  • cluster_name (String) –

    The name of your cluster.

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

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. If you don't specify a value, the default is 100 results.

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

    The nextToken value returned from a previous paginated request, where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

    This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

Raises:

  • InvalidParameterException –

    The specified parameter is invalid. Review the available parameters for the API request.

  • ResourceNotFoundException –

    The specified resource could not be found. You can view your available clusters with ListClusters. You can view your available managed node groups with ListNodegroups. Amazon EKS clusters and node groups are Amazon Web Services Region specific.

  • ServerException –

    These errors are usually caused by a server-side issue.

  • ServiceUnavailableException –

    The service is unavailable. Back off and retry the operation.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_eks/_services/async_eks.py
async def list_certificate_authorities(
    self,
    cluster_name: "capo_eks.types.string.String",
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    max_results: Optional[
        "capo_eks.types.certificate_authority_max_results.CertificateAuthorityMaxResults"
    ] = None,
    next_token: Optional["capo_eks.types.string.String"] = None,
) -> "capo_eks.types.list_certificate_authorities_response.ListCertificateAuthoritiesResponse":
    """<p>Lists the certificate authorities (CAs) for your cluster. A cluster has at most two certificate authorities: the outgoing CA that's currently signing and, during a rotation, one successor CA.</p>

    Args:
        cluster_name: <p>The name of your cluster.</p>
        max_results: <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value. If you don't specify a value, the default is 100 results.</p>
        next_token: <p>The <code>nextToken</code> value returned from a previous paginated request, where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is null when there are no more results to return.</p> <note> <p>This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.</p> </note>

    Raises:
        capo_eks.errors.invalid_parameter_exception.InvalidParameterException: <p>The specified parameter is invalid. Review the available parameters for the API request.</p>
        capo_eks.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found. You can view your available clusters with <code>ListClusters</code>. You can view your available managed node groups with <code>ListNodegroups</code>. Amazon EKS clusters and node groups are Amazon Web Services Region specific.</p>
        capo_eks.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_eks.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is unavailable. Back off and retry the operation.</p>
        capo_eks.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_eks._operations.aws_wesley_frontend.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_eks.types.list_certificate_authorities_request.ListCertificateAuthoritiesRequest = {
        "cluster_name": cluster_name
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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