Class OpenSearchClusterClient
- java.lang.Object
-
- org.opensearch.client.ApiClient<OpenSearchTransport,OpenSearchClusterClient>
-
- org.opensearch.client.opensearch.cluster.OpenSearchClusterClient
-
public class OpenSearchClusterClient extends ApiClient<OpenSearchTransport,OpenSearchClusterClient>
Client for the cluster namespace.
-
-
Field Summary
-
Fields inherited from class org.opensearch.client.ApiClient
transport, transportOptions
-
-
Constructor Summary
Constructors Constructor Description OpenSearchClusterClient(OpenSearchTransport transport)OpenSearchClusterClient(OpenSearchTransport transport, TransportOptions transportOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllocationExplainResponseallocationExplain()Provides explanations for shard allocations in the cluster.AllocationExplainResponseallocationExplain(java.util.function.Function<AllocationExplainRequest.Builder,ObjectBuilder<AllocationExplainRequest>> fn)Provides explanations for shard allocations in the cluster.AllocationExplainResponseallocationExplain(AllocationExplainRequest request)Provides explanations for shard allocations in the cluster.DeleteComponentTemplateResponsedeleteComponentTemplate(java.util.function.Function<DeleteComponentTemplateRequest.Builder,ObjectBuilder<DeleteComponentTemplateRequest>> fn)Deletes a component templateDeleteComponentTemplateResponsedeleteComponentTemplate(DeleteComponentTemplateRequest request)Deletes a component templateBooleanResponsedeleteVotingConfigExclusions()Clears cluster voting config exclusions.BooleanResponsedeleteVotingConfigExclusions(java.util.function.Function<DeleteVotingConfigExclusionsRequest.Builder,ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn)Clears cluster voting config exclusions.BooleanResponsedeleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request)Clears cluster voting config exclusions.BooleanResponseexistsComponentTemplate(java.util.function.Function<ExistsComponentTemplateRequest.Builder,ObjectBuilder<ExistsComponentTemplateRequest>> fn)Returns information about whether a particular component template existBooleanResponseexistsComponentTemplate(ExistsComponentTemplateRequest request)Returns information about whether a particular component template existGetComponentTemplateResponsegetComponentTemplate()Returns one or more component templatesGetComponentTemplateResponsegetComponentTemplate(java.util.function.Function<GetComponentTemplateRequest.Builder,ObjectBuilder<GetComponentTemplateRequest>> fn)Returns one or more component templatesGetComponentTemplateResponsegetComponentTemplate(GetComponentTemplateRequest request)Returns one or more component templatesGetClusterSettingsResponsegetSettings()Returns cluster settings.GetClusterSettingsResponsegetSettings(java.util.function.Function<GetClusterSettingsRequest.Builder,ObjectBuilder<GetClusterSettingsRequest>> fn)Returns cluster settings.GetClusterSettingsResponsegetSettings(GetClusterSettingsRequest request)Returns cluster settings.HealthResponsehealth()Returns basic information about the health of the cluster.HealthResponsehealth(java.util.function.Function<HealthRequest.Builder,ObjectBuilder<HealthRequest>> fn)Returns basic information about the health of the cluster.HealthResponsehealth(HealthRequest request)Returns basic information about the health of the cluster.PendingTasksResponsependingTasks()Returns a list of any cluster-level changes (e.g.PendingTasksResponsependingTasks(java.util.function.Function<PendingTasksRequest.Builder,ObjectBuilder<PendingTasksRequest>> fn)Returns a list of any cluster-level changes (e.g.PendingTasksResponsependingTasks(PendingTasksRequest request)Returns a list of any cluster-level changes (e.g.BooleanResponsepostVotingConfigExclusions()Updates the cluster voting config exclusions by node ids or node names.BooleanResponsepostVotingConfigExclusions(java.util.function.Function<PostVotingConfigExclusionsRequest.Builder,ObjectBuilder<PostVotingConfigExclusionsRequest>> fn)Updates the cluster voting config exclusions by node ids or node names.BooleanResponsepostVotingConfigExclusions(PostVotingConfigExclusionsRequest request)Updates the cluster voting config exclusions by node ids or node names.PutComponentTemplateResponseputComponentTemplate(java.util.function.Function<PutComponentTemplateRequest.Builder,ObjectBuilder<PutComponentTemplateRequest>> fn)Creates or updates a component templatePutComponentTemplateResponseputComponentTemplate(PutComponentTemplateRequest request)Creates or updates a component templatePutClusterSettingsResponseputSettings()Updates the cluster settings.PutClusterSettingsResponseputSettings(java.util.function.Function<PutClusterSettingsRequest.Builder,ObjectBuilder<PutClusterSettingsRequest>> fn)Updates the cluster settings.PutClusterSettingsResponseputSettings(PutClusterSettingsRequest request)Updates the cluster settings.RemoteInfoResponseremoteInfo()Returns the information about configured remote clusters.RerouteResponsereroute()Allows to manually change the allocation of individual shards in the cluster.RerouteResponsereroute(java.util.function.Function<RerouteRequest.Builder,ObjectBuilder<RerouteRequest>> fn)Allows to manually change the allocation of individual shards in the cluster.RerouteResponsereroute(RerouteRequest request)Allows to manually change the allocation of individual shards in the cluster.StateResponsestate()Returns a comprehensive information about the state of the cluster.StateResponsestate(java.util.function.Function<StateRequest.Builder,ObjectBuilder<StateRequest>> fn)Returns a comprehensive information about the state of the cluster.StateResponsestate(StateRequest request)Returns a comprehensive information about the state of the cluster.ClusterStatsResponsestats()Returns high-level overview of cluster statistics.ClusterStatsResponsestats(java.util.function.Function<ClusterStatsRequest.Builder,ObjectBuilder<ClusterStatsRequest>> fn)Returns high-level overview of cluster statistics.ClusterStatsResponsestats(ClusterStatsRequest request)Returns high-level overview of cluster statistics.OpenSearchClusterClientwithTransportOptions(TransportOptions transportOptions)Creates a new client with some request options-
Methods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer
-
-
-
-
Constructor Detail
-
OpenSearchClusterClient
public OpenSearchClusterClient(OpenSearchTransport transport)
-
OpenSearchClusterClient
public OpenSearchClusterClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Detail
-
withTransportOptions
public OpenSearchClusterClient withTransportOptions(@Nullable TransportOptions transportOptions)
Description copied from class:ApiClientCreates a new client with some request options- Specified by:
withTransportOptionsin classApiClient<OpenSearchTransport,OpenSearchClusterClient>
-
allocationExplain
public AllocationExplainResponse allocationExplain(AllocationExplainRequest request) throws java.io.IOException, OpenSearchException
Provides explanations for shard allocations in the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
allocationExplain
public final AllocationExplainResponse allocationExplain(java.util.function.Function<AllocationExplainRequest.Builder,ObjectBuilder<AllocationExplainRequest>> fn) throws java.io.IOException, OpenSearchException
Provides explanations for shard allocations in the cluster.- Parameters:
fn- a function that initializes a builder to create theAllocationExplainRequest- Throws:
java.io.IOExceptionOpenSearchException
-
allocationExplain
public AllocationExplainResponse allocationExplain() throws java.io.IOException, OpenSearchException
Provides explanations for shard allocations in the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
deleteComponentTemplate
public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTemplateRequest request) throws java.io.IOException, OpenSearchException
Deletes a component template- Throws:
java.io.IOExceptionOpenSearchException
-
deleteComponentTemplate
public final DeleteComponentTemplateResponse deleteComponentTemplate(java.util.function.Function<DeleteComponentTemplateRequest.Builder,ObjectBuilder<DeleteComponentTemplateRequest>> fn) throws java.io.IOException, OpenSearchException
Deletes a component template- Parameters:
fn- a function that initializes a builder to create theDeleteComponentTemplateRequest- Throws:
java.io.IOExceptionOpenSearchException
-
deleteVotingConfigExclusions
public BooleanResponse deleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request) throws java.io.IOException, OpenSearchException
Clears cluster voting config exclusions.- Throws:
java.io.IOExceptionOpenSearchException
-
deleteVotingConfigExclusions
public final BooleanResponse deleteVotingConfigExclusions(java.util.function.Function<DeleteVotingConfigExclusionsRequest.Builder,ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) throws java.io.IOException, OpenSearchException
Clears cluster voting config exclusions.- Parameters:
fn- a function that initializes a builder to create theDeleteVotingConfigExclusionsRequest- Throws:
java.io.IOExceptionOpenSearchException
-
deleteVotingConfigExclusions
public BooleanResponse deleteVotingConfigExclusions() throws java.io.IOException, OpenSearchException
Clears cluster voting config exclusions.- Throws:
java.io.IOExceptionOpenSearchException
-
existsComponentTemplate
public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest request) throws java.io.IOException, OpenSearchException
Returns information about whether a particular component template exist- Throws:
java.io.IOExceptionOpenSearchException
-
existsComponentTemplate
public final BooleanResponse existsComponentTemplate(java.util.function.Function<ExistsComponentTemplateRequest.Builder,ObjectBuilder<ExistsComponentTemplateRequest>> fn) throws java.io.IOException, OpenSearchException
Returns information about whether a particular component template exist- Parameters:
fn- a function that initializes a builder to create theExistsComponentTemplateRequest- Throws:
java.io.IOExceptionOpenSearchException
-
getComponentTemplate
public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateRequest request) throws java.io.IOException, OpenSearchException
Returns one or more component templates- Throws:
java.io.IOExceptionOpenSearchException
-
getComponentTemplate
public final GetComponentTemplateResponse getComponentTemplate(java.util.function.Function<GetComponentTemplateRequest.Builder,ObjectBuilder<GetComponentTemplateRequest>> fn) throws java.io.IOException, OpenSearchException
Returns one or more component templates- Parameters:
fn- a function that initializes a builder to create theGetComponentTemplateRequest- Throws:
java.io.IOExceptionOpenSearchException
-
getComponentTemplate
public GetComponentTemplateResponse getComponentTemplate() throws java.io.IOException, OpenSearchException
Returns one or more component templates- Throws:
java.io.IOExceptionOpenSearchException
-
getSettings
public GetClusterSettingsResponse getSettings(GetClusterSettingsRequest request) throws java.io.IOException, OpenSearchException
Returns cluster settings.- Throws:
java.io.IOExceptionOpenSearchException
-
getSettings
public final GetClusterSettingsResponse getSettings(java.util.function.Function<GetClusterSettingsRequest.Builder,ObjectBuilder<GetClusterSettingsRequest>> fn) throws java.io.IOException, OpenSearchException
Returns cluster settings.- Parameters:
fn- a function that initializes a builder to create theGetClusterSettingsRequest- Throws:
java.io.IOExceptionOpenSearchException
-
getSettings
public GetClusterSettingsResponse getSettings() throws java.io.IOException, OpenSearchException
Returns cluster settings.- Throws:
java.io.IOExceptionOpenSearchException
-
health
public HealthResponse health(HealthRequest request) throws java.io.IOException, OpenSearchException
Returns basic information about the health of the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
health
public final HealthResponse health(java.util.function.Function<HealthRequest.Builder,ObjectBuilder<HealthRequest>> fn) throws java.io.IOException, OpenSearchException
Returns basic information about the health of the cluster.- Parameters:
fn- a function that initializes a builder to create theHealthRequest- Throws:
java.io.IOExceptionOpenSearchException
-
health
public HealthResponse health() throws java.io.IOException, OpenSearchException
Returns basic information about the health of the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
pendingTasks
public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws java.io.IOException, OpenSearchException
Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Throws:
java.io.IOExceptionOpenSearchException
-
pendingTasks
public final PendingTasksResponse pendingTasks(java.util.function.Function<PendingTasksRequest.Builder,ObjectBuilder<PendingTasksRequest>> fn) throws java.io.IOException, OpenSearchException
Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Parameters:
fn- a function that initializes a builder to create thePendingTasksRequest- Throws:
java.io.IOExceptionOpenSearchException
-
pendingTasks
public PendingTasksResponse pendingTasks() throws java.io.IOException, OpenSearchException
Returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.- Throws:
java.io.IOExceptionOpenSearchException
-
postVotingConfigExclusions
public BooleanResponse postVotingConfigExclusions(PostVotingConfigExclusionsRequest request) throws java.io.IOException, OpenSearchException
Updates the cluster voting config exclusions by node ids or node names.- Throws:
java.io.IOExceptionOpenSearchException
-
postVotingConfigExclusions
public final BooleanResponse postVotingConfigExclusions(java.util.function.Function<PostVotingConfigExclusionsRequest.Builder,ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) throws java.io.IOException, OpenSearchException
Updates the cluster voting config exclusions by node ids or node names.- Parameters:
fn- a function that initializes a builder to create thePostVotingConfigExclusionsRequest- Throws:
java.io.IOExceptionOpenSearchException
-
postVotingConfigExclusions
public BooleanResponse postVotingConfigExclusions() throws java.io.IOException, OpenSearchException
Updates the cluster voting config exclusions by node ids or node names.- Throws:
java.io.IOExceptionOpenSearchException
-
putComponentTemplate
public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateRequest request) throws java.io.IOException, OpenSearchException
Creates or updates a component template- Throws:
java.io.IOExceptionOpenSearchException
-
putComponentTemplate
public final PutComponentTemplateResponse putComponentTemplate(java.util.function.Function<PutComponentTemplateRequest.Builder,ObjectBuilder<PutComponentTemplateRequest>> fn) throws java.io.IOException, OpenSearchException
Creates or updates a component template- Parameters:
fn- a function that initializes a builder to create thePutComponentTemplateRequest- Throws:
java.io.IOExceptionOpenSearchException
-
putSettings
public PutClusterSettingsResponse putSettings(PutClusterSettingsRequest request) throws java.io.IOException, OpenSearchException
Updates the cluster settings.- Throws:
java.io.IOExceptionOpenSearchException
-
putSettings
public final PutClusterSettingsResponse putSettings(java.util.function.Function<PutClusterSettingsRequest.Builder,ObjectBuilder<PutClusterSettingsRequest>> fn) throws java.io.IOException, OpenSearchException
Updates the cluster settings.- Parameters:
fn- a function that initializes a builder to create thePutClusterSettingsRequest- Throws:
java.io.IOExceptionOpenSearchException
-
putSettings
public PutClusterSettingsResponse putSettings() throws java.io.IOException, OpenSearchException
Updates the cluster settings.- Throws:
java.io.IOExceptionOpenSearchException
-
remoteInfo
public RemoteInfoResponse remoteInfo() throws java.io.IOException, OpenSearchException
Returns the information about configured remote clusters.- Throws:
java.io.IOExceptionOpenSearchException
-
reroute
public RerouteResponse reroute(RerouteRequest request) throws java.io.IOException, OpenSearchException
Allows to manually change the allocation of individual shards in the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
reroute
public final RerouteResponse reroute(java.util.function.Function<RerouteRequest.Builder,ObjectBuilder<RerouteRequest>> fn) throws java.io.IOException, OpenSearchException
Allows to manually change the allocation of individual shards in the cluster.- Parameters:
fn- a function that initializes a builder to create theRerouteRequest- Throws:
java.io.IOExceptionOpenSearchException
-
reroute
public RerouteResponse reroute() throws java.io.IOException, OpenSearchException
Allows to manually change the allocation of individual shards in the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
state
public StateResponse state(StateRequest request) throws java.io.IOException, OpenSearchException
Returns a comprehensive information about the state of the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
state
public final StateResponse state(java.util.function.Function<StateRequest.Builder,ObjectBuilder<StateRequest>> fn) throws java.io.IOException, OpenSearchException
Returns a comprehensive information about the state of the cluster.- Parameters:
fn- a function that initializes a builder to create theStateRequest- Throws:
java.io.IOExceptionOpenSearchException
-
state
public StateResponse state() throws java.io.IOException, OpenSearchException
Returns a comprehensive information about the state of the cluster.- Throws:
java.io.IOExceptionOpenSearchException
-
stats
public ClusterStatsResponse stats(ClusterStatsRequest request) throws java.io.IOException, OpenSearchException
Returns high-level overview of cluster statistics.- Throws:
java.io.IOExceptionOpenSearchException
-
stats
public final ClusterStatsResponse stats(java.util.function.Function<ClusterStatsRequest.Builder,ObjectBuilder<ClusterStatsRequest>> fn) throws java.io.IOException, OpenSearchException
Returns high-level overview of cluster statistics.- Parameters:
fn- a function that initializes a builder to create theClusterStatsRequest- Throws:
java.io.IOExceptionOpenSearchException
-
stats
public ClusterStatsResponse stats() throws java.io.IOException, OpenSearchException
Returns high-level overview of cluster statistics.- Throws:
java.io.IOExceptionOpenSearchException
-
-