elasticsearch-serverless 0.0.9.20231031.pre → 0.1.0.20231031.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/elasticsearch-serverless/api/indices/delete_data_lifecycle.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +56 -0
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +55 -0
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +60 -0
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +69 -0
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +53 -0
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +51 -0
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +61 -0
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +65 -0
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +54 -0
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +66 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +57 -0
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +53 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +51 -0
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +66 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +62 -0
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +61 -0
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +63 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +58 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +54 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +61 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +56 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +57 -0
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +59 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +55 -0
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +55 -0
- data/lib/elasticsearch-serverless/api/rank_eval.rb +60 -0
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +0 -4
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +0 -4
- data/lib/elasticsearch-serverless/api.rb +3 -3
- data/lib/elasticsearch-serverless/version.rb +1 -1
- metadata +72 -5
@@ -0,0 +1,53 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Deletes a filter.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :filter_id A string that uniquely identifies a filter. (*Required*)
|
28
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html
|
31
|
+
#
|
32
|
+
def delete_filter(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = nil
|
39
|
+
|
40
|
+
_filter_id = arguments.delete(:filter_id)
|
41
|
+
|
42
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
43
|
+
path = "_ml/filters/#{Utils.listify(_filter_id)}"
|
44
|
+
params = {}
|
45
|
+
|
46
|
+
ElasticsearchServerless::API::Response.new(
|
47
|
+
perform_request(method, path, params, body, headers)
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Deletes an existing anomaly detection job.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*)
|
28
|
+
# @option arguments [Boolean] :force Use to forcefully delete an opened job; this method is quicker than closing and deleting the job.
|
29
|
+
# @option arguments [Boolean] :delete_user_annotations Specifies whether annotations that have been added by the user should be deleted along with any auto-generated annotations when the job is reset.
|
30
|
+
# @option arguments [Boolean] :wait_for_completion Specifies whether the request should return immediately or wait until the job deletion completes. Server default: true.
|
31
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
32
|
+
#
|
33
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html
|
34
|
+
#
|
35
|
+
def delete_job(arguments = {})
|
36
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
37
|
+
|
38
|
+
arguments = arguments.clone
|
39
|
+
headers = arguments.delete(:headers) || {}
|
40
|
+
|
41
|
+
body = nil
|
42
|
+
|
43
|
+
_job_id = arguments.delete(:job_id)
|
44
|
+
|
45
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
46
|
+
path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}"
|
47
|
+
params = Utils.process_params(arguments)
|
48
|
+
|
49
|
+
ElasticsearchServerless::API::Response.new(
|
50
|
+
perform_request(method, path, params, body, headers)
|
51
|
+
)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Deletes an existing trained inference model that is currently not referenced by an ingest pipeline.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
|
28
|
+
# @option arguments [Boolean] :force Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models.html
|
32
|
+
#
|
33
|
+
def delete_trained_model(arguments = {})
|
34
|
+
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
35
|
+
|
36
|
+
arguments = arguments.clone
|
37
|
+
headers = arguments.delete(:headers) || {}
|
38
|
+
|
39
|
+
body = nil
|
40
|
+
|
41
|
+
_model_id = arguments.delete(:model_id)
|
42
|
+
|
43
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
44
|
+
path = "_ml/trained_models/#{Utils.listify(_model_id)}"
|
45
|
+
params = Utils.process_params(arguments)
|
46
|
+
|
47
|
+
ElasticsearchServerless::API::Response.new(
|
48
|
+
perform_request(method, path, params, body, headers)
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Deletes a model alias that refers to the trained model
|
26
|
+
#
|
27
|
+
# @option arguments [String] :model_alias The model alias to delete. (*Required*)
|
28
|
+
# @option arguments [String] :model_id The trained model ID to which the model alias refers. (*Required*)
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
#
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-trained-models-aliases.html
|
32
|
+
#
|
33
|
+
def delete_trained_model_alias(arguments = {})
|
34
|
+
raise ArgumentError, "Required argument 'model_id' missing" unless arguments[:model_id]
|
35
|
+
raise ArgumentError, "Required argument 'model_alias' missing" unless arguments[:model_alias]
|
36
|
+
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = nil
|
41
|
+
|
42
|
+
_model_alias = arguments.delete(:model_alias)
|
43
|
+
|
44
|
+
_model_id = arguments.delete(:model_id)
|
45
|
+
|
46
|
+
method = ElasticsearchServerless::API::HTTP_DELETE
|
47
|
+
path = "_ml/trained_models/#{Utils.listify(_model_id)}/model_aliases/#{Utils.listify(_model_alias)}"
|
48
|
+
params = {}
|
49
|
+
|
50
|
+
ElasticsearchServerless::API::Response.new(
|
51
|
+
perform_request(method, path, params, body, headers)
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Estimates the model memory
|
26
|
+
#
|
27
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
28
|
+
# @option arguments [Hash] :body request body
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html
|
31
|
+
#
|
32
|
+
def estimate_model_memory(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = arguments.delete(:body)
|
39
|
+
|
40
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
41
|
+
path = "_ml/anomaly_detectors/_estimate_model_memory"
|
42
|
+
params = {}
|
43
|
+
|
44
|
+
ElasticsearchServerless::API::Response.new(
|
45
|
+
perform_request(method, path, params, body, headers)
|
46
|
+
)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Evaluates the data frame analytics for an annotated index.
|
26
|
+
#
|
27
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
28
|
+
# @option arguments [Hash] :body request body
|
29
|
+
#
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/evaluate-dfanalytics.html
|
31
|
+
#
|
32
|
+
def evaluate_data_frame(arguments = {})
|
33
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
34
|
+
|
35
|
+
arguments = arguments.clone
|
36
|
+
headers = arguments.delete(:headers) || {}
|
37
|
+
|
38
|
+
body = arguments.delete(:body)
|
39
|
+
|
40
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
41
|
+
path = "_ml/data_frame/_evaluate"
|
42
|
+
params = {}
|
43
|
+
|
44
|
+
ElasticsearchServerless::API::Response.new(
|
45
|
+
perform_request(method, path, params, body, headers)
|
46
|
+
)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Forces any buffered data to be processed by the job.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :job_id Identifier for the anomaly detection job. (*Required*)
|
28
|
+
# @option arguments [String, Time] :advance_time Specifies to advance to a particular time value. Results are generated and the model is updated for data from the specified time interval.
|
29
|
+
# @option arguments [Boolean] :calc_interim If true, calculates the interim results for the most recent bucket or all buckets within the latency period.
|
30
|
+
# @option arguments [String, Time] :end When used in conjunction with +calc_interim+ and +start+, specifies the range of buckets on which to calculate interim results.
|
31
|
+
# @option arguments [String, Time] :skip_time Specifies to skip to a particular time value. Results are not generated and the model is not updated for data from the specified time interval.
|
32
|
+
# @option arguments [String, Time] :start When used in conjunction with +calc_interim+, specifies the range of buckets on which to calculate interim results.
|
33
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
34
|
+
# @option arguments [Hash] :body request body
|
35
|
+
#
|
36
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html
|
37
|
+
#
|
38
|
+
def flush_job(arguments = {})
|
39
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
40
|
+
|
41
|
+
arguments = arguments.clone
|
42
|
+
headers = arguments.delete(:headers) || {}
|
43
|
+
|
44
|
+
body = arguments.delete(:body)
|
45
|
+
|
46
|
+
_job_id = arguments.delete(:job_id)
|
47
|
+
|
48
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
49
|
+
path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/_flush"
|
50
|
+
params = Utils.process_params(arguments)
|
51
|
+
|
52
|
+
ElasticsearchServerless::API::Response.new(
|
53
|
+
perform_request(method, path, params, body, headers)
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Retrieves information about the scheduled events in calendars.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using +_all+ or +*+ or by omitting the calendar identifier. (*Required*)
|
28
|
+
# @option arguments [String, Time] :end Specifies to get events with timestamps earlier than this time.
|
29
|
+
# @option arguments [Integer] :from Skips the specified number of events. Server default: 0.
|
30
|
+
# @option arguments [String] :job_id Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of +_all+ or +*+.
|
31
|
+
# @option arguments [Integer] :size Specifies the maximum number of events to obtain. Server default: 100.
|
32
|
+
# @option arguments [String, Time] :start Specifies to get events with timestamps after this time.
|
33
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html
|
36
|
+
#
|
37
|
+
def get_calendar_events(arguments = {})
|
38
|
+
raise ArgumentError, "Required argument 'calendar_id' missing" unless arguments[:calendar_id]
|
39
|
+
|
40
|
+
arguments = arguments.clone
|
41
|
+
headers = arguments.delete(:headers) || {}
|
42
|
+
|
43
|
+
body = nil
|
44
|
+
|
45
|
+
_calendar_id = arguments.delete(:calendar_id)
|
46
|
+
|
47
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
48
|
+
path = "_ml/calendars/#{Utils.listify(_calendar_id)}/events"
|
49
|
+
params = Utils.process_params(arguments)
|
50
|
+
|
51
|
+
ElasticsearchServerless::API::Response.new(
|
52
|
+
perform_request(method, path, params, body, headers)
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Retrieves configuration information for calendars.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using +_all+ or +*+ or by omitting the calendar identifier.
|
28
|
+
# @option arguments [Integer] :from Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. Server default: 0.
|
29
|
+
# @option arguments [Integer] :size Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier. Server default: 10000.
|
30
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
31
|
+
# @option arguments [Hash] :body request body
|
32
|
+
#
|
33
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html
|
34
|
+
#
|
35
|
+
def get_calendars(arguments = {})
|
36
|
+
arguments = arguments.clone
|
37
|
+
headers = arguments.delete(:headers) || {}
|
38
|
+
|
39
|
+
body = arguments.delete(:body)
|
40
|
+
|
41
|
+
_calendar_id = arguments.delete(:calendar_id)
|
42
|
+
|
43
|
+
method = if body
|
44
|
+
ElasticsearchServerless::API::HTTP_POST
|
45
|
+
else
|
46
|
+
ElasticsearchServerless::API::HTTP_GET
|
47
|
+
end
|
48
|
+
|
49
|
+
path = if _calendar_id
|
50
|
+
"_ml/calendars/#{Utils.listify(_calendar_id)}"
|
51
|
+
else
|
52
|
+
"_ml/calendars"
|
53
|
+
end
|
54
|
+
params = Utils.process_params(arguments)
|
55
|
+
|
56
|
+
ElasticsearchServerless::API::Response.new(
|
57
|
+
perform_request(method, path, params, body, headers)
|
58
|
+
)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Retrieves configuration information for data frame analytics jobs.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this option, the API returns information for the first hundred data frame analytics jobs.
|
28
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the +_all+ string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value returns an empty data_frame_analytics array when there are no matches and the subset of results when there are partial matches. If this parameter is +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
|
29
|
+
# @option arguments [Integer] :from Skips the specified number of data frame analytics jobs. Server default: 0.
|
30
|
+
# @option arguments [Integer] :size Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100.
|
31
|
+
# @option arguments [Boolean] :exclude_generated Indicates if certain fields should be removed from the configuration on retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics.html
|
35
|
+
#
|
36
|
+
def get_data_frame_analytics(arguments = {})
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = nil
|
41
|
+
|
42
|
+
_id = arguments.delete(:id)
|
43
|
+
|
44
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
45
|
+
path = if _id
|
46
|
+
"_ml/data_frame/analytics/#{Utils.listify(_id)}"
|
47
|
+
else
|
48
|
+
"_ml/data_frame/analytics"
|
49
|
+
end
|
50
|
+
params = Utils.process_params(arguments)
|
51
|
+
|
52
|
+
ElasticsearchServerless::API::Response.new(
|
53
|
+
perform_request(method, path, params, body, headers)
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module MachineLearning
|
24
|
+
module Actions
|
25
|
+
# Retrieves usage information for data frame analytics jobs.
|
26
|
+
#
|
27
|
+
# @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this option, the API returns information for the first hundred data frame analytics jobs.
|
28
|
+
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: 1. Contains wildcard expressions and there are no data frame analytics jobs that match. 2. Contains the +_all+ string or no identifiers and there are no matches. 3. Contains wildcard expressions and there are only partial matches. The default value returns an empty data_frame_analytics array when there are no matches and the subset of results when there are partial matches. If this parameter is +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.
|
29
|
+
# @option arguments [Integer] :from Skips the specified number of data frame analytics jobs. Server default: 0.
|
30
|
+
# @option arguments [Integer] :size Specifies the maximum number of data frame analytics jobs to obtain. Server default: 100.
|
31
|
+
# @option arguments [Boolean] :verbose Defines whether the stats response should be verbose.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-dfanalytics-stats.html
|
35
|
+
#
|
36
|
+
def get_data_frame_analytics_stats(arguments = {})
|
37
|
+
arguments = arguments.clone
|
38
|
+
headers = arguments.delete(:headers) || {}
|
39
|
+
|
40
|
+
body = nil
|
41
|
+
|
42
|
+
_id = arguments.delete(:id)
|
43
|
+
|
44
|
+
method = ElasticsearchServerless::API::HTTP_GET
|
45
|
+
path = if _id
|
46
|
+
"_ml/data_frame/analytics/#{Utils.listify(_id)}/_stats"
|
47
|
+
else
|
48
|
+
"_ml/data_frame/analytics/_stats"
|
49
|
+
end
|
50
|
+
params = Utils.process_params(arguments)
|
51
|
+
|
52
|
+
ElasticsearchServerless::API::Response.new(
|
53
|
+
perform_request(method, path, params, body, headers)
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|