Class HealthRequest

java.lang.Object
org.opensearch.client.opensearch._types.RequestBase
org.opensearch.client.opensearch.cluster.HealthRequest

public final class HealthRequest
extends RequestBase
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  HealthRequest.Builder
    Builder for HealthRequest.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static Endpoint<HealthRequest,​HealthResponse,​OpenSearchError> ENDPOINT
    Endpoint "cluster.health".
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected HealthRequest​(HealthRequest.Builder builder)  
  • Method Summary

    Modifier and Type Method Description
    jakarta.json.JsonValue expandWildcards()
    API name: expand_wildcards
    java.util.List<java.lang.String> index()
    Comma-separated list of data streams, indices, and index aliases used to limit the request.
    jakarta.json.JsonValue level()
    Can be one of cluster, indices or shards.
    java.lang.Boolean local()
    If true, the request retrieves information from the local node only.
    jakarta.json.JsonValue masterTimeout()
    Period to wait for a connection to the master node.
    jakarta.json.JsonValue timeout()
    Period to wait for a response.
    jakarta.json.JsonValue waitForActiveShards()
    A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait.
    jakarta.json.JsonValue waitForEvents()
    Can be one of immediate, urgent, high, normal, low, languid.
    java.lang.String waitForNodes()
    The request waits until the specified number N of nodes is available.
    java.lang.Boolean waitForNoInitializingShards()
    A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations.
    java.lang.Boolean waitForNoRelocatingShards()
    A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations.
    jakarta.json.JsonValue waitForStatus()
    One of green, yellow or red.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • index

      @Nullable public java.util.List<java.lang.String> index()
      Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *. API name: index
    • expandWildcards

      @Nullable public jakarta.json.JsonValue expandWildcards()
      API name: expand_wildcards
    • level

      @Nullable public jakarta.json.JsonValue level()
      Can be one of cluster, indices or shards. Controls the details level of the health information returned. API name: level
    • local

      @Nullable public java.lang.Boolean local()
      If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. API name: local
    • masterTimeout

      @Nullable public jakarta.json.JsonValue masterTimeout()
      Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. API name: master_timeout
    • timeout

      @Nullable public jakarta.json.JsonValue timeout()
      Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. API name: timeout
    • waitForActiveShards

      @Nullable public jakarta.json.JsonValue waitForActiveShards()
      A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. API name: wait_for_active_shards
    • waitForEvents

      @Nullable public jakarta.json.JsonValue waitForEvents()
      Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. API name: wait_for_events
    • waitForNodes

      @Nullable public java.lang.String waitForNodes()
      The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and <N. Alternatively, it is possible to use ge(N), le(N), gt(N) and lt(N) notation. API name: wait_for_nodes
    • waitForNoInitializingShards

      @Nullable public java.lang.Boolean waitForNoInitializingShards()
      A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. API name: wait_for_no_initializing_shards
    • waitForNoRelocatingShards

      @Nullable public java.lang.Boolean waitForNoRelocatingShards()
      A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. API name: wait_for_no_relocating_shards
    • waitForStatus

      @Nullable public jakarta.json.JsonValue waitForStatus()
      One of green, yellow or red. Will wait (until the timeout provided) until the status of the cluster changes to the one provided or better, i.e. green > yellow > red. By default, will not wait for any status. API name: wait_for_status