Skip to content

update_configuration

update_configuration(
    arn: __string,
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
    description: Optional[__string] = None,
    server_properties: Optional[__blob] = None,
) -> UpdateConfigurationResponse

Updates an MSK configuration.

Parameters:

  • arn (__string) –

    The Amazon Resource Name (ARN) of the configuration.

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

    The description of the configuration revision.

  • server_properties (Optional[__blob], default: None ) –

    Contents of the server.properties file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the AWS Management Console, the SDK, or the AWS CLI, the contents of server.properties can be in plaintext.

Raises:

Source code in docs_src/capo_kafka/_services/kafka.py
def update_configuration(
    self,
    arn: "capo_kafka.types.__string.__string",
    *,
    config_overrides: Optional[KafkaClientConfig] = None,
    description: Optional["capo_kafka.types.__string.__string"] = None,
    server_properties: Optional["capo_kafka.types.__blob.__blob"] = None,
) -> "capo_kafka.types.update_configuration_response.UpdateConfigurationResponse":
    """<p>Updates an MSK configuration.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the configuration.</p>
        description: <p>The description of the configuration revision.</p>
        server_properties: <p>Contents of the <filename>server.properties</filename> file. When using the API, you must ensure that the contents of the file are base64 encoded. When using the AWS Management Console, the SDK, or the AWS CLI, the contents of <filename>server.properties</filename> can be in plaintext.</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.
    """

    def _handler(
        req: "OperationRequest[capo_kafka.types.update_configuration_request.UpdateConfigurationRequest]",
    ) -> OperationResponse[
        "capo_kafka.types.update_configuration_response.UpdateConfigurationResponse"
    ]:
        import capo_kafka._operations.kafka.update_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateConfiguration")
    )
    input_: capo_kafka.types.update_configuration_request.UpdateConfigurationRequest = {
        "arn": arn
    }
    if description is not None:
        input_["description"] = description
    if server_properties is not None:
        input_["server_properties"] = server_properties

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