Managed Service for Apache Kafka® API, REST: Cluster.update
Updates the specified Apache Kafka® cluster.
HTTP request
PATCH https://mdb.api.cloud.yandex.net/managed-kafka/v1/clusters/{clusterId}
Path parameters
Parameter | Description |
---|---|
clusterId | Required. ID of the Apache Kafka® cluster to update. To get the Apache Kafka® cluster ID, make a list request. The maximum string length in characters is 50. |
Body parameters
{
"updateMask": "string",
"description": "string",
"labels": "object",
"configSpec": {
"version": "string",
"kafka": {
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
},
// `configSpec.kafka` includes only one of the fields `kafkaConfig_2_8`, `kafkaConfig_3`
"kafkaConfig_2_8": {
"compressionType": "string",
"logFlushIntervalMessages": "integer",
"logFlushIntervalMs": "integer",
"logFlushSchedulerIntervalMs": "integer",
"logRetentionBytes": "integer",
"logRetentionHours": "integer",
"logRetentionMinutes": "integer",
"logRetentionMs": "integer",
"logSegmentBytes": "integer",
"logPreallocate": true,
"socketSendBufferBytes": "integer",
"socketReceiveBufferBytes": "integer",
"autoCreateTopicsEnable": true,
"numPartitions": "integer",
"defaultReplicationFactor": "integer",
"messageMaxBytes": "integer",
"replicaFetchMaxBytes": "integer",
"sslCipherSuites": [
"string"
],
"offsetsRetentionMinutes": "integer",
"saslEnabledMechanisms": [
"string"
]
},
"kafkaConfig_3": {
"compressionType": "string",
"logFlushIntervalMessages": "integer",
"logFlushIntervalMs": "integer",
"logFlushSchedulerIntervalMs": "integer",
"logRetentionBytes": "integer",
"logRetentionHours": "integer",
"logRetentionMinutes": "integer",
"logRetentionMs": "integer",
"logSegmentBytes": "integer",
"logPreallocate": true,
"socketSendBufferBytes": "integer",
"socketReceiveBufferBytes": "integer",
"autoCreateTopicsEnable": true,
"numPartitions": "integer",
"defaultReplicationFactor": "integer",
"messageMaxBytes": "integer",
"replicaFetchMaxBytes": "integer",
"sslCipherSuites": [
"string"
],
"offsetsRetentionMinutes": "integer",
"saslEnabledMechanisms": [
"string"
]
},
// end of the list of possible fields`configSpec.kafka`
},
"zookeeper": {
"resources": {
"resourcePresetId": "string",
"diskSize": "string",
"diskTypeId": "string"
}
},
"zoneId": [
"string"
],
"brokersCount": "integer",
"assignPublicIp": true,
"unmanagedTopics": true,
"schemaRegistry": true,
"access": {
"dataTransfer": true
},
"restApiConfig": {
"enabled": true
},
"diskSizeAutoscaling": {
"plannedUsageThreshold": "string",
"emergencyUsageThreshold": "string",
"diskSizeLimit": "string"
}
},
"name": "string",
"securityGroupIds": [
"string"
],
"deletionProtection": true,
"maintenanceWindow": {
// `maintenanceWindow` includes only one of the fields `anytime`, `weeklyMaintenanceWindow`
"anytime": {},
"weeklyMaintenanceWindow": {
"day": "string",
"hour": "string"
},
// end of the list of possible fields`maintenanceWindow`
},
"networkId": "string",
"subnetIds": [
"string"
]
}
Field | Description |
---|---|
updateMask | string A comma-separated names off ALL fields to be updated. Only the specified fields will be changed. The others will be left untouched. If the field is specified in If |
description | string New description of the Apache Kafka® cluster. The maximum string length in characters is 256. |
labels | object Custom labels for the Apache Kafka® cluster as For example, "project": "mvp" or "source": "dictionary". The new set of labels will completely replace the old ones. To add a label, request the current set with the get method, then send an update request with the new label added to the set. No more than 64 per resource. The string length in characters for each key must be 1-63. Each key must match the regular expression |
configSpec | object New configuration and resources for hosts in the Apache Kafka® cluster. Use updateMask to prevent reverting all cluster settings that are not listed in configSpec to their default values. |
configSpec. version |
string Version of Apache Kafka® used in the cluster. Possible values: |
configSpec. kafka |
object Configuration and resource allocation for Kafka brokers. |
configSpec. kafka. resources |
object Resources allocated to Kafka brokers. |
configSpec. kafka. resources. resourcePresetId |
string ID of the preset for computational resources available to a host (CPU, memory, etc.). All available presets are listed in the documentation. |
configSpec. kafka. resources. diskSize |
string (int64) Volume of the storage available to a host, in bytes. Must be greater than 2 * partition segment size in bytes * partitions count, so each partition can have one active segment file and one closed segment file that can be deleted. |
configSpec. kafka. resources. diskTypeId |
string Type of the storage environment for the host. |
configSpec. kafka. kafkaConfig_2_8 |
object configSpec.kafka includes only one of the fields kafkaConfig_2_8 , kafkaConfig_3 Kafka version 2.8 broker configuration. |
configSpec. kafka. kafkaConfig_2_8. compressionType |
string Cluster topics compression type.
|
configSpec. kafka. kafkaConfig_2_8. logFlushIntervalMessages |
integer (int64) The number of messages accumulated on a log partition before messages are flushed to disk. This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_2_8. logFlushIntervalMs |
integer (int64) The maximum time (in milliseconds) that a message in any topic is kept in memory before flushed to disk. If not set, the value of This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_2_8. logFlushSchedulerIntervalMs |
integer (int64) The frequency of checks (in milliseconds) for any logs that need to be flushed to disk. This check is done by the log flusher. |
configSpec. kafka. kafkaConfig_2_8. logRetentionBytes |
integer (int64) Partition size limit; Kafka will discard old log segments to free up space if This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_2_8. logRetentionHours |
integer (int64) The number of hours to keep a log segment file before deleting it. |
configSpec. kafka. kafkaConfig_2_8. logRetentionMinutes |
integer (int64) The number of minutes to keep a log segment file before deleting it. If not set, the value of |
configSpec. kafka. kafkaConfig_2_8. logRetentionMs |
integer (int64) The number of milliseconds to keep a log segment file before deleting it. If not set, the value of This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_2_8. logSegmentBytes |
integer (int64) The maximum size of a single log file. This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_2_8. logPreallocate |
boolean (boolean) Should pre allocate file when create new segment? This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_2_8. socketSendBufferBytes |
integer (int64) The SO_SNDBUF buffer of the socket server sockets. If the value is -1, the OS default will be used. |
configSpec. kafka. kafkaConfig_2_8. socketReceiveBufferBytes |
integer (int64) The SO_RCVBUF buffer of the socket server sockets. If the value is -1, the OS default will be used. |
configSpec. kafka. kafkaConfig_2_8. autoCreateTopicsEnable |
boolean (boolean) Enable auto creation of topic on the server |
configSpec. kafka. kafkaConfig_2_8. numPartitions |
integer (int64) Default number of partitions per topic on the whole cluster |
configSpec. kafka. kafkaConfig_2_8. defaultReplicationFactor |
integer (int64) Default replication factor of the topic on the whole cluster |
configSpec. kafka. kafkaConfig_2_8. messageMaxBytes |
integer (int64) The largest record batch size allowed by Kafka. Default value: 1048588. |
configSpec. kafka. kafkaConfig_2_8. replicaFetchMaxBytes |
integer (int64) The number of bytes of messages to attempt to fetch for each partition. Default value: 1048576. |
configSpec. kafka. kafkaConfig_2_8. sslCipherSuites[] |
string A list of cipher suites. |
configSpec. kafka. kafkaConfig_2_8. offsetsRetentionMinutes |
integer (int64) Offset storage time after a consumer group loses all its consumers. Default: 10080. |
configSpec. kafka. kafkaConfig_2_8. saslEnabledMechanisms[] |
string The list of SASL mechanisms enabled in the Kafka server. Default: [SCRAM_SHA_512]. |
configSpec. kafka. kafkaConfig_3 |
object configSpec.kafka includes only one of the fields kafkaConfig_2_8 , kafkaConfig_3 Kafka version 3.x broker configuration. |
configSpec. kafka. kafkaConfig_3. compressionType |
string Cluster topics compression type.
|
configSpec. kafka. kafkaConfig_3. logFlushIntervalMessages |
integer (int64) The number of messages accumulated on a log partition before messages are flushed to disk. This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_3. logFlushIntervalMs |
integer (int64) The maximum time (in milliseconds) that a message in any topic is kept in memory before flushed to disk. If not set, the value of This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_3. logFlushSchedulerIntervalMs |
integer (int64) The frequency of checks (in milliseconds) for any logs that need to be flushed to disk. This check is done by the log flusher. |
configSpec. kafka. kafkaConfig_3. logRetentionBytes |
integer (int64) Partition size limit; Kafka will discard old log segments to free up space if This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_3. logRetentionHours |
integer (int64) The number of hours to keep a log segment file before deleting it. |
configSpec. kafka. kafkaConfig_3. logRetentionMinutes |
integer (int64) The number of minutes to keep a log segment file before deleting it. If not set, the value of |
configSpec. kafka. kafkaConfig_3. logRetentionMs |
integer (int64) The number of milliseconds to keep a log segment file before deleting it. If not set, the value of This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_3. logSegmentBytes |
integer (int64) The maximum size of a single log file. This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_3. logPreallocate |
boolean (boolean) Should pre allocate file when create new segment? This is the global cluster-level setting that can be overridden on a topic level by using the |
configSpec. kafka. kafkaConfig_3. socketSendBufferBytes |
integer (int64) The SO_SNDBUF buffer of the socket server sockets. If the value is -1, the OS default will be used. |
configSpec. kafka. kafkaConfig_3. socketReceiveBufferBytes |
integer (int64) The SO_RCVBUF buffer of the socket server sockets. If the value is -1, the OS default will be used. |
configSpec. kafka. kafkaConfig_3. autoCreateTopicsEnable |
boolean (boolean) Enable auto creation of topic on the server |
configSpec. kafka. kafkaConfig_3. numPartitions |
integer (int64) Default number of partitions per topic on the whole cluster |
configSpec. kafka. kafkaConfig_3. defaultReplicationFactor |
integer (int64) Default replication factor of the topic on the whole cluster |
configSpec. kafka. kafkaConfig_3. messageMaxBytes |
integer (int64) The largest record batch size allowed by Kafka. Default value: 1048588. |
configSpec. kafka. kafkaConfig_3. replicaFetchMaxBytes |
integer (int64) The number of bytes of messages to attempt to fetch for each partition. Default value: 1048576. |
configSpec. kafka. kafkaConfig_3. sslCipherSuites[] |
string A list of cipher suites. |
configSpec. kafka. kafkaConfig_3. offsetsRetentionMinutes |
integer (int64) Offset storage time after a consumer group loses all its consumers. Default: 10080. |
configSpec. kafka. kafkaConfig_3. saslEnabledMechanisms[] |
string The list of SASL mechanisms enabled in the Kafka server. Default: [SCRAM_SHA_512]. |
configSpec. zookeeper |
object Configuration and resource allocation for ZooKeeper hosts. |
configSpec. zookeeper. resources |
object Resources allocated to ZooKeeper hosts. |
configSpec. zookeeper. resources. resourcePresetId |
string ID of the preset for computational resources available to a host (CPU, memory, etc.). All available presets are listed in the documentation. |
configSpec. zookeeper. resources. diskSize |
string (int64) Volume of the storage available to a host, in bytes. Must be greater than 2 * partition segment size in bytes * partitions count, so each partition can have one active segment file and one closed segment file that can be deleted. |
configSpec. zookeeper. resources. diskTypeId |
string Type of the storage environment for the host. |
configSpec. zoneId[] |
string IDs of availability zones where Kafka brokers reside. |
configSpec. brokersCount |
integer (int64) The number of Kafka brokers deployed in each availability zone. |
configSpec. assignPublicIp |
boolean (boolean) The flag that defines whether a public IP address is assigned to the cluster. If the value is |
configSpec. unmanagedTopics |
boolean (boolean) Allows to manage topics via AdminAPI Deprecated. Feature enabled permanently. |
configSpec. schemaRegistry |
boolean (boolean) Enables managed schema registry on cluster |
configSpec. access |
object Access policy for external services. |
configSpec. access. dataTransfer |
boolean (boolean) Allow access for DataTransfer. |
configSpec. restApiConfig |
object Configuration of REST API. |
configSpec. restApiConfig. enabled |
boolean (boolean) Is REST API enabled for this cluster. |
configSpec. diskSizeAutoscaling |
object DiskSizeAutoscaling settings |
configSpec. diskSizeAutoscaling. plannedUsageThreshold |
string (int64) Threshold of storage usage (in percent) that triggers automatic scaling of the storage during the maintenance window. Zero value means disabled threshold. Acceptable values are 0 to 100, inclusive. |
configSpec. diskSizeAutoscaling. emergencyUsageThreshold |
string (int64) Threshold of storage usage (in percent) that triggers immediate automatic scaling of the storage. Zero value means disabled threshold. Acceptable values are 0 to 100, inclusive. |
configSpec. diskSizeAutoscaling. diskSizeLimit |
string (int64) New storage size (in bytes) that is set when one of the thresholds is achieved. |
name | string New name for the Apache Kafka® cluster. The maximum string length in characters is 63. Value must match the regular expression |
securityGroupIds[] | string User security groups |
deletionProtection | boolean (boolean) Deletion Protection inhibits deletion of the cluster |
maintenanceWindow | object New maintenance window settings for the cluster. |
maintenanceWindow. anytime |
object maintenanceWindow includes only one of the fields anytime , weeklyMaintenanceWindow |
maintenanceWindow. weeklyMaintenanceWindow |
object maintenanceWindow includes only one of the fields anytime , weeklyMaintenanceWindow |
maintenanceWindow. weeklyMaintenanceWindow. day |
string |
maintenanceWindow. weeklyMaintenanceWindow. hour |
string (int64) Hour of the day in UTC. Acceptable values are 1 to 24, inclusive. |
networkId | string ID of the network to move the cluster to. The maximum string length in characters is 50. |
subnetIds[] | string IDs of subnets where the hosts are located or a new host is being created |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": true,
"metadata": "object",
// includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object",
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
createdBy | string ID of the user or service account who initiated the operation. |
modifiedAt | string (date-time) The time when the Operation resource was last modified. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
done | boolean (boolean) If the value is |
metadata | object Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
error | object The error result of the operation in case of failure or cancellation. includes only one of the fields error , response |
error. code |
integer (int32) Error code. An enum value of google.rpc.Code. |
error. message |
string An error message. |
error. details[] |
object A list of messages that carry the error details. |
response | object includes only one of the fields error , response The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any. |