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.Recommissions a decommissioned zone.deleteDecommissionAwareness(Function<DeleteDecommissionAwarenessRequest.Builder, ObjectBuilder<DeleteDecommissionAwarenessRequest>> fn) Recommissions a decommissioned zone.Recommissions a decommissioned zone.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.Delete weighted shard routing weights.deleteWeightedRouting(Function<DeleteWeightedRoutingRequest.Builder, ObjectBuilder<DeleteWeightedRoutingRequest>> fn) Delete weighted shard routing weights.Delete weighted shard routing weights.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.getDecommissionAwareness(Function<GetDecommissionAwarenessRequest.Builder, ObjectBuilder<GetDecommissionAwarenessRequest>> fn) Retrieves the decommission status for all zones.Retrieves the decommission status for all zones.Returns cluster settings.getSettings(Function<GetClusterSettingsRequest.Builder, ObjectBuilder<GetClusterSettingsRequest>> fn) Returns cluster settings.getSettings(GetClusterSettingsRequest request) Returns cluster settings.getWeightedRouting(Function<GetWeightedRoutingRequest.Builder, ObjectBuilder<GetWeightedRoutingRequest>> fn) Fetches weighted shard routing weights.Fetches weighted shard routing weights.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.putDecommissionAwareness(Function<PutDecommissionAwarenessRequest.Builder, ObjectBuilder<PutDecommissionAwarenessRequest>> fn) Decommissions a cluster zone based on awareness.Decommissions a cluster zone based on awareness.Updates the cluster settings.putSettings(Function<PutClusterSettingsRequest.Builder, ObjectBuilder<PutClusterSettingsRequest>> fn) Updates the cluster settings.putSettings(PutClusterSettingsRequest request) Updates the cluster settings.putWeightedRouting(Function<PutWeightedRoutingRequest.Builder, ObjectBuilder<PutWeightedRoutingRequest>> fn) Updates weighted shard routing weights.Updates weighted shard routing weights.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
-
deleteDecommissionAwareness
public DeleteDecommissionAwarenessResponse deleteDecommissionAwareness(DeleteDecommissionAwarenessRequest request) throws IOException, OpenSearchException Recommissions a decommissioned zone.- Throws:
IOExceptionOpenSearchException
-
deleteDecommissionAwareness
public final DeleteDecommissionAwarenessResponse deleteDecommissionAwareness(Function<DeleteDecommissionAwarenessRequest.Builder, ObjectBuilder<DeleteDecommissionAwarenessRequest>> fn) throws IOException, OpenSearchExceptionRecommissions a decommissioned zone.- Parameters:
fn- a function that initializes a builder to create theDeleteDecommissionAwarenessRequest- Throws:
IOExceptionOpenSearchException
-
deleteDecommissionAwareness
public final DeleteDecommissionAwarenessResponse deleteDecommissionAwareness() throws IOException, OpenSearchExceptionRecommissions a decommissioned zone.- 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
-
deleteWeightedRouting
public DeleteWeightedRoutingResponse deleteWeightedRouting(DeleteWeightedRoutingRequest request) throws IOException, OpenSearchException Delete weighted shard routing weights.- Throws:
IOExceptionOpenSearchException
-
deleteWeightedRouting
public final DeleteWeightedRoutingResponse deleteWeightedRouting(Function<DeleteWeightedRoutingRequest.Builder, ObjectBuilder<DeleteWeightedRoutingRequest>> fn) throws IOException, OpenSearchExceptionDelete weighted shard routing weights.- Parameters:
fn- a function that initializes a builder to create theDeleteWeightedRoutingRequest- Throws:
IOExceptionOpenSearchException
-
deleteWeightedRouting
public final DeleteWeightedRoutingResponse deleteWeightedRouting() throws IOException, OpenSearchExceptionDelete weighted shard routing weights.- 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
-
getDecommissionAwareness
public GetDecommissionAwarenessResponse getDecommissionAwareness(GetDecommissionAwarenessRequest request) throws IOException, OpenSearchException Retrieves the decommission status for all zones.- Throws:
IOExceptionOpenSearchException
-
getDecommissionAwareness
public final GetDecommissionAwarenessResponse getDecommissionAwareness(Function<GetDecommissionAwarenessRequest.Builder, ObjectBuilder<GetDecommissionAwarenessRequest>> fn) throws IOException, OpenSearchExceptionRetrieves the decommission status for all zones.- Parameters:
fn- a function that initializes a builder to create theGetDecommissionAwarenessRequest- 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
-
getWeightedRouting
public GetWeightedRoutingResponse getWeightedRouting(GetWeightedRoutingRequest request) throws IOException, OpenSearchException Fetches weighted shard routing weights.- Throws:
IOExceptionOpenSearchException
-
getWeightedRouting
public final GetWeightedRoutingResponse getWeightedRouting(Function<GetWeightedRoutingRequest.Builder, ObjectBuilder<GetWeightedRoutingRequest>> fn) throws IOException, OpenSearchExceptionFetches weighted shard routing weights.- Parameters:
fn- a function that initializes a builder to create theGetWeightedRoutingRequest- 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
-
putDecommissionAwareness
public PutDecommissionAwarenessResponse putDecommissionAwareness(PutDecommissionAwarenessRequest request) throws IOException, OpenSearchException Decommissions a cluster zone based on awareness. This can greatly benefit multi-zone deployments, where awareness attributes can aid in applying new upgrades to a cluster in a controlled fashion.- Throws:
IOExceptionOpenSearchException
-
putDecommissionAwareness
public final PutDecommissionAwarenessResponse putDecommissionAwareness(Function<PutDecommissionAwarenessRequest.Builder, ObjectBuilder<PutDecommissionAwarenessRequest>> fn) throws IOException, OpenSearchExceptionDecommissions a cluster zone based on awareness. This can greatly benefit multi-zone deployments, where awareness attributes can aid in applying new upgrades to a cluster in a controlled fashion.- Parameters:
fn- a function that initializes a builder to create thePutDecommissionAwarenessRequest- 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
-
putWeightedRouting
public PutWeightedRoutingResponse putWeightedRouting(PutWeightedRoutingRequest request) throws IOException, OpenSearchException Updates weighted shard routing weights.- Throws:
IOExceptionOpenSearchException
-
putWeightedRouting
public final PutWeightedRoutingResponse putWeightedRouting(Function<PutWeightedRoutingRequest.Builder, ObjectBuilder<PutWeightedRoutingRequest>> fn) throws IOException, OpenSearchExceptionUpdates weighted shard routing weights.- Parameters:
fn- a function that initializes a builder to create thePutWeightedRoutingRequest- 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
-