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: str | datetime | 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: str | datetime | 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 usingWorkspaceManager.create_workspace(), or existing workspaces are accessed by eitherWorkspaceManager.workspacesor by callingWorkspaceManager.get_workspace().See also
WorkspaceManager.create_workspace(),WorkspaceManager.get_workspace(),WorkspaceManager.workspaces- __init__(name: str, workspace_id: str, workspace_group: str | WorkspaceGroup, size: str, state: str, created_at: str | datetime, terminated_at: str | datetime | 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: str | datetime | 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
nameName of the workspace
idUnique ID of the workspace
group_idsizeSize of the workspace in workspace size notation (S-00, S-1, etc.)
statePendingCreation, Transitioning, Active, Terminated, Suspended, Resuming, Failed
created_atTimestamp of when the workspace was created
terminated_atTimestamp of when the workspace was terminated
endpointHostname (or IP address) of the workspace database server
auto_suspendCurrent auto-suspend settings
cache_configMultiplier for the persistent cache
deployment_typeDeployment type of the workspace
resume_attachmentsDatabase attachments
scaling_progressCurrent progress percentage for scaling the workspace
last_resumed_atTimestamp when workspace was last resumed