...

Text file src/github.com/twmb/franz-go/generate/definitions/33_alter_configs

Documentation: github.com/twmb/franz-go/generate/definitions

     1// AlterConfigsRequest issues a request to alter either topic or broker
     2// configs.
     3//
     4// Note that to alter configs, you must specify the whole config on every
     5// request. All existing non-static values will be removed. This means that
     6// to add one key/value to a config, you must describe the config and then
     7// issue an alter request with the current config with the new key value.
     8// This also means that dynamic sensitive values, which are not returned
     9// in describe configs, will be lost.
    10//
    11// To fix this problem, the AlterConfigs request / response was deprecated
    12// in Kafka 2.3.0 in favor of the new IncrementalAlterConfigs request / response.
    13// See KIP-339 for more details.
    14AlterConfigsRequest => key 33, max version 2, flexible v2+
    15  // Resources is an array of configs to alter.
    16  Resources: [=>]
    17    // ResourceType is an enum corresponding to the type of config to alter.
    18    // The only two valid values are 2 (for topic) and 4 (for broker).
    19    ResourceType: enum-ConfigResourceType
    20    // ResourceName is the name of config to alter.
    21    //
    22    // If the requested type is a topic, this corresponds to a topic name.
    23    //
    24    // If the requested type if a broker, this should either be empty or be
    25    // the ID of the broker this request is issued to. If it is empty, this
    26    // updates all broker configs. If a specific ID, this updates just the
    27    // broker. Using a specific ID also ensures that brokers reload config
    28    // or secret files even if the file path has not changed. Lastly, password
    29    // config options can only be defined on a per broker basis.
    30    //
    31    // If the type is broker logger, this must be a broker ID.
    32    ResourceName: string
    33    // Configs contains key/value config pairs to set on the resource.
    34    Configs: [=>]
    35      // Name is a key to set (e.g. segment.bytes).
    36      Name: string
    37      // Value is a value to set for the key (e.g. 10).
    38      Value: nullable-string
    39  // ValidateOnly validates the request but does not apply it.
    40  ValidateOnly: bool
    41
    42// AlterConfigsResponse is returned from an AlterConfigsRequest.
    43AlterConfigsResponse =>
    44  ThrottleMillis(1)
    45  // Resources are responses for each resource in the alter request.
    46  Resources: [=>]
    47    // ErrorCode is the error code returned for altering configs.
    48    //
    49    // CLUSTER_AUTHORIZATION_FAILED is returned if asking to alter broker
    50    // configs but the client is not authorized to do so.
    51    //
    52    // TOPIC_AUTHORIZATION_FAILED is returned if asking to alter topic
    53    // configs but the client is not authorized to do so.
    54    //
    55    // INVALID_TOPIC_EXCEPTION is returned if the requested topic was invalid.
    56    //
    57    // UNKNOWN_TOPIC_OR_PARTITION is returned if the broker does not know of
    58    // the requested topic.
    59    //
    60    // INVALID_REQUEST is returned if the requested config is invalid or if
    61    // asking Kafka to alter an invalid resource.
    62    ErrorCode: int16
    63    // ErrorMessage is an informative message if the alter config failed.
    64    ErrorMessage: nullable-string
    65    // ResourceType is the enum corresponding to the type of altered config.
    66    ResourceType: enum-ConfigResourceType
    67    // ResourceName is the name corresponding to the alter config request.
    68    ResourceName: string

View as plain text