Class ClusterHealthDescriptor
Descriptor for Health
https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/
Inheritance
ClusterHealthDescriptor
Assembly: OpenSearch.Client.dll
Syntax
public class ClusterHealthDescriptor : RequestDescriptorBase<ClusterHealthDescriptor, ClusterHealthRequestParameters, IClusterHealthRequest>, IDescriptor, IClusterHealthRequest, IRequest<ClusterHealthRequestParameters>, IRequest
Constructors
|
Edit this page
View Source
ClusterHealthDescriptor()
Declaration
public ClusterHealthDescriptor()
|
Edit this page
View Source
ClusterHealthDescriptor(Indices)
Declaration
public ClusterHealthDescriptor(Indices index)
Parameters
Type |
Name |
Description |
Indices |
index |
Optional, accepts null
|
Methods
|
Edit this page
View Source
AllIndices()
A shortcut into calling Index(Indices.All)
Declaration
public ClusterHealthDescriptor AllIndices()
Returns
|
Edit this page
View Source
AwarenessAttribute(string)
The awareness attribute for which the health is required.
Declaration
public ClusterHealthDescriptor AwarenessAttribute(string awarenessattribute)
Parameters
Type |
Name |
Description |
string |
awarenessattribute |
|
Returns
|
Edit this page
View Source
ClusterManagerTimeout(Time)
Operation timeout for connection to cluster-manager node.
Declaration
public ClusterHealthDescriptor ClusterManagerTimeout(Time clustermanagertimeout)
Parameters
Type |
Name |
Description |
Time |
clustermanagertimeout |
|
Returns
|
Edit this page
View Source
ExpandWildcards(ExpandWildcards?)
Whether to expand wildcard expression to concrete indices that are open, closed or both.
Declaration
public ClusterHealthDescriptor ExpandWildcards(ExpandWildcards? expandwildcards)
Parameters
Returns
|
Edit this page
View Source
Index(Indices)
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 *
.
Declaration
public ClusterHealthDescriptor Index(Indices index)
Parameters
Type |
Name |
Description |
Indices |
index |
|
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public ClusterHealthDescriptor Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Level(ClusterHealthLevel?)
Can be one of cluster, indices or shards. Controls the details level of the health information returned.
Declaration
public ClusterHealthDescriptor Level(ClusterHealthLevel? level)
Parameters
Returns
|
Edit this page
View Source
Local(bool?)
If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
Declaration
public ClusterHealthDescriptor Local(bool? local = true)
Parameters
Type |
Name |
Description |
bool? |
local |
|
Returns
|
Edit this page
View Source
MasterTimeout(Time)
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.
Declaration
[Obsolete("Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead.")]
public ClusterHealthDescriptor MasterTimeout(Time mastertimeout)
Parameters
Type |
Name |
Description |
Time |
mastertimeout |
|
Returns
|
Edit this page
View Source
Timeout(Time)
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Declaration
public ClusterHealthDescriptor Timeout(Time timeout)
Parameters
Type |
Name |
Description |
Time |
timeout |
|
Returns
|
Edit this page
View Source
WaitForActiveShards(string)
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.
Declaration
public ClusterHealthDescriptor WaitForActiveShards(string waitforactiveshards)
Parameters
Type |
Name |
Description |
string |
waitforactiveshards |
|
Returns
|
Edit this page
View Source
WaitForEvents(WaitForEvents?)
Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed.
Declaration
public ClusterHealthDescriptor WaitForEvents(WaitForEvents? waitforevents)
Parameters
Returns
|
Edit this page
View Source
WaitForNoInitializingShards(bool?)
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.
Declaration
public ClusterHealthDescriptor WaitForNoInitializingShards(bool? waitfornoinitializingshards = true)
Parameters
Type |
Name |
Description |
bool? |
waitfornoinitializingshards |
|
Returns
|
Edit this page
View Source
WaitForNoRelocatingShards(bool?)
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.
Declaration
public ClusterHealthDescriptor WaitForNoRelocatingShards(bool? waitfornorelocatingshards = true)
Parameters
Type |
Name |
Description |
bool? |
waitfornorelocatingshards |
|
Returns
|
Edit this page
View Source
WaitForNodes(string)
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.
Declaration
public ClusterHealthDescriptor WaitForNodes(string waitfornodes)
Parameters
Type |
Name |
Description |
string |
waitfornodes |
|
Returns
|
Edit this page
View Source
WaitForStatus(HealthStatus?)
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.
Declaration
public ClusterHealthDescriptor WaitForStatus(HealthStatus? waitforstatus)
Parameters
Returns
Implements
Extension Methods