Skip to content

reboot_broker async

reboot_broker(
    cluster_arn: __string,
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    broker_ids: Optional[__listOf__string] = None,
) -> RebootBrokerResponse

Reboots brokers.

Parameters:

  • broker_ids (Optional[__listOf__string], default: None ) –

    The list of broker IDs to be rebooted. The reboot-broker operation supports rebooting one broker at a time.

  • cluster_arn (__string) –

    The Amazon Resource Name (ARN) of the cluster to be updated.

Raises:

Source code in docs_src/capo_kafka/_services/async_kafka.py
async def reboot_broker(
    self,
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    broker_ids: Optional[
        "capo_kafka.types.__list_of__string.__listOf__string"
    ] = None,
) -> "capo_kafka.types.reboot_broker_response.RebootBrokerResponse":
    """Reboots brokers.

    Args:
        broker_ids: <p>The list of broker IDs to be rebooted. The reboot-broker operation supports rebooting one broker at a time.</p>
        cluster_arn: <p>The Amazon Resource Name (ARN) of the cluster to be updated.</p>

    Raises:
        capo_kafka.errors.bad_request_exception.BadRequestException: <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.not_found_exception.NotFoundException: <p>Returns information about an error.</p>
        capo_kafka.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returns information about an error.</p>
        capo_kafka.errors.too_many_requests_exception.TooManyRequestsException: <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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kafka.types.reboot_broker_request.RebootBrokerRequest]",
    ) -> AsyncOperationResponse[
        "capo_kafka.types.reboot_broker_response.RebootBrokerResponse"
    ]:
        import capo_kafka._operations.kafka.reboot_broker

        (
            output,
            http_response,
        ) = await capo_kafka._operations.kafka.reboot_broker.async_reboot_broker(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RebootBroker")
    )
    input_: capo_kafka.types.reboot_broker_request.RebootBrokerRequest = {
        "cluster_arn": cluster_arn
    }
    if broker_ids is not None:
        input_["broker_ids"] = broker_ids

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