Use this resource to update the intelligent rebalancing status of an Amazon MSK Provisioned cluster with Express brokers.
Parameters:
-
cluster_arn
(__string)
–
The Amazon Resource Name (ARN) of the cluster.
-
current_version
(Optional[__string], default:
None
)
–
The current version of the cluster.
-
rebalancing
(Optional[Rebalancing], default:
None
)
–
Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.
Raises:
Source code in docs_src/capo_kafka/_services/async_kafka.py
| async def update_rebalancing(
self,
cluster_arn: "capo_kafka.types.__string.__string",
*,
config_overrides: Optional[AsyncKafkaClientConfig] = None,
current_version: Optional["capo_kafka.types.__string.__string"] = None,
rebalancing: Optional["capo_kafka.types.rebalancing.Rebalancing"] = None,
) -> "capo_kafka.types.update_rebalancing_response.UpdateRebalancingResponse":
"""<p>Use this resource to update the intelligent rebalancing status of an Amazon MSK Provisioned cluster with Express brokers.</p>
Args:
cluster_arn: <p>The Amazon Resource Name (ARN) of the cluster.</p>
current_version: <p>The current version of the cluster.</p>
rebalancing: <p>Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.</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.update_rebalancing_request.UpdateRebalancingRequest]",
) -> AsyncOperationResponse[
"capo_kafka.types.update_rebalancing_response.UpdateRebalancingResponse"
]:
import capo_kafka._operations.kafka.update_rebalancing
(
output,
http_response,
) = await capo_kafka._operations.kafka.update_rebalancing.async_update_rebalancing(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateRebalancing")
)
input_: capo_kafka.types.update_rebalancing_request.UpdateRebalancingRequest = {
"cluster_arn": cluster_arn
}
if current_version is not None:
input_["current_version"] = current_version
if rebalancing is not None:
input_["rebalancing"] = rebalancing
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|