Skip to content

update_broker_type

update_broker_type(
    cluster_arn: __string,
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
    current_version: Optional[__string] = None,
    target_instance_type: Optional[__string] = None,
) -> UpdateBrokerTypeResponse

Updates EC2 instance type.

Parameters:

  • cluster_arn (__string) –

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

  • current_version (Optional[__string], default: None ) –

    The cluster version that you want to change. After this operation completes successfully, the cluster will have a new version.

  • target_instance_type (Optional[__string], default: None ) –

    The Amazon MSK broker type that you want all of the brokers in this cluster to be.

Raises:

Source code in docs_src/capo_kafka/_services/kafka.py
def update_broker_type(
    self,
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
    current_version: Optional["capo_kafka.types.__string.__string"] = None,
    target_instance_type: Optional["capo_kafka.types.__string.__string"] = None,
) -> "capo_kafka.types.update_broker_type_response.UpdateBrokerTypeResponse":
    """<p>Updates EC2 instance type.</p>

    Args:
        cluster_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
        current_version: <p>The cluster version that you want to change. After this operation completes successfully, the cluster will have a new version.</p>
        target_instance_type: <p>The Amazon MSK broker type that you want all of the brokers in this cluster to be.</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.
    """

    def _handler(
        req: "OperationRequest[capo_kafka.types.update_broker_type_request.UpdateBrokerTypeRequest]",
    ) -> OperationResponse[
        "capo_kafka.types.update_broker_type_response.UpdateBrokerTypeResponse"
    ]:
        import capo_kafka._operations.kafka.update_broker_type

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateBrokerType")
    )
    input_: capo_kafka.types.update_broker_type_request.UpdateBrokerTypeRequest = {
        "cluster_arn": cluster_arn
    }
    if current_version is not None:
        input_["current_version"] = current_version
    if target_instance_type is not None:
        input_["target_instance_type"] = target_instance_type

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