Skip to content

update_cluster_configuration async

update_cluster_configuration(
    cluster_arn: __string,
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    configuration_info: Optional[ConfigurationInfo] = None,
    current_version: Optional[__string] = None,
) -> UpdateClusterConfigurationResponse

Updates the cluster with the configuration that is specified in the request body.

Parameters:

  • cluster_arn (__string) –

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

  • configuration_info (Optional[ConfigurationInfo], default: None ) –

    Represents the configuration that you want MSK to use for the brokers in a cluster.

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

    The version of the cluster that needs to be updated.

Raises:

Source code in docs_src/capo_kafka/_services/async_kafka.py
async def update_cluster_configuration(
    self,
    cluster_arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[AsyncKafkaClientConfig] = None,
    configuration_info: Optional[
        "capo_kafka.types.configuration_info.ConfigurationInfo"
    ] = None,
    current_version: Optional["capo_kafka.types.__string.__string"] = None,
) -> "capo_kafka.types.update_cluster_configuration_response.UpdateClusterConfigurationResponse":
    """<p>Updates the cluster with the configuration that is specified in the request body.</p>

    Args:
        cluster_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
        configuration_info: <p>Represents the configuration that you want MSK to use for the brokers in a cluster.</p>
        current_version: <p>The version of the cluster that needs 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.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_cluster_configuration_request.UpdateClusterConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_kafka.types.update_cluster_configuration_response.UpdateClusterConfigurationResponse"
    ]:
        import capo_kafka._operations.kafka.update_cluster_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateClusterConfiguration")
    )
    input_: capo_kafka.types.update_cluster_configuration_request.UpdateClusterConfigurationRequest = {
        "cluster_arn": cluster_arn
    }
    if configuration_info is not None:
        input_["configuration_info"] = configuration_info
    if current_version is not None:
        input_["current_version"] = current_version

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