singlestoredb.management.workspace.Workspace

class singlestoredb.management.workspace.Workspace(name: str, workspace_id: str, workspace_group: Union[str, singlestoredb.management.workspace.WorkspaceGroup], size: str, state: str, created_at: Union[str, datetime.datetime], terminated_at: Optional[Union[datetime.datetime, str]] = None, endpoint: Optional[str] = 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: Union[str, singlestoredb.management.workspace.WorkspaceGroup], size: str, state: str, created_at: Union[str, datetime.datetime], terminated_at: Optional[Union[datetime.datetime, str]] = None, endpoint: Optional[str] = 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.

terminate([wait_on_terminated, ...])

Terminate the workspace.

Attributes

name

Name of the workspace

id

Unique ID of the workspace

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