class_docstr: State API Client issues REST GET requests to the server for resource states.
class_docstr_tok: ["State","API","Client","issues","REST","GET","requests","to","the","server","for","resource","states","."]
docstr: List resources states
  
  Args:
      resource: Resource names, i.e. 'jobs', 'actors', 'nodes',
          see `StateResource` for details.
      options: List options. See `ListApiOptions` for details.
      raise_on_missing_output: When True, raise an exception if the output
          is incomplete. Output can be incomplete if
          (1) there's a partial network failure when the source is distributed.
          (2) data is truncated because it is too large.
          Set it to False to avoid throwing an exception on missing data.
      _explain: Print the API information such as API
          latency or failed query information.
  
  Returns:
      A list of queried result from `ListApiResponse`,
  
  Raises:
      This doesn't catch any exceptions raised when the underlying request
      call raises exceptions. For example, it could raise `requests.Timeout`
      when timeout occurs.
docstr_tok: ["List","resources","states","Args",":","resource",":","Resource","names",",","i.e",".","'jobs","'",",","'actors","'",",","'nodes","'",",","see","`","StateResource","`","for","details",".","options",":","List","options",".","See","`","ListApiOptions","`","for","details",".","raise_on_missing_output",":","When","True",",","raise","an","exception","if","the","output","is","incomplete",".","Output","can","be","incomplete","if","(","1",")","there","'s","a","partial","network","failure","when","the","source","is","distributed",".","(","2",")","data","is","truncated","because","it","is","too","large",".","Set","it","to","False","to","avoid","throwing","an","exception","on","missing","data",".","_explain",":","Print","the","API","information","such","as","API","latency","or","failed","query","information",".","Returns",":","A","list","of","queried","result","from","`","ListApiResponse","`",",","Raises",":","This","does","n't","catch","any","exceptions","raised","when","the","underlying","request","call","raises","exceptions",".","For","example",",","it","could","raise","`","requests.Timeout","`","when","timeout","occurs","."]
code: def list(
      self,
      resource: StateResource,
      options: ListApiOptions,
      raise_on_missing_output: bool,
      _explain: bool = False,
  ) -> List[
      Union[
          ActorState,
          JobState,
          NodeState,
          TaskState,
          ObjectState,
          PlacementGroupState,
          RuntimeEnvState,
          WorkerState,
          ClusterEventState,
      ]
  ]:
      """List resources states
  
      Args:
          resource: Resource names, i.e. 'jobs', 'actors', 'nodes',
              see `StateResource` for details.
          options: List options. See `ListApiOptions` for details.
          raise_on_missing_output: When True, raise an exception if the output
              is incomplete. Output can be incomplete if
              (1) there's a partial network failure when the source is distributed.
              (2) data is truncated because it is too large.
              Set it to False to avoid throwing an exception on missing data.
          _explain: Print the API information such as API
              latency or failed query information.
  
      Returns:
          A list of queried result from `ListApiResponse`,
  
      Raises:
          This doesn't catch any exceptions raised when the underlying request
          call raises exceptions. For example, it could raise `requests.Timeout`
          when timeout occurs.
  
      """
  
      endpoint = f"/api/v0/{resource.value}"
      params = self._make_param(options)
      list_api_response = self._make_http_get_request(
          endpoint=endpoint,
          params=params,
          timeout=options.timeout,
          _explain=_explain,
      )
      if raise_on_missing_output:
          self._raise_on_missing_output(resource, list_api_response)
      if _explain:
          self._print_api_warning(resource, list_api_response)
      return [
          dict_to_state(d, resource)
          for d in list_api_response["result"]
      ]
  
imports: import logging
  import threading
  import urllib
  import warnings
  from contextlib import contextmanager
  from dataclasses import fields
  from typing import Any, Dict, Generator, List, Optional, Tuple, Union
  import requests
  from ray.dashboard.modules.dashboard_sdk import SubmissionClient
  from ray.dashboard.utils import get_address_for_submission_client, ray_address_to_api_server_url
  from ray.util.annotations import DeveloperAPI
  from ray.util.state.common import DEFAULT_LIMIT, DEFAULT_RPC_TIMEOUT, ActorState, ClusterEventState, GetApiOptions, GetLogOptions, JobState, ListApiOptions, NodeState, ObjectState, PlacementGroupState, PredicateType, RuntimeEnvState, StateResource, SummaryApiOptions, SummaryResource, SupportedFilterType, TaskState, WorkerState, dict_to_state
  from ray.util.state.exception import RayStateApiException, ServerUnavailable
label_desc: Use image node_id 7 for calling the StateApiClient obj's underlying member method code with example usage: obj.list(resource, options, raise_on_missing_output, _explain) and returns: unknown