singlestoredb.management.workspace.Workspace

class singlestoredb.management.workspace.Workspace(name: str, workspace_id: str, workspace_group: str | WorkspaceGroup, size: str, state: str, created_at: str | datetime, terminated_at: datetime | str | None = None, endpoint: str | None = None, auto_suspend: Dict[str, Any] | None = None, cache_config: int | None = None, deployment_type: str | None = None, resume_attachments: List[Dict[str, Any]] | None = None, scaling_progress: int | None = None, last_resumed_at: datetime | str | None = None)

SingleStoreDB workspace definition.

This object is not instantiated directly. It is used in the results of API calls on the WorkspaceManager. Workspaces are created using WorkspaceManager.create_workspace(), or existing workspaces are accessed by either WorkspaceManager.workspaces or by calling WorkspaceManager.get_workspace().

__init__(name: str, workspace_id: str, workspace_group: str | WorkspaceGroup, size: str, state: str, created_at: str | datetime, terminated_at: datetime | str | None = None, endpoint: str | None = None, auto_suspend: Dict[str, Any] | None = None, cache_config: int | None = None, deployment_type: str | None = None, resume_attachments: List[Dict[str, Any]] | None = None, scaling_progress: int | None = None, last_resumed_at: datetime | str | None = None)

Methods

__init__(name, workspace_id, ...[, ...])

connect(**kwargs)

Create a connection to the database server for this workspace.

from_dict(obj, manager)

Construct a Workspace from a dictionary of values.

refresh()

Update the object to the current state.

resume([disable_auto_suspend, ...])

Resume the workspace.

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

Suspend the workspace.

terminate([wait_on_terminated, ...])

Terminate the workspace.

update([auto_suspend, cache_config, ...])

Update the workspace definition.

Attributes

name

Name of the workspace

id

Unique ID of the workspace

group_id

size

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

state

PendingCreation, Transitioning, Active, Terminated, Suspended, Resuming, Failed

created_at

Timestamp of when the workspace was created

terminated_at

Timestamp of when the workspace was terminated

endpoint

Hostname (or IP address) of the workspace database server

auto_suspend

Current auto-suspend settings

cache_config

Multiplier for the persistent cache

deployment_type

Deployment type of the workspace

resume_attachments

Database attachments

scaling_progress

Current progress percentage for scaling the workspace

last_resumed_at

Timestamp when workspace was last resumed