singlestoredb.management.cluster.ClusterManager.create_cluster¶
- ClusterManager.create_cluster(name: str, region: str | Region | None = None, provider: str | None = None, size: str | None = None, scale_factor: float | None = None, firewall_ranges: List[str] | None = None, allow_all_traffic: bool | None = None, admin_password: str | 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, expires_at: str | None = None, update_window: Dict[str, int] | None = None, kai: bool | None = None, multi_az: bool | None = None, opt_in_preview_feature: bool | None = None, project: str | Project | None = None, wait_on_active: bool = False, wait_interval: int = 10, wait_timeout: int = 600) Cluster¶
Create a new cluster.
A cluster is created in one call: the firewall, update window and expiration settings are passed here alongside the compute settings.
- Parameters:
name (str) – Name of the cluster
region (str or Region, optional) – Region to create the cluster in. A
Regionsupplies both halves of the(provider, region_name)pair that identifies a region; a string is taken as the provider region name, e.g.,us-east-1, and needsprovideralongside it. There are no region IDs.provider (str, optional) – Cloud provider for the cluster (AWS | GCP | Azure). Only needed when
regionis a string; aRegioncarries its own, which this overrides if both are given.size (str, optional) – Cluster size in cluster size notation (S-00, S-1, etc.). Sent nested in a
sizeobject alongsidescale_factor.scale_factor (float, optional) – Scale factor for the cluster
firewall_ranges (List[str], optional) – List of allowed CIDR ranges. An empty list denies all inbound traffic, which is also what is sent when this is not given:
POST /v2/clustersrejects a nullfirewallRangesoutright, so there is no way to leave the choice to the server.allow_all_traffic (bool, optional) – Allow all traffic to the cluster
admin_password (str, optional) –
Admin password for the cluster.
Warning
This is ignored.
POST /v2/clustersgenerates the admin password regardless of what is sent and returns the generated value, so readCluster.admin_passwordoff the returned cluster instead – it is reported there and nowhere else. The field is still sent in case the API starts honoring it.auto_suspend (Dict[str, Any], optional) – Auto-suspend settings for the cluster
auto_scale (Dict[str, Any], optional) – Auto-scale settings for the cluster
cache_config (float, optional) – Multiplier for the persistent cache: 1, 2, or 4
deployment_type (str, optional) – Deployment type of the cluster (PRODUCTION | NON-PRODUCTION)
expires_at (str, optional) – Timestamp of when the cluster will expire
update_window (Dict[str, int], optional) – Day and hour of an update window: dict(day=0-6, hour=0-23)
kai (bool, optional) – Whether to enable SingleStore Kai on this cluster
multi_az (bool, optional) – Whether to deploy across multiple availability zones
opt_in_preview_feature (bool, optional) – Whether to opt in to preview features
project (str or Project, optional) – Project to create the cluster in. A
Projectis reduced to its ID; a string that is not a UUID is looked up as a name. Required by the API; if it is not given it is resolved by_resolve_project_id()from the deployment this code is running in, or from the organization’s only project.wait_on_active (bool, optional) – Wait for the cluster to be usable before returning: first for the state to become ACTIVE, then for the endpoint, then – if a firewall was requested – for the firewall to be applied. The firewall is included because the API applies it asynchronously and outside the state machine, so an ACTIVE cluster with a resolvable endpoint still refuses every inbound connection until the ranges land. See
_wait_on_firewall().wait_interval (int, optional) – Number of seconds between each polling interval
wait_timeout (int, optional) – Maximum number of seconds to wait before raising an exception
- Return type: