class_docstr: A class representing a Workspace object.
  
  Attributes:
      id: (int) The ID of the workspace.
      name: (Mutable, str) The name of the workspace.
docstr: Create a Workspace object.
  
  Arguments:
      session: The session to use for API calls.
      workspace_id: (Optional) ID of the workspace. If None or not passed, the workspace ID
          will be looked up here at initialization.
      workspace_name: (Optional) Name of the workspace.
  
  Note: Only one of workspace_id or workspace_name should be passed.
docstr_tok: ["Create","a","Workspace","object",".","Arguments",":","session",":","The","session","to","use","for","API","calls",".","workspace_id",":","(","Optional",")","ID","of","the","workspace",".","If","None","or","not","passed",",","the","workspace","ID","will","be","looked","up","here","at","initialization",".","workspace_name",":","(","Optional",")","Name","of","the","workspace",".","Note",":","Only","one","of","workspace_id","or","workspace_name","should","be","passed","."]
code: def __init__(
      self,
      session: api.Session,
      workspace_id: Optional[int] = None,
      workspace_name: Optional[str] = None,
  ):
      """Create a Workspace object.
  
      Arguments:
          session: The session to use for API calls.
          workspace_id: (Optional) ID of the workspace. If None or not passed, the workspace ID
              will be looked up here at initialization.
          workspace_name: (Optional) Name of the workspace.
  
      Note: Only one of workspace_id or workspace_name should be passed.
      """
      if (workspace_id is None) == (workspace_name is None):
          raise ValueError(
              "Workspace must be constructed with either a name or id (not both)."
          )
  
      if workspace_id is None:
          assert workspace_name is not None
          self.id = _get_workspace_id_from_name(session, workspace_name)
      else:
          self.id = workspace_id
      self.name = workspace_name
      self._session = session
  
file_path: determined/harness/determined/common/experimental/workspace.py
imports: import itertools
  from typing import Iterable, List, Optional
  from determined.common import api
  from determined.common.api import bindings, errors
  from determined.common.experimental import project, resource_pool
label_desc: Use image node_id 1 to create a new Workspace object  with example: obj = Workspace(session, workspace_id, workspace_name)