Skip to content

list_certificate_authority_replicas

list_certificate_authority_replicas(
    certificate_authority_arn: Arn,
    *,
    config_overrides: Optional[ACMPCAClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListCertificateAuthorityReplicasResponse

Lists the replicas of a multi-Region private certificate authority (CA). Call this operation in the Region of the primary CA, and specify the ARN of the primary CA. The response does not include deleted replicas. We recommend using pagination to ensure that the operation returns quickly and successfully. To retrieve additional replicas, use the NextToken value from the response in a subsequent request.

Parameters:

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

    The maximum number of replicas to return on each page. If more replicas exist, the response includes a NextToken value that you can use in a subsequent request to retrieve them.

  • 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.

  • certificate_authority_arn (Arn) –

    The Amazon Resource Name (ARN) of the primary CA whose replicas you want to list. This must be of the form:

    arn:aws:acm-pca:region:account:certificate-authority/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111

Raises:

Source code in docs_src/capo_acm_pca/_services/acmpca.py
def list_certificate_authority_replicas(
    self,
    certificate_authority_arn: "capo_acm_pca.types.arn.Arn",
    *,
    config_overrides: Optional[ACMPCAClientConfig] = None,
    max_results: Optional["capo_acm_pca.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_acm_pca.types.next_token.NextToken"] = None,
) -> "capo_acm_pca.types.list_certificate_authority_replicas_response.ListCertificateAuthorityReplicasResponse":
    """<p>Lists the replicas of a multi-Region private certificate authority (CA). Call this operation in the Region of the primary CA, and specify the ARN of the primary CA. The response does not include deleted replicas. We recommend using pagination to ensure that the operation returns quickly and successfully. To retrieve additional replicas, use the <code>NextToken</code> value from the response in a subsequent request.</p>

    Args:
        max_results: <p>The maximum number of replicas to return on each page. If more replicas exist, the response includes a <code>NextToken</code> value that you can use in a subsequent request to retrieve them.</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>
        certificate_authority_arn: <p>The Amazon Resource Name (ARN) of the primary CA whose replicas you want to list. This must be of the form:</p> <p> <code>arn:aws:acm-pca:<i>region</i>:<i>account</i>:certificate-authority/<i>a1b2c3d4-5678-90ab-cdef-EXAMPLE11111</i> </code> </p>

    Raises:
        capo_acm_pca.errors.invalid_args_exception.InvalidArgsException: <p>One or more of the specified arguments was not valid.</p>
        capo_acm_pca.errors.invalid_arn_exception.InvalidArnException: <p>The requested Amazon Resource Name (ARN) does not refer to an existing resource.</p>
        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.resource_not_found_exception.ResourceNotFoundException: <p>A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.</p>
        capo_acm_pca.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_acm_pca.types.list_certificate_authority_replicas_request.ListCertificateAuthorityReplicasRequest]",
    ) -> OperationResponse[
        "capo_acm_pca.types.list_certificate_authority_replicas_response.ListCertificateAuthorityReplicasResponse"
    ]:
        if req.options.protocol == "awsJson1_1":
            import capo_acm_pca._operations.acm_private_ca.aws_json1_1.list_certificate_authority_replicas

            output, http_response = (
                capo_acm_pca._operations.acm_private_ca.aws_json1_1.list_certificate_authority_replicas.list_certificate_authority_replicas(
                    req.options, req.input
                )
            )
        elif req.options.protocol == "rpcv2Cbor":
            import capo_acm_pca._operations.acm_private_ca.rpcv2_cbor.list_certificate_authority_replicas

            output, http_response = (
                capo_acm_pca._operations.acm_private_ca.rpcv2_cbor.list_certificate_authority_replicas.list_certificate_authority_replicas(
                    req.options, req.input
                )
            )
        else:
            raise ValueError(f"unknown protocol {req.options.protocol!r}")
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCertificateAuthorityReplicas")
    )
    input_: capo_acm_pca.types.list_certificate_authority_replicas_request.ListCertificateAuthorityReplicasRequest = {
        "certificate_authority_arn": certificate_authority_arn
    }
    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