Class OpenSearchClusterClient
java.lang.Object
org.opensearch.client.ApiClient<OpenSearchTransport,OpenSearchClusterClient>
org.opensearch.client.opensearch.cluster.OpenSearchClusterClient
@Generated("org.opensearch.client.codegen.CodeGenerator")
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
ConstructorsConstructorDescriptionOpenSearchClusterClient(OpenSearchTransport transport) OpenSearchClusterClient(OpenSearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptionExplains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.allocationExplain(Function<AllocationExplainRequest.Builder, ObjectBuilder<AllocationExplainRequest>> fn) Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.deleteComponentTemplate(Function<DeleteComponentTemplateRequest.Builder, ObjectBuilder<DeleteComponentTemplateRequest>> fn) Deletes a component template.Deletes a component template.final BooleanResponseClears any cluster voting configuration exclusions.final BooleanResponsedeleteVotingConfigExclusions(Function<DeleteVotingConfigExclusionsRequest.Builder, ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) Clears any cluster voting configuration exclusions.Clears any cluster voting configuration exclusions.final BooleanResponseexistsComponentTemplate(Function<ExistsComponentTemplateRequest.Builder, ObjectBuilder<ExistsComponentTemplateRequest>> fn) Returns information about whether a particular component template exist.Returns information about whether a particular component template exist.Returns one or more component templates.getComponentTemplate(Function<GetComponentTemplateRequest.Builder, ObjectBuilder<GetComponentTemplateRequest>> fn) Returns one or more component templates.Returns one or more component templates.Returns cluster settings.getSettings(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) Returns cluster settings.getSettings(GetClusterSettingsRequest request) Returns cluster settings.final HealthResponsehealth()Returns basic information about the health of the cluster.final HealthResponseReturns basic information about the health of the cluster.health(HealthRequest request) Returns basic information about the health of the cluster.final PendingTasksResponseReturns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.final PendingTasksResponseReturns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.pendingTasks(PendingTasksRequest request) Returns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.final BooleanResponseUpdates the cluster voting configuration by excluding certain node IDs or names.final BooleanResponsepostVotingConfigExclusions(Function<PostVotingConfigExclusionsRequest.Builder, ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) Updates the cluster voting configuration by excluding certain node IDs or names.Updates the cluster voting configuration by excluding certain node IDs or names.putComponentTemplate(Function<PutComponentTemplateRequest.Builder, ObjectBuilder<PutComponentTemplateRequest>> fn) Creates or updates a component template.Creates or updates a component template.Updates the cluster settings.putSettings(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) Updates the cluster settings.putSettings(PutClusterSettingsRequest request) Updates the cluster settings.final RemoteInfoResponseReturns the information about configured remote clusters.final RemoteInfoResponseReturns the information about configured remote clusters.remoteInfo(RemoteInfoRequest request) Returns the information about configured remote clusters.final RerouteResponsereroute()Allows to manually change the allocation of individual shards in the cluster.final RerouteResponseAllows to manually change the allocation of individual shards in the cluster.reroute(RerouteRequest request) Allows to manually change the allocation of individual shards in the cluster.final StateResponsestate()Returns comprehensive information about the state of the cluster.final StateResponseReturns comprehensive information about the state of the cluster.state(StateRequest request) Returns comprehensive information about the state of the cluster.final ClusterStatsResponsestats()Returns a high-level overview of cluster statistics.final ClusterStatsResponseReturns a high-level overview of cluster statistics.stats(ClusterStatsRequest request) Returns a high-level overview of cluster statistics.withTransportOptions(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class org.opensearch.client.ApiClient
_transport, _transportOptions, getDeserializer
-
Constructor Details
-
OpenSearchClusterClient
-
OpenSearchClusterClient
public OpenSearchClusterClient(OpenSearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
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 IOException, OpenSearchException Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.- Throws:
IOExceptionOpenSearchException
-
allocationExplain
public final AllocationExplainResponse allocationExplain(Function<AllocationExplainRequest.Builder, ObjectBuilder<AllocationExplainRequest>> fn) throws IOException, OpenSearchExceptionExplains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.- Parameters:
fn- a function that initializes a builder to create theAllocationExplainRequest- Throws:
IOExceptionOpenSearchException
-
allocationExplain
Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.- Throws:
IOExceptionOpenSearchException
-
deleteComponentTemplate
public DeleteComponentTemplateResponse deleteComponentTemplate(DeleteComponentTemplateRequest request) throws IOException, OpenSearchException Deletes a component template.- Throws:
IOExceptionOpenSearchException
-
deleteComponentTemplate
public final DeleteComponentTemplateResponse deleteComponentTemplate(Function<DeleteComponentTemplateRequest.Builder, ObjectBuilder<DeleteComponentTemplateRequest>> fn) throws IOException, OpenSearchExceptionDeletes a component template.- Parameters:
fn- a function that initializes a builder to create theDeleteComponentTemplateRequest- Throws:
IOExceptionOpenSearchException
-
deleteVotingConfigExclusions
public BooleanResponse deleteVotingConfigExclusions(DeleteVotingConfigExclusionsRequest request) throws IOException, OpenSearchException Clears any cluster voting configuration exclusions.- Throws:
IOExceptionOpenSearchException
-
deleteVotingConfigExclusions
public final BooleanResponse deleteVotingConfigExclusions(Function<DeleteVotingConfigExclusionsRequest.Builder, ObjectBuilder<DeleteVotingConfigExclusionsRequest>> fn) throws IOException, OpenSearchExceptionClears any cluster voting configuration exclusions.- Parameters:
fn- a function that initializes a builder to create theDeleteVotingConfigExclusionsRequest- Throws:
IOExceptionOpenSearchException
-
deleteVotingConfigExclusions
Clears any cluster voting configuration exclusions.- Throws:
IOExceptionOpenSearchException
-
existsComponentTemplate
public BooleanResponse existsComponentTemplate(ExistsComponentTemplateRequest request) throws IOException, OpenSearchException Returns information about whether a particular component template exist.- Throws:
IOExceptionOpenSearchException
-
existsComponentTemplate
public final BooleanResponse existsComponentTemplate(Function<ExistsComponentTemplateRequest.Builder, ObjectBuilder<ExistsComponentTemplateRequest>> fn) throws IOException, OpenSearchExceptionReturns information about whether a particular component template exist.- Parameters:
fn- a function that initializes a builder to create theExistsComponentTemplateRequest- Throws:
IOExceptionOpenSearchException
-
getComponentTemplate
public GetComponentTemplateResponse getComponentTemplate(GetComponentTemplateRequest request) throws IOException, OpenSearchException Returns one or more component templates.- Throws:
IOExceptionOpenSearchException
-
getComponentTemplate
public final GetComponentTemplateResponse getComponentTemplate(Function<GetComponentTemplateRequest.Builder, ObjectBuilder<GetComponentTemplateRequest>> fn) throws IOException, OpenSearchExceptionReturns one or more component templates.- Parameters:
fn- a function that initializes a builder to create theGetComponentTemplateRequest- Throws:
IOExceptionOpenSearchException
-
getComponentTemplate
public final GetComponentTemplateResponse getComponentTemplate() throws IOException, OpenSearchExceptionReturns one or more component templates.- Throws:
IOExceptionOpenSearchException
-
getSettings
public GetClusterSettingsResponse getSettings(GetClusterSettingsRequest request) throws IOException, OpenSearchException Returns cluster settings.- Throws:
IOExceptionOpenSearchException
-
getSettings
public final GetClusterSettingsResponse getSettings(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) throws IOException, OpenSearchExceptionReturns cluster settings.- Parameters:
fn- a function that initializes a builder to create theGetClusterSettingsRequest- Throws:
IOExceptionOpenSearchException
-
getSettings
Returns cluster settings.- Throws:
IOExceptionOpenSearchException
-
health
Returns basic information about the health of the cluster.- Throws:
IOExceptionOpenSearchException
-
health
public final HealthResponse health(Function<HealthRequest.Builder, ObjectBuilder<HealthRequest>> fn) throws IOException, OpenSearchExceptionReturns basic information about the health of the cluster.- Parameters:
fn- a function that initializes a builder to create theHealthRequest- Throws:
IOExceptionOpenSearchException
-
health
Returns basic information about the health of the cluster.- Throws:
IOExceptionOpenSearchException
-
pendingTasks
public PendingTasksResponse pendingTasks(PendingTasksRequest request) throws IOException, OpenSearchException Returns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.- Throws:
IOExceptionOpenSearchException
-
pendingTasks
public final PendingTasksResponse pendingTasks(Function<PendingTasksRequest.Builder, ObjectBuilder<PendingTasksRequest>> fn) throws IOException, OpenSearchExceptionReturns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.- Parameters:
fn- a function that initializes a builder to create thePendingTasksRequest- Throws:
IOExceptionOpenSearchException
-
pendingTasks
Returns a list of pending cluster-level tasks, such as index creation, mapping updates, or new allocations.- Throws:
IOExceptionOpenSearchException
-
postVotingConfigExclusions
public BooleanResponse postVotingConfigExclusions(PostVotingConfigExclusionsRequest request) throws IOException, OpenSearchException Updates the cluster voting configuration by excluding certain node IDs or names.- Throws:
IOExceptionOpenSearchException
-
postVotingConfigExclusions
public final BooleanResponse postVotingConfigExclusions(Function<PostVotingConfigExclusionsRequest.Builder, ObjectBuilder<PostVotingConfigExclusionsRequest>> fn) throws IOException, OpenSearchExceptionUpdates the cluster voting configuration by excluding certain node IDs or names.- Parameters:
fn- a function that initializes a builder to create thePostVotingConfigExclusionsRequest- Throws:
IOExceptionOpenSearchException
-
postVotingConfigExclusions
Updates the cluster voting configuration by excluding certain node IDs or names.- Throws:
IOExceptionOpenSearchException
-
putComponentTemplate
public PutComponentTemplateResponse putComponentTemplate(PutComponentTemplateRequest request) throws IOException, OpenSearchException Creates or updates a component template.- Throws:
IOExceptionOpenSearchException
-
putComponentTemplate
public final PutComponentTemplateResponse putComponentTemplate(Function<PutComponentTemplateRequest.Builder, ObjectBuilder<PutComponentTemplateRequest>> fn) throws IOException, OpenSearchExceptionCreates or updates a component template.- Parameters:
fn- a function that initializes a builder to create thePutComponentTemplateRequest- Throws:
IOExceptionOpenSearchException
-
putSettings
public PutClusterSettingsResponse putSettings(PutClusterSettingsRequest request) throws IOException, OpenSearchException Updates the cluster settings.- Throws:
IOExceptionOpenSearchException
-
putSettings
public final PutClusterSettingsResponse putSettings(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) throws IOException, OpenSearchExceptionUpdates the cluster settings.- Parameters:
fn- a function that initializes a builder to create thePutClusterSettingsRequest- Throws:
IOExceptionOpenSearchException
-
putSettings
Updates the cluster settings.- Throws:
IOExceptionOpenSearchException
-
remoteInfo
public RemoteInfoResponse remoteInfo(RemoteInfoRequest request) throws IOException, OpenSearchException Returns the information about configured remote clusters.- Throws:
IOExceptionOpenSearchException
-
remoteInfo
public final RemoteInfoResponse remoteInfo(Function<RemoteInfoRequest.Builder, ObjectBuilder<RemoteInfoRequest>> fn) throws IOException, OpenSearchExceptionReturns the information about configured remote clusters.- Parameters:
fn- a function that initializes a builder to create theRemoteInfoRequest- Throws:
IOExceptionOpenSearchException
-
remoteInfo
Returns the information about configured remote clusters.- Throws:
IOExceptionOpenSearchException
-
reroute
Allows to manually change the allocation of individual shards in the cluster.- Throws:
IOExceptionOpenSearchException
-
reroute
public final RerouteResponse reroute(Function<RerouteRequest.Builder, ObjectBuilder<RerouteRequest>> fn) throws IOException, OpenSearchExceptionAllows to manually change the allocation of individual shards in the cluster.- Parameters:
fn- a function that initializes a builder to create theRerouteRequest- Throws:
IOExceptionOpenSearchException
-
reroute
Allows to manually change the allocation of individual shards in the cluster.- Throws:
IOExceptionOpenSearchException
-
state
Returns comprehensive information about the state of the cluster.- Throws:
IOExceptionOpenSearchException
-
state
public final StateResponse state(Function<StateRequest.Builder, ObjectBuilder<StateRequest>> fn) throws IOException, OpenSearchExceptionReturns comprehensive information about the state of the cluster.- Parameters:
fn- a function that initializes a builder to create theStateRequest- Throws:
IOExceptionOpenSearchException
-
state
Returns comprehensive information about the state of the cluster.- Throws:
IOExceptionOpenSearchException
-
stats
public ClusterStatsResponse stats(ClusterStatsRequest request) throws IOException, OpenSearchException Returns a high-level overview of cluster statistics.- Throws:
IOExceptionOpenSearchException
-
stats
public final ClusterStatsResponse stats(Function<ClusterStatsRequest.Builder, ObjectBuilder<ClusterStatsRequest>> fn) throws IOException, OpenSearchExceptionReturns a high-level overview of cluster statistics.- Parameters:
fn- a function that initializes a builder to create theClusterStatsRequest- Throws:
IOExceptionOpenSearchException
-
stats
Returns a high-level overview of cluster statistics.- Throws:
IOExceptionOpenSearchException
-