elasticsearch-xpack 5.0.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/elasticsearch-xpack.gemspec +2 -2
- data/lib/elasticsearch/xpack.rb +2 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/close_job.rb +31 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_datafeed.rb +29 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_expired_data.rb +24 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_filter.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_job.rb +29 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/delete_model_snapshot.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/flush_job.rb +36 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_buckets.rb +48 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_categories.rb +33 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeed_stats.rb +25 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_datafeeds.rb +25 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_filters.rb +30 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb +44 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb +25 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb +25 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb +41 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb +44 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/open_job.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/post_data.rb +33 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/preview_datafeed.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_datafeed.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_filter.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/put_job.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/revert_model_snapshot.rb +31 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/start_datafeed.rb +34 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/stop_datafeed.rb +31 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_datafeed.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_job.rb +28 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/update_model_snapshot.rb +30 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/machine_learning/validate_detector.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/security/delete_role_mapping.rb +34 -0
- data/lib/elasticsearch/xpack/api/actions/security/disable_user.rb +33 -0
- data/lib/elasticsearch/xpack/api/actions/security/enable_user.rb +33 -0
- data/lib/elasticsearch/xpack/api/actions/security/get_role_mapping.rb +25 -0
- data/lib/elasticsearch/xpack/api/actions/security/get_token.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/security/invalidate_token.rb +26 -0
- data/lib/elasticsearch/xpack/api/actions/security/put_role_mapping.rb +36 -0
- data/lib/elasticsearch/xpack/api/namespace/machine_learning.rb +20 -0
- data/lib/elasticsearch/xpack/version.rb +1 -1
- metadata +50 -11
@@ -0,0 +1,25 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The ID of the jobs stats to fetch
|
10
|
+
#
|
11
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-get-job-stats.html
|
12
|
+
#
|
13
|
+
def get_job_stats(arguments={})
|
14
|
+
method = Elasticsearch::API::HTTP_GET
|
15
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_stats"
|
16
|
+
params = {}
|
17
|
+
body = nil
|
18
|
+
|
19
|
+
perform_request(method, path, params, body).body
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The ID of the jobs to fetch
|
10
|
+
#
|
11
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-get-job.html
|
12
|
+
#
|
13
|
+
def get_jobs(arguments={})
|
14
|
+
method = Elasticsearch::API::HTTP_GET
|
15
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}"
|
16
|
+
params = {}
|
17
|
+
body = nil
|
18
|
+
|
19
|
+
perform_request(method, path, params, body).body
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The ID of the job to fetch (*Required*)
|
10
|
+
# @option arguments [String] :snapshot_id The ID of the snapshot to fetch
|
11
|
+
# @option arguments [Hash] :body Model snapshot selection criteria
|
12
|
+
# @option arguments [Integer] :from Skips a number of documents
|
13
|
+
# @option arguments [Integer] :size The default number of documents returned in queries as a string.
|
14
|
+
# @option arguments [Date] :start The filter 'start' query parameter
|
15
|
+
# @option arguments [Date] :end The filter 'end' query parameter
|
16
|
+
# @option arguments [String] :sort Name of the field to sort on
|
17
|
+
# @option arguments [Boolean] :desc True if the results should be sorted in descending order
|
18
|
+
#
|
19
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-get-snapshot.html
|
20
|
+
#
|
21
|
+
def get_model_snapshots(arguments={})
|
22
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
23
|
+
valid_params = [
|
24
|
+
:from,
|
25
|
+
:size,
|
26
|
+
:start,
|
27
|
+
:end,
|
28
|
+
:sort,
|
29
|
+
:desc ]
|
30
|
+
method = Elasticsearch::API::HTTP_GET
|
31
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/model_snapshots/#{arguments[:snapshot_id]}"
|
32
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
33
|
+
body = arguments[:body]
|
34
|
+
|
35
|
+
perform_request(method, path, params, body).body
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id [TODO] (*Required*)
|
10
|
+
# @option arguments [Hash] :body Record selection criteria
|
11
|
+
# @option arguments [Boolean] :exclude_interim Exclude interim results
|
12
|
+
# @option arguments [Int] :from skips a number of records
|
13
|
+
# @option arguments [Int] :size specifies a max number of records to get
|
14
|
+
# @option arguments [String] :start Start time filter for records
|
15
|
+
# @option arguments [String] :end End time filter for records
|
16
|
+
# @option arguments [Double] :record_score [TODO]
|
17
|
+
# @option arguments [String] :sort Sort records by a particular field
|
18
|
+
# @option arguments [Boolean] :desc Set the sort direction
|
19
|
+
#
|
20
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-get-record.html
|
21
|
+
#
|
22
|
+
def get_records(arguments={})
|
23
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
24
|
+
valid_params = [
|
25
|
+
:exclude_interim,
|
26
|
+
:from,
|
27
|
+
:size,
|
28
|
+
:start,
|
29
|
+
:end,
|
30
|
+
:record_score,
|
31
|
+
:sort,
|
32
|
+
:desc ]
|
33
|
+
method = Elasticsearch::API::HTTP_GET
|
34
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/results/records"
|
35
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
36
|
+
body = arguments[:body]
|
37
|
+
|
38
|
+
perform_request(method, path, params, body).body
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The ID of the job to open (*Required*)
|
10
|
+
# @option arguments [Boolean] :ignore_downtime Controls if gaps in data are treated as anomalous or as a maintenance window after a job re-start
|
11
|
+
# @option arguments [Time] :timeout Controls the time to wait until a job has opened. Default to 30 minutes
|
12
|
+
#
|
13
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-open-job.html
|
14
|
+
#
|
15
|
+
def open_job(arguments={})
|
16
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
17
|
+
method = Elasticsearch::API::HTTP_POST
|
18
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_open"
|
19
|
+
params = {}
|
20
|
+
body = nil
|
21
|
+
|
22
|
+
perform_request(method, path, params, body).body
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The name of the job receiving the data (*Required*)
|
10
|
+
# @option arguments [Hash] :body The data to process (*Required*)
|
11
|
+
# @option arguments [String] :reset_start Optional parameter to specify the start of the bucket resetting range
|
12
|
+
# @option arguments [String] :reset_end Optional parameter to specify the end of the bucket resetting range
|
13
|
+
#
|
14
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-post-data.html
|
15
|
+
#
|
16
|
+
def post_data(arguments={})
|
17
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
18
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
19
|
+
valid_params = [
|
20
|
+
:reset_start,
|
21
|
+
:reset_end ]
|
22
|
+
method = Elasticsearch::API::HTTP_POST
|
23
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/_data"
|
24
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
25
|
+
body = arguments[:body]
|
26
|
+
|
27
|
+
perform_request(method, path, params, body).body
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :datafeed_id The ID of the datafeed to preview (*Required*)
|
10
|
+
#
|
11
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-preview-datafeed.html
|
12
|
+
#
|
13
|
+
def preview_datafeed(arguments={})
|
14
|
+
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
15
|
+
method = Elasticsearch::API::HTTP_GET
|
16
|
+
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}/_preview"
|
17
|
+
params = {}
|
18
|
+
body = nil
|
19
|
+
|
20
|
+
perform_request(method, path, params, body).body
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :datafeed_id The ID of the datafeed to create (*Required*)
|
10
|
+
# @option arguments [Hash] :body The datafeed config (*Required*)
|
11
|
+
#
|
12
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-put-datafeed.html
|
13
|
+
#
|
14
|
+
def put_datafeed(arguments={})
|
15
|
+
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
16
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
17
|
+
method = Elasticsearch::API::HTTP_PUT
|
18
|
+
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}"
|
19
|
+
params = {}
|
20
|
+
body = arguments[:body]
|
21
|
+
|
22
|
+
perform_request(method, path, params, body).body
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :filter_id The ID of the filter to create (*Required*)
|
10
|
+
# @option arguments [Hash] :body The filter details (*Required*)
|
11
|
+
#
|
12
|
+
# @see [TODO]
|
13
|
+
#
|
14
|
+
def put_filter(arguments={})
|
15
|
+
raise ArgumentError, "Required argument 'filter_id' missing" unless arguments[:filter_id]
|
16
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
17
|
+
method = Elasticsearch::API::HTTP_PUT
|
18
|
+
path = "_xpack/ml/filters/#{arguments[:filter_id]}"
|
19
|
+
params = {}
|
20
|
+
body = arguments[:body]
|
21
|
+
|
22
|
+
perform_request(method, path, params, body).body
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The ID of the job to create (*Required*)
|
10
|
+
# @option arguments [Hash] :body The job (*Required*)
|
11
|
+
#
|
12
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-put-job.html
|
13
|
+
#
|
14
|
+
def put_job(arguments={})
|
15
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
16
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
17
|
+
method = Elasticsearch::API::HTTP_PUT
|
18
|
+
path = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}"
|
19
|
+
params = {}
|
20
|
+
body = arguments[:body]
|
21
|
+
|
22
|
+
perform_request(method, path, params, body).body
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :job_id The ID of the job to fetch (*Required*)
|
10
|
+
# @option arguments [String] :snapshot_id The ID of the snapshot to revert to
|
11
|
+
# @option arguments [Hash] :body Reversion options
|
12
|
+
# @option arguments [Boolean] :delete_intervening_results Should we reset the results back to the time of the snapshot?
|
13
|
+
#
|
14
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-revert-snapshot.html
|
15
|
+
#
|
16
|
+
def revert_model_snapshot(arguments={})
|
17
|
+
raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
|
18
|
+
valid_params = [
|
19
|
+
:delete_intervening_results ]
|
20
|
+
method = Elasticsearch::API::HTTP_POST
|
21
|
+
path = Elasticsearch::API::Utils.__pathify "_xpack/ml/anomaly_detectors", arguments[:job_id], "model_snapshots", arguments[:snapshot_id], "_revert"
|
22
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
23
|
+
body = arguments[:body]
|
24
|
+
|
25
|
+
perform_request(method, path, params, body).body
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :datafeed_id The ID of the datafeed to start (*Required*)
|
10
|
+
# @option arguments [Hash] :body The start datafeed parameters
|
11
|
+
# @option arguments [String] :start The start time from where the datafeed should begin
|
12
|
+
# @option arguments [String] :end The end time when the datafeed should stop. When not set, the datafeed continues in real time
|
13
|
+
# @option arguments [Time] :timeout Controls the time to wait until a datafeed has started. Default to 20 seconds
|
14
|
+
#
|
15
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-start-datafeed.html
|
16
|
+
#
|
17
|
+
def start_datafeed(arguments={})
|
18
|
+
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
19
|
+
valid_params = [
|
20
|
+
:start,
|
21
|
+
:end,
|
22
|
+
:timeout ]
|
23
|
+
method = Elasticsearch::API::HTTP_POST
|
24
|
+
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}/_start"
|
25
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
26
|
+
body = arguments[:body]
|
27
|
+
|
28
|
+
perform_request(method, path, params, body).body
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :datafeed_id The ID of the datafeed to stop (*Required*)
|
10
|
+
# @option arguments [Boolean] :force True if the datafeed should be forcefully stopped.
|
11
|
+
# @option arguments [Time] :timeout Controls the time to wait until a datafeed has stopped. Default to 20 seconds
|
12
|
+
#
|
13
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-stop-datafeed.html
|
14
|
+
#
|
15
|
+
def stop_datafeed(arguments={})
|
16
|
+
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
17
|
+
valid_params = [
|
18
|
+
:force,
|
19
|
+
:timeout ]
|
20
|
+
method = Elasticsearch::API::HTTP_POST
|
21
|
+
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}/_stop"
|
22
|
+
params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
|
23
|
+
body = nil
|
24
|
+
|
25
|
+
perform_request(method, path, params, body).body
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Elasticsearch
|
2
|
+
module XPack
|
3
|
+
module API
|
4
|
+
module MachineLearning
|
5
|
+
module Actions
|
6
|
+
|
7
|
+
# TODO: Description
|
8
|
+
#
|
9
|
+
# @option arguments [String] :datafeed_id The ID of the datafeed to update (*Required*)
|
10
|
+
# @option arguments [Hash] :body The datafeed update settings (*Required*)
|
11
|
+
#
|
12
|
+
# @see http://www.elastic.co/guide/en/x-pack/current/ml-update-datafeed.html
|
13
|
+
#
|
14
|
+
def update_datafeed(arguments={})
|
15
|
+
raise ArgumentError, "Required argument 'datafeed_id' missing" unless arguments[:datafeed_id]
|
16
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
17
|
+
method = Elasticsearch::API::HTTP_POST
|
18
|
+
path = "_xpack/ml/datafeeds/#{arguments[:datafeed_id]}/_update"
|
19
|
+
params = {}
|
20
|
+
body = arguments[:body]
|
21
|
+
|
22
|
+
perform_request(method, path, params, body).body
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|