diff --git a/src/ApiGenerator/RestSpecification/Core/cluster.delete_component_template.json b/src/ApiGenerator/RestSpecification/Core/cluster.delete_component_template.json index 9beea52c86b..25ed4d18a97 100644 --- a/src/ApiGenerator/RestSpecification/Core/cluster.delete_component_template.json +++ b/src/ApiGenerator/RestSpecification/Core/cluster.delete_component_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description":"Deletes a component template" }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/cluster.exists_component_template.json b/src/ApiGenerator/RestSpecification/Core/cluster.exists_component_template.json index cc048ded45e..e7dc28fc572 100644 --- a/src/ApiGenerator/RestSpecification/Core/cluster.exists_component_template.json +++ b/src/ApiGenerator/RestSpecification/Core/cluster.exists_component_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description":"Returns information about whether a particular component template exist" }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/cluster.get_component_template.json b/src/ApiGenerator/RestSpecification/Core/cluster.get_component_template.json index ecf32f50c0a..402bbdef44e 100644 --- a/src/ApiGenerator/RestSpecification/Core/cluster.get_component_template.json +++ b/src/ApiGenerator/RestSpecification/Core/cluster.get_component_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description":"Returns one or more component templates" }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/cluster.put_component_template.json b/src/ApiGenerator/RestSpecification/Core/cluster.put_component_template.json index abc83fb15f4..780939cbde5 100644 --- a/src/ApiGenerator/RestSpecification/Core/cluster.put_component_template.json +++ b/src/ApiGenerator/RestSpecification/Core/cluster.put_component_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html", "description":"Creates or updates a component template" }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/indices.delete_index_template.json b/src/ApiGenerator/RestSpecification/Core/indices.delete_index_template.json index d037b03dc52..60225667d37 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.delete_index_template.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.delete_index_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description":"Deletes an index template." }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/indices.exists_index_template.json b/src/ApiGenerator/RestSpecification/Core/indices.exists_index_template.json index c5312680fa8..99471c50dee 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.exists_index_template.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.exists_index_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description":"Returns information about whether a particular index template exists." }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/indices.get_index_template.json b/src/ApiGenerator/RestSpecification/Core/indices.get_index_template.json index 7ea6dd2944c..870eeaea085 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.get_index_template.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.get_index_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description":"Returns an index template." }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/indices.put_index_template.json b/src/ApiGenerator/RestSpecification/Core/indices.put_index_template.json index 3f758e18737..b06df4733a5 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.put_index_template.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.put_index_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description":"Creates or updates an index template." }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/indices.simulate_index_template.json b/src/ApiGenerator/RestSpecification/Core/indices.simulate_index_template.json index 2b81572f0aa..889310e9771 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.simulate_index_template.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.simulate_index_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description": "Simulate matching the given index name against the index templates in the system" }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/Core/indices.simulate_template.json b/src/ApiGenerator/RestSpecification/Core/indices.simulate_template.json index 364547dd318..2511ca637e6 100644 --- a/src/ApiGenerator/RestSpecification/Core/indices.simulate_template.json +++ b/src/ApiGenerator/RestSpecification/Core/indices.simulate_template.json @@ -4,7 +4,7 @@ "url":"https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html", "description": "Simulate resolving the given template name or body" }, - "stability":"experimental", + "stability":"stable", "url":{ "paths":[ { diff --git a/src/ApiGenerator/RestSpecification/XPack/ml.upgrade_job_snapshot.json b/src/ApiGenerator/RestSpecification/XPack/ml.upgrade_job_snapshot.json new file mode 100644 index 00000000000..d8b7bfdada2 --- /dev/null +++ b/src/ApiGenerator/RestSpecification/XPack/ml.upgrade_job_snapshot.json @@ -0,0 +1,41 @@ +{ + "ml.upgrade_job_snapshot":{ + "documentation":{ + "url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html", + "description":"Upgrades a given job snapshot to the current major version." + }, + "stability":"stable", + "url":{ + "paths":[ + { + "path":"/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade", + "methods":[ + "POST" + ], + "parts":{ + "job_id":{ + "type":"string", + "description":"The ID of the job" + }, + "snapshot_id":{ + "type":"string", + "description":"The ID of the snapshot" + } + } + } + ] + }, + "params":{ + "timeout":{ + "type":"time", + "required":false, + "description":"How long should the API wait for the job to be opened and the old snapshot to be loaded." + }, + "wait_for_completion":{ + "type":"boolean", + "required":false, + "description":"Should the request wait until the task is complete before responding to the caller. Default is false." + } + } + } +} diff --git a/src/ApiGenerator/last_downloaded_version.txt b/src/ApiGenerator/last_downloaded_version.txt index 57cfe1179a0..9bc66e24133 100644 --- a/src/ApiGenerator/last_downloaded_version.txt +++ b/src/ApiGenerator/last_downloaded_version.txt @@ -1 +1 @@ -1df6eab9e33dadeaaf826f551bad5f5367aa62b2 \ No newline at end of file +0d2af7b75c8d638ec784d632230f38fe3a4971bc \ No newline at end of file diff --git a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs index e18acd55394..cd2d921e8e2 100644 --- a/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs +++ b/src/Elasticsearch.Net/Api/RequestParameters/RequestParameters.MachineLearning.cs @@ -1011,6 +1011,26 @@ public class UpdateModelSnapshotRequestParameters : RequestParameters true; } + ///Request options for UpgradeJobSnapshot https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html + public class UpgradeJobSnapshotRequestParameters : RequestParameters + { + public override HttpMethod DefaultHttpMethod => HttpMethod.POST; + public override bool SupportsBody => false; + ///How long should the API wait for the job to be opened and the old snapshot to be loaded. + public TimeSpan Timeout + { + get => Q("timeout"); + set => Q("timeout", value); + } + + ///Should the request wait until the task is complete before responding to the caller. Default is false. + public bool? WaitForCompletion + { + get => Q("wait_for_completion"); + set => Q("wait_for_completion", value); + } + } + ///Request options for ValidateJob https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html public class ValidateJobRequestParameters : RequestParameters { diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs index cae732fa14b..486bc6b4ec0 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Cluster.cs @@ -57,13 +57,11 @@ public Task AllocationExplainAsync(PostData body, ClusterA ///DELETE on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse DeleteComponentTemplate(string name, DeleteComponentTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_component_template/{name:name}"), null, RequestParams(requestParameters)); ///DELETE on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("cluster.delete_component_template", "name")] public Task DeleteComponentTemplateAsync(string name, DeleteComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters)); @@ -79,37 +77,31 @@ public Task DeleteVotingConfigExclusionsAsync(DeleteVoting ///HEAD on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse ExistsComponentTemplate(string name, ExistsComponentTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"_component_template/{name:name}"), null, RequestParams(requestParameters)); ///HEAD on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("cluster.exists_component_template", "name")] public Task ExistsComponentTemplateAsync(string name, ExistsComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters)); ///GET on /_component_template https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse GetComponentTemplate(GetComponentTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_component_template", null, RequestParams(requestParameters)); ///GET on /_component_template https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("cluster.get_component_template", "")] public Task GetComponentTemplateAsync(GetComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_component_template", ctx, null, RequestParams(requestParameters)); ///GET on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The comma separated names of the component templates ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse GetComponentTemplate(string name, GetComponentTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_component_template/{name:name}"), null, RequestParams(requestParameters)); ///GET on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The comma separated names of the component templates ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("cluster.get_component_template", "name")] public Task GetComponentTemplateAsync(string name, GetComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_component_template/{name:name}"), ctx, null, RequestParams(requestParameters)); @@ -164,14 +156,12 @@ public Task PostVotingConfigExclusionsAsync(PostVotingConf ///The name of the template ///The template definition ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse PutComponentTemplate(string name, PostData body, PutComponentTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_component_template/{name:name}"), body, RequestParams(requestParameters)); ///PUT on /_component_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-template.html ///The name of the template ///The template definition ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("cluster.put_component_template", "name, body")] public Task PutComponentTemplateAsync(string name, PostData body, PutComponentTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_component_template/{name:name}"), ctx, body, RequestParams(requestParameters)); diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs index f8da20f3637..7afae619a48 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.Indices.cs @@ -208,13 +208,11 @@ public Task DeleteDataStreamForAllAsync(string name, Delet ///DELETE on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse DeleteTemplateV2ForAll(string name, DeleteIndexTemplateV2RequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(DELETE, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters)); ///DELETE on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.delete_index_template", "name")] public Task DeleteTemplateV2ForAllAsync(string name, DeleteIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(DELETE, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters)); @@ -267,13 +265,11 @@ public Task AliasExistsAsync(string index, string name, Al ///HEAD on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse ExistsTemplateForAll(string name, ExistsIndexTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(HEAD, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters)); ///HEAD on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the template ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.exists_index_template", "name")] public Task ExistsTemplateForAllAsync(string name, ExistsIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(HEAD, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters)); @@ -509,25 +505,21 @@ public Task GetFieldMappingUsingTypeAsync(string index, st where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"{index:index}/_mapping/{type:type}/field/{fields:fields}"), ctx, null, RequestParams(requestParameters)); ///GET on /_index_template https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse GetTemplateV2ForAll(GetIndexTemplateV2RequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, "_index_template", null, RequestParams(requestParameters)); ///GET on /_index_template https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.get_index_template", "")] public Task GetTemplateV2ForAllAsync(GetIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, "_index_template", ctx, null, RequestParams(requestParameters)); ///GET on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The comma separated names of the index templates ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse GetTemplateV2ForAll(string name, GetIndexTemplateV2RequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(GET, Url($"_index_template/{name:name}"), null, RequestParams(requestParameters)); ///GET on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The comma separated names of the index templates ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.get_index_template", "name")] public Task GetTemplateV2ForAllAsync(string name, GetIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(GET, Url($"_index_template/{name:name}"), ctx, null, RequestParams(requestParameters)); @@ -673,14 +665,12 @@ public Task PutAliasAsync(string index, string name, PostD ///The name of the template ///The template definition ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse PutTemplateV2ForAll(string name, PostData body, PutIndexTemplateV2RequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(PUT, Url($"_index_template/{name:name}"), body, RequestParams(requestParameters)); ///PUT on /_index_template/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the template ///The template definition ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.put_index_template", "name, body")] public Task PutTemplateV2ForAllAsync(string name, PostData body, PutIndexTemplateV2RequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(PUT, Url($"_index_template/{name:name}"), ctx, body, RequestParams(requestParameters)); @@ -917,27 +907,23 @@ public Task ShrinkAsync(string index, string target, PostD ///The name of the index (it must be a concrete index name) ///New index template definition, which will be included in the simulation, as if it already exists in the system ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse SimulateIndexTemplateForAll(string name, PostData body, SimulateIndexTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_index_template/_simulate_index/{name:name}"), body, RequestParams(requestParameters)); ///POST on /_index_template/_simulate_index/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the index (it must be a concrete index name) ///New index template definition, which will be included in the simulation, as if it already exists in the system ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.simulate_index_template", "name, body")] public Task SimulateIndexTemplateForAllAsync(string name, PostData body, SimulateIndexTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_index_template/_simulate_index/{name:name}"), ctx, body, RequestParams(requestParameters)); ///POST on /_index_template/_simulate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///New index template definition to be simulated, if no index template name is specified ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse SimulateTemplateForAll(PostData body, SimulateTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, "_index_template/_simulate", body, RequestParams(requestParameters)); ///POST on /_index_template/_simulate https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///New index template definition to be simulated, if no index template name is specified ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.simulate_template", "body")] public Task SimulateTemplateForAllAsync(PostData body, SimulateTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, "_index_template/_simulate", ctx, body, RequestParams(requestParameters)); @@ -945,14 +931,12 @@ public Task SimulateTemplateForAllAsync(PostData body, Sim ///The name of the index template ///New index template definition to be simulated, if no index template name is specified ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. public TResponse SimulateTemplateForAll(string name, PostData body, SimulateTemplateRequestParameters requestParameters = null) where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_index_template/_simulate/{name:name}"), body, RequestParams(requestParameters)); ///POST on /_index_template/_simulate/{name} https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html ///The name of the index template ///New index template definition to be simulated, if no index template name is specified ///Request specific configuration such as querystring parameters & request specific connection settings. - ///Note: Experimental within the Elasticsearch server, this functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. This functionality is subject to potential breaking changes within a minor version, meaning that your referencing code may break when this library is upgraded. [MapsApi("indices.simulate_template", "name, body")] public Task SimulateTemplateForAllAsync(string name, PostData body, SimulateTemplateRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_index_template/_simulate/{name:name}"), ctx, body, RequestParams(requestParameters)); diff --git a/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs b/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs index a9547d53986..a58b50a629f 100644 --- a/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs +++ b/src/Elasticsearch.Net/ElasticLowLevelClient.MachineLearning.cs @@ -946,6 +946,19 @@ public TResponse UpdateModelSnapshot(string jobId, string snapshotId, [MapsApi("ml.update_model_snapshot", "job_id, snapshot_id, body")] public Task UpdateModelSnapshotAsync(string jobId, string snapshotId, PostData body, UpdateModelSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}/_update"), ctx, body, RequestParams(requestParameters)); + ///POST on /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html + ///The ID of the job + ///The ID of the snapshot + ///Request specific configuration such as querystring parameters & request specific connection settings. + public TResponse UpgradeJobSnapshot(string jobId, string snapshotId, UpgradeJobSnapshotRequestParameters requestParameters = null) + where TResponse : class, IElasticsearchResponse, new() => DoRequest(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}/_upgrade"), null, RequestParams(requestParameters)); + ///POST on /_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_upgrade https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-upgrade-job-model-snapshot.html + ///The ID of the job + ///The ID of the snapshot + ///Request specific configuration such as querystring parameters & request specific connection settings. + [MapsApi("ml.upgrade_job_snapshot", "job_id, snapshot_id")] + public Task UpgradeJobSnapshotAsync(string jobId, string snapshotId, UpgradeJobSnapshotRequestParameters requestParameters = null, CancellationToken ctx = default) + where TResponse : class, IElasticsearchResponse, new() => DoRequestAsync(POST, Url($"_ml/anomaly_detectors/{jobId:jobId}/model_snapshots/{snapshotId:snapshotId}/_upgrade"), ctx, null, RequestParams(requestParameters)); ///POST on /_ml/anomaly_detectors/_validate https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html ///The job config ///Request specific configuration such as querystring parameters & request specific connection settings.