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 usingClusterManager.create_cluster(), or existing clusters are accessed by eitherClusterManager.clustersor by callingClusterManager.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
Generated password for the
admindatabase user.Return the organization the cluster belongs to.
projectProject the cluster belongs to, or
Noneif it reported no project.regionRegion the cluster is deployed in, or
Noneif it reported none.Stage manager.
stagesStage manager.
nameName of the cluster
idUnique ID of the cluster
groupUnique ID of the group the cluster belongs to.
sizeSize of the cluster in cluster size notation (S-00, S-1, etc.)
scale_factorCurrent scale factor for the cluster
statePENDING, ACTIVE, SUSPENDED, TERMINATED, TRANSITIONING, RESUMING, FAILED
created_atTimestamp of when the cluster was created
terminated_atTimestamp of when the cluster was terminated
expires_atTimestamp of when the cluster will expire
last_resumed_atTimestamp of when the cluster was last resumed
endpointHostname (or IP address) of the cluster database server
providerCloud provider hosting the cluster (AWS | GCP | Azure)
deployment_typeDeployment type of the cluster (PRODUCTION | NON-PRODUCTION)
kaiWhether SingleStore Kai is enabled on this cluster
multi_azWhether the cluster is deployed across multiple availability zones
allow_all_trafficShould all inbound traffic be allowed?
firewall_rangesList of allowed incoming IP addresses / ranges
outbound_allow_listAccount ID for outbound connections
opt_in_preview_featureWhether preview features are opted in
update_windowdict(day=0-6, hour=0-23)
auto_suspendCurrent auto-suspend settings
auto_scaleAuto-scale settings for the cluster
cache_configMultiplier for the persistent cache
resume_attachmentsDatabase attachments
scaling_progressCurrent progress percentage for scaling the cluster
smart_dr_statusSmartDR status of the cluster (ACTIVE | STANDBY)