diff --git a/src/ApiGenerator/Configuration/CodeConfiguration.cs b/src/ApiGenerator/Configuration/CodeConfiguration.cs
index c9b709fcdf..8e182c4d14 100644
--- a/src/ApiGenerator/Configuration/CodeConfiguration.cs
+++ b/src/ApiGenerator/Configuration/CodeConfiguration.cs
@@ -46,6 +46,7 @@ public static class CodeConfiguration
new("cluster.get_component_template"),
new("cluster.get_settings"),
new("cluster.health"),
+ new("cluster.pending_tasks"),
new("dangling_indices.*"),
new("ingest.*"),
diff --git a/src/OpenSearch.Client/ApiUrlsLookup.cs b/src/OpenSearch.Client/ApiUrlsLookup.cs
index de4d812cff..4bb7d9d61a 100644
--- a/src/OpenSearch.Client/ApiUrlsLookup.cs
+++ b/src/OpenSearch.Client/ApiUrlsLookup.cs
@@ -70,7 +70,6 @@ internal static partial class ApiUrlsLookups
internal static ApiUrls CatTemplates = new ApiUrls(new[]{"_cat/templates", "_cat/templates/{name}"});
internal static ApiUrls CatThreadPool = new ApiUrls(new[]{"_cat/thread_pool", "_cat/thread_pool/{thread_pool_patterns}"});
internal static ApiUrls NoNamespaceClearScroll = new ApiUrls(new[]{"_search/scroll"});
- internal static ApiUrls ClusterPendingTasks = new ApiUrls(new[]{"_cluster/pending_tasks"});
internal static ApiUrls ClusterPostVotingConfigExclusions = new ApiUrls(new[]{"_cluster/voting_config_exclusions"});
internal static ApiUrls ClusterPutSettings = new ApiUrls(new[]{"_cluster/settings"});
internal static ApiUrls ClusterRemoteInfo = new ApiUrls(new[]{"_remote/info"});
diff --git a/src/OpenSearch.Client/Descriptors.Cluster.cs b/src/OpenSearch.Client/Descriptors.Cluster.cs
index 10e6cc7598..83fdbea648 100644
--- a/src/OpenSearch.Client/Descriptors.Cluster.cs
+++ b/src/OpenSearch.Client/Descriptors.Cluster.cs
@@ -57,22 +57,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
- ///Descriptor for PendingTasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- public partial class ClusterPendingTasksDescriptor : RequestDescriptorBase, IClusterPendingTasksRequest
- {
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
- // values part of the url path
- // Request parameters
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public ClusterPendingTasksDescriptor Local(bool? local = true) => Qs("local", local);
- ///Explicit operation timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public ClusterPendingTasksDescriptor MasterTimeout(Time mastertimeout) => Qs("master_timeout", mastertimeout);
- ///Explicit operation timeout for connection to cluster_manager node
- ///Introduced in OpenSearch 2.0 instead of
- public ClusterPendingTasksDescriptor ClusterManagerTimeout(Time timeout) => Qs("cluster_manager_timeout", timeout);
- }
-
///Descriptor for PostVotingConfigExclusions
public partial class PostVotingConfigExclusionsDescriptor : RequestDescriptorBase, IPostVotingConfigExclusionsRequest
{
diff --git a/src/OpenSearch.Client/OpenSearchClient.Cluster.cs b/src/OpenSearch.Client/OpenSearchClient.Cluster.cs
index 93c2307d14..22d773b053 100644
--- a/src/OpenSearch.Client/OpenSearchClient.Cluster.cs
+++ b/src/OpenSearch.Client/OpenSearchClient.Cluster.cs
@@ -59,30 +59,6 @@ namespace OpenSearch.Client.Specification.ClusterApi
///
public partial class ClusterNamespace : NamespacedClientProxy
{
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public ClusterPendingTasksResponse PendingTasks(Func selector = null) => PendingTasks(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()));
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public Task PendingTasksAsync(Func selector = null, CancellationToken ct = default) => PendingTasksAsync(selector.InvokeOrDefault(new ClusterPendingTasksDescriptor()), ct);
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public ClusterPendingTasksResponse PendingTasks(IClusterPendingTasksRequest request) => DoRequest(request, request.RequestParameters);
- ///
- /// GET request to the cluster.pending_tasks API, read more about this API online:
- ///
- /// https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///
- public Task PendingTasksAsync(IClusterPendingTasksRequest request, CancellationToken ct = default) => DoRequestAsync(request, request.RequestParameters, ct);
///
/// POST request to the cluster.post_voting_config_exclusions API, read more about this API online:
///
diff --git a/src/OpenSearch.Client/Requests.Cluster.cs b/src/OpenSearch.Client/Requests.Cluster.cs
index 9a81b38dba..70003d7e18 100644
--- a/src/OpenSearch.Client/Requests.Cluster.cs
+++ b/src/OpenSearch.Client/Requests.Cluster.cs
@@ -58,42 +58,6 @@
// ReSharper disable RedundantNameQualifier
namespace OpenSearch.Client.Specification.ClusterApi
{
- [InterfaceDataContract]
- public partial interface IClusterPendingTasksRequest : IRequest
- {
- }
-
- ///Request for PendingTasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- public partial class ClusterPendingTasksRequest : PlainRequestBase, IClusterPendingTasksRequest
- {
- protected IClusterPendingTasksRequest Self => this;
- internal override ApiUrls ApiUrls => ApiUrlsLookups.ClusterPendingTasks;
- // values part of the url path
- // Request parameters
- ///Return local information, do not retrieve the state from cluster_manager node (default: false)
- public bool? Local
- {
- get => Q("local");
- set => Q("local", value);
- }
-
- ///Specify timeout for connection to master node
- ///Deprecated as of OpenSearch 2.0, use instead
- public Time MasterTimeout
- {
- get => Q
public partial class LowLevelClusterNamespace : NamespacedClientProxy
{
- ///GET on /_cluster/pending_tasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- public TResponse PendingTasks(ClusterPendingTasksRequestParameters requestParameters = null)
- where TResponse : class, IOpenSearchResponse, new() => DoRequest(GET, "_cluster/pending_tasks", null, RequestParams(requestParameters));
- ///GET on /_cluster/pending_tasks https://opensearch.org/docs/latest/opensearch/rest-api/cat/cat-pending-tasks/
- ///Request specific configuration such as querystring parameters & request specific connection settings.
- [MapsApi("cluster.pending_tasks", "")]
- public Task PendingTasksAsync(ClusterPendingTasksRequestParameters requestParameters = null, CancellationToken ctx = default)
- where TResponse : class, IOpenSearchResponse, new() => DoRequestAsync(GET, "_cluster/pending_tasks", ctx, null, RequestParams(requestParameters));
///POST on /_cluster/voting_config_exclusions
///Request specific configuration such as querystring parameters & request specific connection settings.
public TResponse PostVotingConfigExclusions(PostVotingConfigExclusionsRequestParameters requestParameters = null)
diff --git a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs
index 9a904d0678..26f58529a6 100644
--- a/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs
+++ b/src/OpenSearch.Net/_Generated/Api/RequestParameters/RequestParameters.Cluster.cs
@@ -336,4 +336,37 @@ public WaitForStatus? WaitForStatus
set => Q("wait_for_status", value);
}
}
+
+ ///Request options for PendingTasks https://opensearch.org/docs/latest
+ public partial class ClusterPendingTasksRequestParameters
+ : RequestParameters
+ {
+ public override HttpMethod DefaultHttpMethod => HttpMethod.GET;
+ public override bool SupportsBody => false;
+
+ ///Operation timeout for connection to cluster-manager node.
+ ///Supported by OpenSearch servers of version 2.0.0 or greater.
+ public TimeSpan ClusterManagerTimeout
+ {
+ get => Q("cluster_manager_timeout");
+ set => Q("cluster_manager_timeout", value);
+ }
+
+ ///Return local information, do not retrieve the state from cluster-manager node.
+ public bool? Local
+ {
+ get => Q("local");
+ set => Q("local", value);
+ }
+
+ ///Operation timeout for connection to master node.
+ [Obsolete(
+ "Deprecated as of: 2.0.0, reason: To promote inclusive language, use 'cluster_manager_timeout' instead."
+ )]
+ public TimeSpan MasterTimeout
+ {
+ get => Q("master_timeout");
+ set => Q("master_timeout", value);
+ }
+ }
}
diff --git a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs
index 454f8c56fa..7ac0a0c5b6 100644
--- a/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs
+++ b/src/OpenSearch.Net/_Generated/OpenSearchLowLevelClient.Cluster.cs
@@ -337,5 +337,34 @@ public Task HealthAsync(
null,
RequestParams(requestParameters)
);
+
+ ///GET on /_cluster/pending_tasks https://opensearch.org/docs/latest
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ public TResponse PendingTasks(
+ ClusterPendingTasksRequestParameters requestParameters = null
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequest(
+ GET,
+ "_cluster/pending_tasks",
+ null,
+ RequestParams(requestParameters)
+ );
+
+ ///GET on /_cluster/pending_tasks https://opensearch.org/docs/latest
+ ///Request specific configuration such as querystring parameters & request specific connection settings.
+ [MapsApi("cluster.pending_tasks", "")]
+ public Task PendingTasksAsync(
+ ClusterPendingTasksRequestParameters requestParameters = null,
+ CancellationToken ctx = default
+ )
+ where TResponse : class, IOpenSearchResponse, new() =>
+ DoRequestAsync(
+ GET,
+ "_cluster/pending_tasks",
+ ctx,
+ null,
+ RequestParams(requestParameters)
+ );
}
}