Updates the number of broker nodes in the cluster.
Parameters:
-
cluster_arn
(__string)
–
The Amazon Resource Name (ARN) that uniquely identifies the cluster.
-
current_version
(Optional[__string], default:
None
)
–
The version of cluster to update from. A successful operation will then generate a new version.
-
target_number_of_broker_nodes
(Optional[__integerMin1Max15], default:
None
)
–
The number of broker nodes that you want the cluster to have after this operation completes successfully.
Raises:
Source code in docs_src/capo_kafka/_services/async_kafka.py
| async def update_broker_count(
self,
cluster_arn: "capo_kafka.types.__string.__string",
*,
config_overrides: Optional[AsyncKafkaClientConfig] = None,
current_version: Optional["capo_kafka.types.__string.__string"] = None,
target_number_of_broker_nodes: Optional[
"capo_kafka.types.__integer_min1_max15.__integerMin1Max15"
] = None,
) -> "capo_kafka.types.update_broker_count_response.UpdateBrokerCountResponse":
"""<p>Updates the number of broker nodes in the cluster.</p>
Args:
cluster_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
current_version: <p>The version of cluster to update from. A successful operation will then generate a new version.</p>
target_number_of_broker_nodes: <p>The number of broker nodes that you want the cluster to have after this operation completes successfully.</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.service_unavailable_exception.ServiceUnavailableException: <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.update_broker_count_request.UpdateBrokerCountRequest]",
) -> AsyncOperationResponse[
"capo_kafka.types.update_broker_count_response.UpdateBrokerCountResponse"
]:
import capo_kafka._operations.kafka.update_broker_count
(
output,
http_response,
) = await capo_kafka._operations.kafka.update_broker_count.async_update_broker_count(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateBrokerCount")
)
input_: capo_kafka.types.update_broker_count_request.UpdateBrokerCountRequest = {
"cluster_arn": cluster_arn
}
if current_version is not None:
input_["current_version"] = current_version
if target_number_of_broker_nodes is not None:
input_["target_number_of_broker_nodes"] = target_number_of_broker_nodes
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|