Skip to main content
PATCH
Update service auto scaling settings
Updates minimum and maximum memory limits per replica and idle mode scaling behavior for the service. Supports both vertical autoscaling (fixed replica count, variable memory) and horizontal autoscaling (variable replica count, fixed memory). The memory settings are available only for “production” services and must be a multiple of 4 starting from 8GB. For vertical autoscaling, please contact support to enable adjustment of numReplicas. For horizontal autoscaling (autoscalingMode “horizontal” with minReplicas/maxReplicas), contact support to enable the feature for your organization.

Autorizações

Authorization
string
header
obrigatório

Use key ID and key secret obtained in ClickHouse Cloud console: https://clickhouse.com/docs/cloud/manage/openapi

Parâmetros de caminho

organizationId
string<uuid>
obrigatório

ID of the organization that owns the service.

serviceId
string<uuid>
obrigatório

ID of the service to update scaling parameters.

Corpo

application/json
minReplicaMemoryGb
number

Minimum auto-scaling memory in Gb for a single replica. Available only for 'production' services. Must be a multiple of 4 and greater than or equal to 8. A range in vertical autoscaling; equal to maxReplicaMemoryGb in horizontal.

Intervalo obrigatório: 8 <= x <= 356Deve ser um múltiplo de 4
Exemplo:

16

maxReplicaMemoryGb
number

Maximum auto-scaling memory in Gb for a single replica. Available only for 'production' services. Must be a multiple of 4 and lower than or equal to 120 for non paid services or 356 for paid services. A range in vertical autoscaling; equal to minReplicaMemoryGb in horizontal.

Intervalo obrigatório: 8 <= x <= 356Deve ser um múltiplo de 4
Exemplo:

120

autoscalingMode
enum<string>

Target autoscaling mode. Omit to keep the service on its current mode. "vertical" runs a fixed replica count while memory scales between minReplicaMemoryGb and maxReplicaMemoryGb; "horizontal" scales the replica count between minReplicas and maxReplicas at a fixed per-replica memory (minReplicaMemoryGb equal to maxReplicaMemoryGb). Switching to horizontal requires the feature to be enabled for the organization.

Opções disponíveis:
vertical,
horizontal
Exemplo:

"vertical"

numReplicas
integer

Fixed replica count for vertical autoscaling (autoscalingMode "vertical"). Mutually exclusive with minReplicas/maxReplicas. When switching to vertical (autoscalingMode "vertical") with numReplicas and no memory, the service's stored baseline per-replica memory is kept as the new vertical range. Please contact support to enable adjustment of numReplicas.

Intervalo obrigatório: 1 <= x <= 20
Exemplo:

3

minReplicas
integer

Minimum number of replicas. A minReplicas/maxReplicas band scales the replica count in horizontal autoscaling (autoscalingMode "horizontal"). Must be provided together with maxReplicas. Mutually exclusive with numReplicas. Requires horizontal autoscaling to be enabled for the service, unless autoscalingMode is omitted or "vertical" and minReplicas equals maxReplicas (an equal band is then an accepted vertical fixed count and needs no horizontal entitlement).

Intervalo obrigatório: 1 <= x <= 20
Exemplo:

1

maxReplicas
integer

Maximum number of replicas. A minReplicas/maxReplicas band scales the replica count in horizontal autoscaling (autoscalingMode "horizontal"). Must be provided together with minReplicas. Mutually exclusive with numReplicas. Requires horizontal autoscaling to be enabled for the service, unless autoscalingMode is omitted or "vertical" and minReplicas equals maxReplicas (an equal band is then an accepted vertical fixed count and needs no horizontal entitlement).

Intervalo obrigatório: 1 <= x <= 20
Exemplo:

5

idleScaling
boolean

When set to true the service is allowed to scale down to zero when idle. True by default.

idleTimeoutMinutes
number

Set minimum idling timeout (in minutes). Must be >= 5 minutes.

Resposta

Successful response

status
number

HTTP status code.

Exemplo:

200

requestId
string<uuid>

Unique id assigned to every request. UUIDv4

result
object
Última modificação em 24 de julho de 2026