singlestoredb.management.cluster.Cluster.update

Cluster.update(name: str | None = None, size: str | None = None, scale_factor: float | None = None, auto_suspend: Dict[str, Any] | None = None, auto_scale: Dict[str, Any] | None = None, cache_config: float | None = None, deployment_type: str | None = None, firewall_ranges: List[str] | None = None, allow_all_traffic: bool | None = None, admin_password: str | None = None, expires_at: str | None = None, update_window: Dict[str, int] | None = None, kai: bool | None = None, wait_on_active: bool = False, wait_interval: int = 10, wait_timeout: int = 600) → None

Update the cluster definition.

Both the compute settings (size, auto-suspend, cache) and the deployment-wide settings (firewall, update window, expiration) are changed through this one call.

The API applies the PATCH asynchronously: the cluster cycles back through PENDING and the trailing refresh() still reports the pre-PATCH values. Pass wait_on_active=True to wait the change out so the object reflects it on return.

Parameters:
  • name (str, optional) – Name of the cluster

  • size (str, optional) – Size of the cluster in cluster size notation, such as “S-1”. Resizing is done through this field; there is no resize route. Sent nested in a size object alongside scale_factor.

  • scale_factor (float, optional) – Scale factor for the cluster

  • auto_suspend (Dict[str, Any], optional) – Auto-suspend mode for the cluster: IDLE, SCHEDULED, DISABLED

  • auto_scale (Dict[str, Any], optional) – Auto-scale settings for the cluster

  • cache_config (float, optional) – Multiplier for the persistent cache associated with the cluster. It can have one of the following values: 1, 2, or 4.

  • deployment_type (str, optional) – Deployment type of the cluster (PRODUCTION | NON-PRODUCTION)

  • firewall_ranges (List[str], optional) – List of allowed CIDR ranges. An empty list denies all inbound traffic; omitting it leaves the current ranges alone.

  • allow_all_traffic (bool, optional) – Allow all traffic to the cluster

  • admin_password (str, optional) –

    Admin password for the cluster.

    Warning

    Ignored, exactly as on POST /v2/clusters. PATCH accepts the field and does not honor it: a live probe found the patched value refused with 1045: Access denied while the password the create generated kept working. The only value that authenticates is that generated one, carried on the create response as Cluster.admin_password. Still sent in case the API starts honoring it. See item 9 of docs/management-api-audit.md.

  • expires_at (str, optional) – Timestamp of when the cluster will expire. Expiration time can be specified as a timestamp or a duration. Example: “2021-01-02T15:04:05Z07:00”, “2021-01-02”, “3h30m”

  • update_window (Dict[str, int], optional) – Day and hour of an update window: dict(day=0-6, hour=0-23)

  • kai (bool, optional) – Whether SingleStore Kai is enabled on this cluster

  • wait_on_active (bool, optional) – Wait for the cluster to be ACTIVE again – and, if a firewall was requested, for the new ranges to be reported – before returning. Defaults to False, which returns as soon as the PATCH is accepted and therefore reports pre-PATCH values.

  • wait_interval (int, optional) – Number of seconds between each server check

  • wait_timeout (int, optional) – Maximum number of seconds to wait before raising an exception

Raises:

ManagementError – If wait_on_active is given and the timeout is reached