Skip to content

get_bootstrap_brokers

get_bootstrap_brokers(
    cluster_arn: __string, *, config_overrides: Optional[KafkaClientConfig] = None
) -> GetBootstrapBrokersResponse

A list of brokers that a client application can use to bootstrap. This list doesn't necessarily include all of the brokers in the cluster. The following Python 3.6 example shows how you can use the Amazon Resource Name (ARN) of a cluster to get its bootstrap brokers. If you don't know the ARN of your cluster, you can use the ListClusters operation to get the ARNs of all the clusters in this account and Region.

Parameters:

  • cluster_arn (__string) –

    The Amazon Resource Name (ARN) that uniquely identifies the cluster.

Raises:

Source code in docs_src/capo_kafka/_services/kafka.py
def get_bootstrap_brokers(
    self,
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
) -> "capo_kafka.types.get_bootstrap_brokers_response.GetBootstrapBrokersResponse":
    """<p>A list of brokers that a client application can use to bootstrap. This list doesn't necessarily include all of the brokers in the cluster. The following Python 3.6 example shows how you can use the Amazon Resource Name (ARN) of a cluster to get its bootstrap brokers. If you don't know the ARN of your cluster, you can use the <code>ListClusters</code> operation to get the ARNs of all the clusters in this account and Region.</p>

    Args:
        cluster_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>

    Raises:
        capo_kafka.errors.bad_request_exception.BadRequestException: <p>Returns information about an error.</p>
        capo_kafka.errors.conflict_exception.ConflictException: <p>Returns information about an error.</p>
        capo_kafka.errors.forbidden_exception.ForbiddenException: <p>Returns information about an error.</p>
        capo_kafka.errors.internal_server_error_exception.InternalServerErrorException: <p>Returns information about an error.</p>
        capo_kafka.errors.unauthorized_exception.UnauthorizedException: <p>Returns information about an error.</p>
        capo_kafka.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_kafka.types.get_bootstrap_brokers_request.GetBootstrapBrokersRequest]",
    ) -> OperationResponse[
        "capo_kafka.types.get_bootstrap_brokers_response.GetBootstrapBrokersResponse"
    ]:
        import capo_kafka._operations.kafka.get_bootstrap_brokers

        output, http_response = (
            capo_kafka._operations.kafka.get_bootstrap_brokers.get_bootstrap_brokers(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetBootstrapBrokers")
    )
    input_: capo_kafka.types.get_bootstrap_brokers_request.GetBootstrapBrokersRequest = {
        "cluster_arn": cluster_arn
    }

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