singlestoredb.management.cluster.Cluster

class singlestoredb.management.cluster.Cluster(name: str, id: str, state: str, group: str | None = None, size: str | None = None, scale_factor: float | None = None, created_at: str | datetime | None = None, terminated_at: str | datetime | None = None, expires_at: str | datetime | None = None, last_resumed_at: str | datetime | None = None, endpoint: str | None = None, provider: str | None = None, region: str | Region | None = None, project: str | Project | None = None, deployment_type: str | None = None, kai: bool | None = None, multi_az: bool | None = None, allow_all_traffic: bool | None = None, firewall_ranges: List[str] | None = None, outbound_allow_list: str | None = None, opt_in_preview_feature: bool | None = None, update_window: Dict[str, Any] | None = None, auto_suspend: Dict[str, Any] | None = None, auto_scale: Dict[str, Any] | None = None, cache_config: float | None = None, resume_attachments: List[Dict[str, Any]] | None = None, scaling_progress: int | None = None, smart_dr_status: str | None = None)

SingleStoreDB cluster definition.

This object is not instantiated directly. It is used in the results of API calls on the ClusterManager. Clusters are created using ClusterManager.create_cluster(), or existing clusters are accessed by either ClusterManager.clusters or by calling ClusterManager.get_cluster().

A cluster is a single flat resource: the compute settings (size, auto-suspend, cache) and the deployment-wide settings (firewall, update window, expiration) all live on this object.

__init__(name: str, id: str, state: str, group: str | None = None, size: str | None = None, scale_factor: float | None = None, created_at: str | datetime | None = None, terminated_at: str | datetime | None = None, expires_at: str | datetime | None = None, last_resumed_at: str | datetime | None = None, endpoint: str | None = None, provider: str | None = None, region: str | Region | None = None, project: str | Project | None = None, deployment_type: str | None = None, kai: bool | None = None, multi_az: bool | None = None, allow_all_traffic: bool | None = None, firewall_ranges: List[str] | None = None, outbound_allow_list: str | None = None, opt_in_preview_feature: bool | None = None, update_window: Dict[str, Any] | None = None, auto_suspend: Dict[str, Any] | None = None, auto_scale: Dict[str, Any] | None = None, cache_config: float | None = None, resume_attachments: List[Dict[str, Any]] | None = None, scaling_progress: int | None = None, smart_dr_status: str | None = None)

Methods

__init__(name, id, state[, group, size, ...])

connect(**kwargs)

Create a connection to the database server for this cluster.

from_dict(obj, manager)

Construct a Cluster from a dictionary of values.

refresh()

Update the object to the current state.

resume([disable_auto_suspend, ...])

Resume the cluster.

suspend([wait_on_suspended, wait_interval, ...])

Suspend the cluster.

terminate([wait_on_terminated, ...])

Terminate the cluster.

update([name, size, scale_factor, ...])

Update the cluster definition.

Attributes

admin_password

Generated password for the admin database user.

organization

Return the organization the cluster belongs to.

project

Project the cluster belongs to, or None if it reported no project.

region

Region the cluster is deployed in, or None if it reported none.

stage

Stage manager.

stages

Stage manager.

name

Name of the cluster

id

Unique ID of the cluster

group

Unique ID of the group the cluster belongs to.

size

Size of the cluster in cluster size notation (S-00, S-1, etc.)

scale_factor

Current scale factor for the cluster

state

PENDING, ACTIVE, SUSPENDED, TERMINATED, TRANSITIONING, RESUMING, FAILED

created_at

Timestamp of when the cluster was created

terminated_at

Timestamp of when the cluster was terminated

expires_at

Timestamp of when the cluster will expire

last_resumed_at

Timestamp of when the cluster was last resumed

endpoint

Hostname (or IP address) of the cluster database server

provider

Cloud provider hosting the cluster (AWS | GCP | Azure)

deployment_type

Deployment type of the cluster (PRODUCTION | NON-PRODUCTION)

kai

Whether SingleStore Kai is enabled on this cluster

multi_az

Whether the cluster is deployed across multiple availability zones

allow_all_traffic

Should all inbound traffic be allowed?

firewall_ranges

List of allowed incoming IP addresses / ranges

outbound_allow_list

Account ID for outbound connections

opt_in_preview_feature

Whether preview features are opted in

update_window

dict(day=0-6, hour=0-23)

auto_suspend

Current auto-suspend settings

auto_scale

Auto-scale settings for the cluster

cache_config

Multiplier for the persistent cache

resume_attachments

Database attachments

scaling_progress

Current progress percentage for scaling the cluster

smart_dr_status

SmartDR status of the cluster (ACTIVE | STANDBY)