class_docstr: A local client for submitting and interacting with jobs on a remote cluster.
  
  Submits requests over HTTP to the job server on the cluster using the REST API.
  
  
  Args:
      address: Either (1) the address of the Ray cluster, or (2) the HTTP address
          of the dashboard server on the head node, e.g. "http://<head-node-ip>:8265".
          In case (1) it must be specified as an address that can be passed to
          ray.init(), e.g. a Ray Client address (ray://<head_node_host>:10001),
          or "auto", or "localhost:<port>". If unspecified, will try to connect to
          a running local Ray cluster. This argument is always overridden by the
          RAY_ADDRESS environment variable.
      create_cluster_if_needed: Indicates whether the cluster at the specified
          address needs to already be running. Ray doesn't start a cluster
          before interacting with jobs, but third-party job managers may do so.
      cookies: Cookies to use when sending requests to the HTTP job server.
      metadata: Arbitrary metadata to store along with all jobs.  New metadata
          specified per job will be merged with the global metadata provided here
          via a simple dict update.
      headers: Headers to use when sending requests to the HTTP job server, used
          for cases like authentication to a remote cluster.
      verify: Boolean indication to verify the server's TLS certificate or a path to
          a file or directory of trusted certificates. Default: True.
class_docstr_tok: ["A","local","client","for","submitting","and","interacting","with","jobs","on","a","remote","cluster",".","Submits","requests","over","HTTP","to","the","job","server","on","the","cluster","using","the","REST","API",".","Args",":","address",":","Either","(","1",")","the","address","of","the","Ray","cluster",",","or","(","2",")","the","HTTP","address","of","the","dashboard","server","on","the","head","node",",","e.g",".","``","http",":","\/\/","<","head-node-ip",">",":8265","''",".","In","case","(","1",")","it","must","be","specified","as","an","address","that","can","be","passed","to","ray.init","(",")",",","e.g",".","a","Ray","Client","address","(","ray",":","\/\/","<","head_node_host",">",":10001",")",",","or","``","auto","''",",","or","``","localhost",":","<","port",">","''",".","If","unspecified",",","will","try","to","connect","to","a","running","local","Ray","cluster",".","This","argument","is","always","overridden","by","the","RAY_ADDRESS","environment","variable",".","create_cluster_if_needed",":","Indicates","whether","the","cluster","at","the","specified","address","needs","to","already","be","running",".","Ray","does","n't","start","a","cluster","before","interacting","with","jobs",",","but","third-party","job","managers","may","do","so",".","cookies",":","Cookies","to","use","when","sending","requests","to","the","HTTP","job","server",".","metadata",":","Arbitrary","metadata","to","store","along","with","all","jobs",".","New","metadata","specified","per","job","will","be","merged","with","the","global","metadata","provided","here","via","a","simple","dict","update",".","headers",":","Headers","to","use","when","sending","requests","to","the","HTTP","job","server",",","used","for","cases","like","authentication","to","a","remote","cluster",".","verify",":","Boolean","indication","to","verify","the","server","'s","TLS","certificate","or","a","path","to","a","file","or","directory","of","trusted","certificates",".","Default",":","True","."]
docstr: List all jobs along with their status and other information.
  
  Lists all jobs that have ever run on the cluster, including jobs that are
  currently running and jobs that are no longer running.
  
  Example:
      >>> from ray.job_submission import JobSubmissionClient
      >>> client = JobSubmissionClient("http://127.0.0.1:8265") # doctest: +SKIP
      >>> client.submit_job(entrypoint="echo hello") # doctest: +SKIP
      >>> client.submit_job(entrypoint="sleep 2") # doctest: +SKIP
      >>> client.list_jobs() # doctest: +SKIP
      [JobDetails(status='SUCCEEDED',
      job_id='03000000', type='submission',
      submission_id='raysubmit_4LamXRuQpYdSMg7J',
      message='Job finished successfully.', error_type=None,
      start_time=1647388711, end_time=1647388712, metadata={}, runtime_env={}),
      JobDetails(status='RUNNING',
      job_id='04000000', type='submission',
      submission_id='raysubmit_1dxCeNvG1fCMVNHG',
      message='Job is currently running.', error_type=None,
      start_time=1647454832, end_time=None, metadata={}, runtime_env={})]
  
  Returns:
      A dictionary mapping job_ids to their information.
  
  Raises:
      RuntimeError: If the request to the job server fails.
docstr_tok: ["List","all","jobs","along","with","their","status","and","other","information",".","Lists","all","jobs","that","have","ever","run","on","the","cluster",",","including","jobs","that","are","currently","running","and","jobs","that","are","no","longer","running",".","Example",":",">",">",">","from","ray.job_submission","import","JobSubmissionClient",">",">",">","client","=","JobSubmissionClient","(","``","http",":","\/\/127.0.0.1:8265","''",")","#","doctest",":","+SKIP",">",">",">","client.submit_job","(","entrypoint=","''","echo","hello","''",")","#","doctest",":","+SKIP",">",">",">","client.submit_job","(","entrypoint=","''","sleep","2","''",")","#","doctest",":","+SKIP",">",">",">","client.list_jobs","(",")","#","doctest",":","+SKIP","[","JobDetails","(","status='SUCCEEDED","'",",","job_id='03000000","'",",","type='submission","'",",","submission_id='raysubmit_4LamXRuQpYdSMg7J","'",",","message='Job","finished","successfully",".","'",",","error_type=None",",","start_time=1647388711",",","end_time=1647388712",",","metadata=","{","}",",","runtime_env=","{","}",")",",","JobDetails","(","status='RUNNING","'",",","job_id='04000000","'",",","type='submission","'",",","submission_id='raysubmit_1dxCeNvG1fCMVNHG","'",",","message='Job","is","currently","running",".","'",",","error_type=None",",","start_time=1647454832",",","end_time=None",",","metadata=","{","}",",","runtime_env=","{","}",")","]","Returns",":","A","dictionary","mapping","job_ids","to","their","information",".","Raises",":","RuntimeError",":","If","the","request","to","the","job","server","fails","."]
code: def list_jobs(self) -> List[JobDetails]:
      """List all jobs along with their status and other information.
  
      Lists all jobs that have ever run on the cluster, including jobs that are
      currently running and jobs that are no longer running.
  
      Example:
          >>> from ray.job_submission import JobSubmissionClient
          >>> client = JobSubmissionClient("http://127.0.0.1:8265") # doctest: +SKIP
          >>> client.submit_job(entrypoint="echo hello") # doctest: +SKIP
          >>> client.submit_job(entrypoint="sleep 2") # doctest: +SKIP
          >>> client.list_jobs() # doctest: +SKIP
          [JobDetails(status='SUCCEEDED',
          job_id='03000000', type='submission',
          submission_id='raysubmit_4LamXRuQpYdSMg7J',
          message='Job finished successfully.', error_type=None,
          start_time=1647388711, end_time=1647388712, metadata={}, runtime_env={}),
          JobDetails(status='RUNNING',
          job_id='04000000', type='submission',
          submission_id='raysubmit_1dxCeNvG1fCMVNHG',
          message='Job is currently running.', error_type=None,
          start_time=1647454832, end_time=None, metadata={}, runtime_env={})]
  
      Returns:
          A dictionary mapping job_ids to their information.
  
      Raises:
          RuntimeError: If the request to the job server fails.
      """
      r = self._do_request("GET", "/api/jobs/")
  
      if r.status_code == 200:
          jobs_info_json = r.json()
          jobs_info = [
              JobDetails(**job_info_json)
              for job_info_json in jobs_info_json
          ]
          return jobs_info
      else:
          self._raise_error(r)
  
imports: import dataclasses
  import logging
  from typing import Any, Dict, Iterator, List, Optional, Union
  import ray
  import packaging.version
  from ray.dashboard.utils import get_address_for_submission_client
  from ray.dashboard.modules.job.utils import strip_keys_with_value_none
  from ray.dashboard.modules.job.pydantic_models import JobDetails
  from ray.dashboard.modules.job.common import JobDeleteResponse, JobStatus, JobSubmitRequest, JobSubmitResponse, JobStopResponse, JobLogsResponse
  from ray.dashboard.modules.dashboard_sdk import SubmissionClient
  from ray.runtime_env import RuntimeEnv
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 6 for calling the JobSubmissionClient obj's underlying member method code with example usage: obj.list_jobs() and returns: jobs_info