elasticsearch-xpack 7.16.1 → 7.16.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2173e26141bb5ca03ffd6eb505ff5b548598e6c1350a71b10b96a313e9d9583
4
- data.tar.gz: 3aec5794efa36943d141c4e778188d310c1a7138cf92a4f897b8e7727d40223f
3
+ metadata.gz: 0646e96e6268275bc5915d29aac996ac07b6c6c351e8c7952a894982a1d324e4
4
+ data.tar.gz: e8f537bb410187270f4a2c15d2adfe73d508ad58f90bd93088f485460968886c
5
5
  SHA512:
6
- metadata.gz: a5ebde05b66aa8afd82b52d9f74acd7fc5861c0864d1b4974968aa4bacccbb4a21198fbf314c068fb8eabb967ecfc8c0f820f8051edb13064ead0b9fd1ad08e0
7
- data.tar.gz: 52d41b1bd113b5860bb4954d5ea56ecb29dc11509a62185972cc21bdb8d9b388c800c4f2391837b5e59771e81c2c215ec44d02cd62d97f37cc1f52dc33bd1c29
6
+ metadata.gz: 4d22489f77d5a54b8615cf4aa2587317812fd1da727520aafa0e8843f0170d5dfae78346403c226f88c9f168e99f71cfc0fe8e80888fddcab88d73335ffcb957
7
+ data.tar.gz: '096746637b152c4dbea0be403aaf0f26937dbd3a71015ba37e6b82ee6a5d7cd9df6b804471f7e69a3e174f5aa4495f033bf5b34e80830f932cc8513734aef051'
@@ -27,6 +27,7 @@ module Elasticsearch
27
27
  # @option arguments [Time] :expires_in The time interval after which the forecast expires. Expired forecasts will be deleted at the first opportunity.
28
28
  # @option arguments [String] :max_model_memory The max memory able to be used by the forecast. Default is 20mb.
29
29
  # @option arguments [Hash] :headers Custom HTTP headers
30
+ # @option arguments [Hash] :body Query parameters can be specified in the body
30
31
  #
31
32
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.16/ml-forecast.html
32
33
  #
@@ -43,7 +44,7 @@ module Elasticsearch
43
44
  path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_forecast"
44
45
  params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
45
46
 
46
- body = nil
47
+ body = arguments[:body]
47
48
  perform_request(method, path, params, body, headers).body
48
49
  end
49
50
 
@@ -0,0 +1,62 @@
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
+ module Elasticsearch
19
+ module XPack
20
+ module API
21
+ module MachineLearning
22
+ module Actions
23
+ # Gets stats for anomaly detection job model snapshot upgrades that are in progress.
24
+ #
25
+ # @option arguments [String] :job_id The ID of the job. May be a wildcard, comma separated list or `_all`.
26
+ # @option arguments [String] :snapshot_id The ID of the snapshot. May be a wildcard, comma separated list or `_all`.
27
+ # @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs or no snapshots. (This includes the `_all` string.)
28
+ # @option arguments [Hash] :headers Custom HTTP headers
29
+ #
30
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.16/ml-get-job-model-snapshot-upgrade-stats.html
31
+ #
32
+ def get_model_snapshot_upgrade_stats(arguments = {})
33
+ raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
34
+ raise ArgumentError, "Required argument 'snapshot_id' missing" unless arguments[:snapshot_id]
35
+
36
+ headers = arguments.delete(:headers) || {}
37
+
38
+ arguments = arguments.clone
39
+
40
+ _job_id = arguments.delete(:job_id)
41
+
42
+ _snapshot_id = arguments.delete(:snapshot_id)
43
+
44
+ method = Elasticsearch::API::HTTP_GET
45
+ path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/model_snapshots/#{Elasticsearch::API::Utils.__listify(_snapshot_id)}/_upgrade/_stats"
46
+ params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
47
+
48
+ body = nil
49
+ perform_request(method, path, params, body, headers).body
50
+ end
51
+
52
+ # Register this action with its valid params when the module is loaded.
53
+ #
54
+ # @since 6.2.0
55
+ ParamsRegistry.register(:get_model_snapshot_upgrade_stats, [
56
+ :allow_no_match
57
+ ].freeze)
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
@@ -24,6 +24,7 @@ module Elasticsearch
24
24
  #
25
25
  # @option arguments [String] :job_id The ID of the job to open
26
26
  # @option arguments [Hash] :headers Custom HTTP headers
27
+ # @option arguments [Hash] :body Query parameters can be specified in the body
27
28
  #
28
29
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/7.16/ml-open-job.html
29
30
  #
@@ -40,7 +41,7 @@ module Elasticsearch
40
41
  path = "_ml/anomaly_detectors/#{Elasticsearch::API::Utils.__listify(_job_id)}/_open"
41
42
  params = {}
42
43
 
43
- body = nil
44
+ body = arguments[:body]
44
45
  perform_request(method, path, params, body, headers).body
45
46
  end
46
47
  end
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Elasticsearch
19
19
  module XPack
20
- VERSION = '7.16.1'.freeze
20
+ VERSION = '7.16.3'.freeze
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-xpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.16.1
4
+ version: 7.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karel Minarik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -365,6 +365,7 @@ files:
365
365
  - lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
366
366
  - lib/elasticsearch/xpack/api/actions/machine_learning/get_job_stats.rb
367
367
  - lib/elasticsearch/xpack/api/actions/machine_learning/get_jobs.rb
368
+ - lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb
368
369
  - lib/elasticsearch/xpack/api/actions/machine_learning/get_model_snapshots.rb
369
370
  - lib/elasticsearch/xpack/api/actions/machine_learning/get_overall_buckets.rb
370
371
  - lib/elasticsearch/xpack/api/actions/machine_learning/get_records.rb
@@ -569,7 +570,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
569
570
  - !ruby/object:Gem::Version
570
571
  version: '0'
571
572
  requirements: []
572
- rubygems_version: 3.2.22
573
+ rubygems_version: 3.3.3
573
574
  signing_key:
574
575
  specification_version: 4
575
576
  summary: Ruby integrations for the X-Pack extensions for Elasticsearch