opensearch-api 2.0.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +28 -0
- data/Gemfile +2 -2
- data/README.md +12 -182
- data/Rakefile +5 -5
- data/USER_GUIDE.md +155 -0
- data/lib/opensearch/api/actions/cat/all_pit_segments.rb +46 -0
- data/lib/opensearch/api/actions/cat/allocation.rb +4 -2
- data/lib/opensearch/api/actions/cat/cluster_manager.rb +54 -0
- data/lib/opensearch/api/actions/cat/indices.rb +4 -2
- data/lib/opensearch/api/actions/cat/master.rb +3 -1
- data/lib/opensearch/api/actions/cat/nodeattrs.rb +4 -2
- data/lib/opensearch/api/actions/cat/nodes.rb +4 -2
- data/lib/opensearch/api/actions/cat/pending_tasks.rb +4 -2
- data/lib/opensearch/api/actions/cat/pit_segments.rb +49 -0
- data/lib/opensearch/api/actions/cat/plugins.rb +4 -2
- data/lib/opensearch/api/actions/cat/repositories.rb +4 -2
- data/lib/opensearch/api/actions/cat/shards.rb +4 -2
- data/lib/opensearch/api/actions/cat/snapshots.rb +3 -1
- data/lib/opensearch/api/actions/cat/templates.rb +4 -2
- data/lib/opensearch/api/actions/cat/thread_pool.rb +4 -2
- data/lib/opensearch/api/actions/cluster/delete_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/exists_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/get_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/get_settings.rb +3 -1
- data/lib/opensearch/api/actions/cluster/health.rb +4 -2
- data/lib/opensearch/api/actions/cluster/pending_tasks.rb +5 -3
- data/lib/opensearch/api/actions/cluster/put_component_template.rb +4 -2
- data/lib/opensearch/api/actions/cluster/put_settings.rb +3 -1
- data/lib/opensearch/api/actions/cluster/reroute.rb +4 -2
- data/lib/opensearch/api/actions/cluster/state.rb +4 -2
- data/lib/opensearch/api/actions/create_pit.rb +45 -0
- data/lib/opensearch/api/actions/dangling_indices/delete_dangling_index.rb +4 -2
- data/lib/opensearch/api/actions/dangling_indices/import_dangling_index.rb +4 -2
- data/lib/opensearch/api/actions/delete_all_pits.rb +26 -0
- data/lib/opensearch/api/actions/delete_pit.rb +30 -0
- data/lib/opensearch/api/actions/delete_script.rb +4 -2
- data/lib/opensearch/api/actions/features/get_features.rb +4 -2
- data/lib/opensearch/api/actions/get_all_pits.rb +26 -0
- data/lib/opensearch/api/actions/get_script.rb +4 -2
- data/lib/opensearch/api/actions/indices/add_block.rb +3 -1
- data/lib/opensearch/api/actions/indices/clone.rb +3 -1
- data/lib/opensearch/api/actions/indices/close.rb +3 -1
- data/lib/opensearch/api/actions/indices/create.rb +4 -2
- data/lib/opensearch/api/actions/indices/delete.rb +3 -1
- data/lib/opensearch/api/actions/indices/delete_alias.rb +4 -2
- data/lib/opensearch/api/actions/indices/delete_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/delete_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/exists_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/exists_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/get.rb +4 -2
- data/lib/opensearch/api/actions/indices/get_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/get_mapping.rb +4 -2
- data/lib/opensearch/api/actions/indices/get_settings.rb +3 -1
- data/lib/opensearch/api/actions/indices/get_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/open.rb +3 -1
- data/lib/opensearch/api/actions/indices/put_alias.rb +4 -2
- data/lib/opensearch/api/actions/indices/put_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/put_mapping.rb +3 -1
- data/lib/opensearch/api/actions/indices/put_settings.rb +3 -1
- data/lib/opensearch/api/actions/indices/put_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/rollover.rb +3 -1
- data/lib/opensearch/api/actions/indices/shrink.rb +3 -1
- data/lib/opensearch/api/actions/indices/simulate_index_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/simulate_template.rb +4 -2
- data/lib/opensearch/api/actions/indices/split.rb +3 -1
- data/lib/opensearch/api/actions/indices/update_aliases.rb +4 -2
- data/lib/opensearch/api/actions/ingest/delete_pipeline.rb +3 -1
- data/lib/opensearch/api/actions/ingest/get_pipeline.rb +4 -2
- data/lib/opensearch/api/actions/ingest/put_pipeline.rb +3 -1
- data/lib/opensearch/api/actions/put_script.rb +3 -1
- data/lib/opensearch/api/actions/search_shards.rb +1 -1
- data/lib/opensearch/api/actions/snapshot/cleanup_repository.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/clone.rb +4 -2
- data/lib/opensearch/api/actions/snapshot/create.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/create_repository.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/delete.rb +4 -2
- data/lib/opensearch/api/actions/snapshot/delete_repository.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/get.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/get_features.rb +4 -2
- data/lib/opensearch/api/actions/snapshot/get_repository.rb +3 -2
- data/lib/opensearch/api/actions/snapshot/restore.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/status.rb +3 -1
- data/lib/opensearch/api/actions/snapshot/verify_repository.rb +3 -1
- data/lib/opensearch/api/utils.rb +4 -4
- data/lib/opensearch/api/version.rb +1 -1
- data/opensearch-api.gemspec +2 -2
- data/spec/opensearch/api/actions/cat/all_pit_segments_spec.rb +36 -0
- data/spec/opensearch/api/actions/cat/allocation_spec.rb +6 -7
- data/spec/opensearch/api/actions/cat/cluster_manager_spec.rb +26 -0
- data/spec/opensearch/api/actions/cat/pit_segments_spec.rb +43 -0
- data/spec/opensearch/api/actions/create_pit_spec.rb +58 -0
- data/spec/opensearch/api/actions/delete_all_pits_spec.rb +35 -0
- data/spec/opensearch/api/actions/delete_pit_spec.rb +41 -0
- data/spec/opensearch/api/actions/get_all_pits_spec.rb +35 -0
- data/spec/opensearch/api/actions/get_script_spec.rb +2 -2
- data/spec/opensearch/api/actions/hashie_spec.rb +0 -2
- data/spec/opensearch/api/actions/indices/clone_spec.rb +2 -2
- data/spec/opensearch/api/utils_spec.rb +6 -6
- data.tar.gz.sig +1 -1
- metadata +40 -23
- metadata.gz.sig +0 -0
- data/lib/opensearch/api/actions/close_point_in_time.rb +0 -50
- data/lib/opensearch/api/actions/open_point_in_time.rb +0 -72
- data/spec/opensearch/api/actions/close_point_in_time_spec.rb +0 -43
- data/spec/opensearch/api/actions/open_point_in_time_spec.rb +0 -53
@@ -31,8 +31,9 @@ module OpenSearch
|
|
31
31
|
# Returns a concise representation of the cluster pending tasks.
|
32
32
|
#
|
33
33
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
34
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
34
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
36
37
|
# @option arguments [List] :h Comma-separated list of column names to display
|
37
38
|
# @option arguments [Boolean] :help Return help information
|
38
39
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
@@ -62,6 +63,7 @@ module OpenSearch
|
|
62
63
|
:format,
|
63
64
|
:local,
|
64
65
|
:master_timeout,
|
66
|
+
:cluster_manager_timeout,
|
65
67
|
:h,
|
66
68
|
:help,
|
67
69
|
:s,
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
#
|
7
|
+
# Modifications Copyright OpenSearch Contributors. See
|
8
|
+
# GitHub history for details.
|
9
|
+
|
10
|
+
module OpenSearch
|
11
|
+
module API
|
12
|
+
module Cat
|
13
|
+
module Actions
|
14
|
+
# Retrieves info of certain PIT segments
|
15
|
+
#
|
16
|
+
# @option arguments [Hash] body: Must include `pit_id`, which is an array of PIT IDs. (required)
|
17
|
+
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
18
|
+
# @option arguments [List] :h Comma-separated list of column names to display
|
19
|
+
# @option arguments [Boolean] :help Return help information
|
20
|
+
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
21
|
+
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
22
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
23
|
+
def pit_segments(arguments = {})
|
24
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
25
|
+
|
26
|
+
arguments = arguments.clone
|
27
|
+
headers = arguments.delete(:headers) || {}
|
28
|
+
|
29
|
+
|
30
|
+
method = OpenSearch::API::HTTP_GET
|
31
|
+
path = '_cat/pit_segments'
|
32
|
+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
33
|
+
params[:h] = Utils.__listify(params[:h]) if params[:h]
|
34
|
+
|
35
|
+
body = arguments[:body]
|
36
|
+
perform_request(method, path, params, body, headers).body
|
37
|
+
end
|
38
|
+
|
39
|
+
ParamsRegistry.register(:pit_segments, [
|
40
|
+
:format,
|
41
|
+
:h,
|
42
|
+
:help,
|
43
|
+
:s,
|
44
|
+
:v
|
45
|
+
].freeze)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -31,8 +31,9 @@ module OpenSearch
|
|
31
31
|
# Returns information about installed plugins across nodes node.
|
32
32
|
#
|
33
33
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
34
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
35
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
34
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
36
37
|
# @option arguments [List] :h Comma-separated list of column names to display
|
37
38
|
# @option arguments [Boolean] :help Return help information
|
38
39
|
# @option arguments [Boolean] :include_bootstrap Include bootstrap plugins in the response
|
@@ -61,6 +62,7 @@ module OpenSearch
|
|
61
62
|
:format,
|
62
63
|
:local,
|
63
64
|
:master_timeout,
|
65
|
+
:cluster_manager_timeout,
|
64
66
|
:h,
|
65
67
|
:help,
|
66
68
|
:include_bootstrap,
|
@@ -32,8 +32,9 @@ module OpenSearch
|
|
32
32
|
# Returns information about snapshot repositories registered in the cluster.
|
33
33
|
#
|
34
34
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
35
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
36
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
35
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
37
38
|
# @option arguments [List] :h Comma-separated list of column names to display
|
38
39
|
# @option arguments [Boolean] :help Return help information
|
39
40
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
@@ -61,6 +62,7 @@ module OpenSearch
|
|
61
62
|
:format,
|
62
63
|
:local,
|
63
64
|
:master_timeout,
|
65
|
+
:cluster_manager_timeout,
|
64
66
|
:h,
|
65
67
|
:help,
|
66
68
|
:s,
|
@@ -33,8 +33,9 @@ module OpenSearch
|
|
33
33
|
# @option arguments [List] :index A comma-separated list of index names to limit the returned information
|
34
34
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
35
35
|
# @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)
|
36
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
37
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
36
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false) *Deprecated*
|
37
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
38
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
38
39
|
# @option arguments [List] :h Comma-separated list of column names to display
|
39
40
|
# @option arguments [Boolean] :help Return help information
|
40
41
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
@@ -71,6 +72,7 @@ module OpenSearch
|
|
71
72
|
:bytes,
|
72
73
|
:local,
|
73
74
|
:master_timeout,
|
75
|
+
:cluster_manager_timeout,
|
74
76
|
:h,
|
75
77
|
:help,
|
76
78
|
:s,
|
@@ -33,7 +33,8 @@ module OpenSearch
|
|
33
33
|
# @option arguments [List] :repository Name of repository from which to fetch the snapshot information
|
34
34
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
35
35
|
# @option arguments [Boolean] :ignore_unavailable Set to true to ignore unavailable snapshots
|
36
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
37
38
|
# @option arguments [List] :h Comma-separated list of column names to display
|
38
39
|
# @option arguments [Boolean] :help Return help information
|
39
40
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
@@ -68,6 +69,7 @@ module OpenSearch
|
|
68
69
|
:format,
|
69
70
|
:ignore_unavailable,
|
70
71
|
:master_timeout,
|
72
|
+
:cluster_manager_timeout,
|
71
73
|
:h,
|
72
74
|
:help,
|
73
75
|
:s,
|
@@ -32,8 +32,9 @@ module OpenSearch
|
|
32
32
|
#
|
33
33
|
# @option arguments [String] :name A pattern that returned template names must match
|
34
34
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
35
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
36
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
35
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
37
38
|
# @option arguments [List] :h Comma-separated list of column names to display
|
38
39
|
# @option arguments [Boolean] :help Return help information
|
39
40
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
@@ -67,6 +68,7 @@ module OpenSearch
|
|
67
68
|
:format,
|
68
69
|
:local,
|
69
70
|
:master_timeout,
|
71
|
+
:cluster_manager_timeout,
|
70
72
|
:h,
|
71
73
|
:help,
|
72
74
|
:s,
|
@@ -34,8 +34,9 @@ module OpenSearch
|
|
34
34
|
# @option arguments [List] :thread_pool_patterns A comma-separated list of regular-expressions to filter the thread pools in the output
|
35
35
|
# @option arguments [String] :format a short version of the Accept header, e.g. json, yaml
|
36
36
|
# @option arguments [String] :size The multiplier in which to display values *Deprecated* (options: , k, m, g, t, p)
|
37
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
38
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
37
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
38
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
39
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
39
40
|
# @option arguments [List] :h Comma-separated list of column names to display
|
40
41
|
# @option arguments [Boolean] :help Return help information
|
41
42
|
# @option arguments [List] :s Comma-separated list of column names or column aliases to sort by
|
@@ -71,6 +72,7 @@ module OpenSearch
|
|
71
72
|
:size,
|
72
73
|
:local,
|
73
74
|
:master_timeout,
|
75
|
+
:cluster_manager_timeout,
|
74
76
|
:h,
|
75
77
|
:help,
|
76
78
|
:s,
|
@@ -32,7 +32,8 @@ module OpenSearch
|
|
32
32
|
#
|
33
33
|
# @option arguments [String] :name The name of the template
|
34
34
|
# @option arguments [Time] :timeout Explicit operation timeout
|
35
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
38
|
#
|
38
39
|
#
|
@@ -58,7 +59,8 @@ module OpenSearch
|
|
58
59
|
# @since 6.2.0
|
59
60
|
ParamsRegistry.register(:delete_component_template, [
|
60
61
|
:timeout,
|
61
|
-
:master_timeout
|
62
|
+
:master_timeout,
|
63
|
+
:cluster_manager_timeout
|
62
64
|
].freeze)
|
63
65
|
end
|
64
66
|
end
|
@@ -31,8 +31,9 @@ module OpenSearch
|
|
31
31
|
# Returns information about whether a particular component template exist
|
32
32
|
#
|
33
33
|
# @option arguments [String] :name The name of the template
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
35
|
-
# @option arguments [
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
36
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
38
|
#
|
38
39
|
#
|
@@ -60,6 +61,7 @@ module OpenSearch
|
|
60
61
|
# @since 6.2.0
|
61
62
|
ParamsRegistry.register(:exists_component_template, [
|
62
63
|
:master_timeout,
|
64
|
+
:cluster_manager_timeout,
|
63
65
|
:local
|
64
66
|
].freeze)
|
65
67
|
end
|
@@ -31,8 +31,9 @@ module OpenSearch
|
|
31
31
|
# Returns one or more component templates
|
32
32
|
#
|
33
33
|
# @option arguments [List] :name The comma separated names of the component templates
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
35
|
-
# @option arguments [
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
36
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
38
|
#
|
38
39
|
#
|
@@ -60,6 +61,7 @@ module OpenSearch
|
|
60
61
|
# @since 6.2.0
|
61
62
|
ParamsRegistry.register(:get_component_template, [
|
62
63
|
:master_timeout,
|
64
|
+
:cluster_manager_timeout,
|
63
65
|
:local
|
64
66
|
].freeze)
|
65
67
|
end
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
31
31
|
# Returns cluster settings.
|
32
32
|
#
|
33
33
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
35
36
|
# @option arguments [Time] :timeout Explicit operation timeout
|
36
37
|
# @option arguments [Boolean] :include_defaults Whether to return all default clusters setting.
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
@@ -56,6 +57,7 @@ module OpenSearch
|
|
56
57
|
ParamsRegistry.register(:get_settings, [
|
57
58
|
:flat_settings,
|
58
59
|
:master_timeout,
|
60
|
+
:cluster_manager_timeout,
|
59
61
|
:timeout,
|
60
62
|
:include_defaults
|
61
63
|
].freeze)
|
@@ -33,8 +33,9 @@ module OpenSearch
|
|
33
33
|
# @option arguments [List] :index Limit the information returned to a specific index
|
34
34
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
|
35
35
|
# @option arguments [String] :level Specify the level of detail for returned information (options: cluster, indices, shards)
|
36
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
37
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
36
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
37
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
38
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
38
39
|
# @option arguments [Time] :timeout Explicit operation timeout
|
39
40
|
# @option arguments [String] :wait_for_active_shards Wait until the specified number of shards is active
|
40
41
|
# @option arguments [String] :wait_for_nodes Wait until the specified number of nodes is available
|
@@ -72,6 +73,7 @@ module OpenSearch
|
|
72
73
|
:level,
|
73
74
|
:local,
|
74
75
|
:master_timeout,
|
76
|
+
:cluster_manager_timeout,
|
75
77
|
:timeout,
|
76
78
|
:wait_for_active_shards,
|
77
79
|
:wait_for_nodes,
|
@@ -31,8 +31,9 @@ module OpenSearch
|
|
31
31
|
# Returns a list of any cluster-level changes (e.g. create index, update mapping,
|
32
32
|
# allocate or fail shard) which have not yet been executed.
|
33
33
|
#
|
34
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
35
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
34
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
35
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
36
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
38
|
#
|
38
39
|
#
|
@@ -54,7 +55,8 @@ module OpenSearch
|
|
54
55
|
# @since 6.2.0
|
55
56
|
ParamsRegistry.register(:pending_tasks, [
|
56
57
|
:local,
|
57
|
-
:master_timeout
|
58
|
+
:master_timeout,
|
59
|
+
:cluster_manager_timeout
|
58
60
|
].freeze)
|
59
61
|
end
|
60
62
|
end
|
@@ -33,7 +33,8 @@ module OpenSearch
|
|
33
33
|
# @option arguments [String] :name The name of the template
|
34
34
|
# @option arguments [Boolean] :create Whether the index template should only be added if new or can also replace an existing one
|
35
35
|
# @option arguments [Time] :timeout Explicit operation timeout
|
36
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
39
|
# @option arguments [Hash] :body The template definition (*Required*)
|
39
40
|
#
|
@@ -62,7 +63,8 @@ module OpenSearch
|
|
62
63
|
ParamsRegistry.register(:put_component_template, [
|
63
64
|
:create,
|
64
65
|
:timeout,
|
65
|
-
:master_timeout
|
66
|
+
:master_timeout,
|
67
|
+
:cluster_manager_timeout
|
66
68
|
].freeze)
|
67
69
|
end
|
68
70
|
end
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
31
31
|
# Updates the cluster settings.
|
32
32
|
#
|
33
33
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
34
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
35
36
|
# @option arguments [Time] :timeout Explicit operation timeout
|
36
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
38
|
# @option arguments [Hash] :body The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). (*Required*)
|
@@ -58,6 +59,7 @@ module OpenSearch
|
|
58
59
|
ParamsRegistry.register(:put_settings, [
|
59
60
|
:flat_settings,
|
60
61
|
:master_timeout,
|
62
|
+
:cluster_manager_timeout,
|
61
63
|
:timeout
|
62
64
|
].freeze)
|
63
65
|
end
|
@@ -33,8 +33,9 @@ module OpenSearch
|
|
33
33
|
# @option arguments [Boolean] :dry_run Simulate the operation only and return the resulting state
|
34
34
|
# @option arguments [Boolean] :explain Return an explanation of why the commands can or cannot be executed
|
35
35
|
# @option arguments [Boolean] :retry_failed Retries allocation of shards that are blocked due to too many subsequent allocation failures
|
36
|
-
# @option arguments [List] :metric Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table,
|
37
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
36
|
+
# @option arguments [List] :metric Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version)
|
37
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
38
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
38
39
|
# @option arguments [Time] :timeout Explicit operation timeout
|
39
40
|
# @option arguments [Hash] :headers Custom HTTP headers
|
40
41
|
# @option arguments [Hash] :body The definition of `commands` to perform (`move`, `cancel`, `allocate`)
|
@@ -62,6 +63,7 @@ module OpenSearch
|
|
62
63
|
:retry_failed,
|
63
64
|
:metric,
|
64
65
|
:master_timeout,
|
66
|
+
:cluster_manager_timeout,
|
65
67
|
:timeout
|
66
68
|
].freeze)
|
67
69
|
end
|
@@ -32,8 +32,9 @@ module OpenSearch
|
|
32
32
|
#
|
33
33
|
# @option arguments [List] :metric Limit the information returned to the specified metrics (options: _all, blocks, metadata, nodes, routing_table, routing_nodes, master_node, version)
|
34
34
|
# @option arguments [List] :index A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
35
|
-
# @option arguments [Boolean] :local Return local information, do not retrieve the state from
|
36
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
35
|
+
# @option arguments [Boolean] :local Return local information, do not retrieve the state from cluster_manager node (default: false)
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
37
38
|
# @option arguments [Boolean] :flat_settings Return settings in flat format (default: false)
|
38
39
|
# @option arguments [Number] :wait_for_metadata_version Wait for the metadata version to be equal or greater than the specified metadata version
|
39
40
|
# @option arguments [Time] :wait_for_timeout The maximum time to wait for wait_for_metadata_version before timing out
|
@@ -72,6 +73,7 @@ module OpenSearch
|
|
72
73
|
ParamsRegistry.register(:state, [
|
73
74
|
:local,
|
74
75
|
:master_timeout,
|
76
|
+
:cluster_manager_timeout,
|
75
77
|
:flat_settings,
|
76
78
|
:wait_for_metadata_version,
|
77
79
|
:wait_for_timeout,
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
#
|
7
|
+
# Modifications Copyright OpenSearch Contributors. See
|
8
|
+
# GitHub history for details.
|
9
|
+
|
10
|
+
module OpenSearch
|
11
|
+
module API
|
12
|
+
module Actions
|
13
|
+
# Creates a point in time.
|
14
|
+
#
|
15
|
+
# @option arguments [String] :index The name(s) of the target index(es) for the PIT. May contain a comma-separated list or a wildcard index pattern. (required)
|
16
|
+
# @option arguments [String] :keep_alive The amount of time to keep the PIT. (required)
|
17
|
+
# @option arguments [String] :preference The node or the shard used to perform the search. (default: random)
|
18
|
+
# @option arguments [String] :routing Specifies to route search requests to a specific shard.
|
19
|
+
# @option arguments [String] :expand_wildcards The type of index that can match the wildcard pattern. Supports comma-separated values. (default: open)
|
20
|
+
# @option arguments [String] :allow_partial_pit_creation Specifies whether to create a PIT with partial failures. (default: false)
|
21
|
+
def create_pit(arguments = {})
|
22
|
+
raise ArgumentError, "Required argument 'index' missing" unless arguments[:index]
|
23
|
+
raise ArgumentError, "Required argument 'keep_alive' missing" unless arguments[:keep_alive]
|
24
|
+
|
25
|
+
arguments = arguments.clone
|
26
|
+
_index = arguments.delete(:index)
|
27
|
+
|
28
|
+
method = OpenSearch::API::HTTP_POST
|
29
|
+
path = "#{Utils.__listify(_index)}/_search/point_in_time"
|
30
|
+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
31
|
+
body = nil
|
32
|
+
|
33
|
+
perform_request(method, path, params, body).body
|
34
|
+
end
|
35
|
+
|
36
|
+
ParamsRegistry.register(:create_pit, [
|
37
|
+
:keep_alive,
|
38
|
+
:preference,
|
39
|
+
:routing,
|
40
|
+
:expand_wildcards,
|
41
|
+
:allow_partial_pit_creation
|
42
|
+
].freeze)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -33,7 +33,8 @@ module OpenSearch
|
|
33
33
|
# @option arguments [String] :index_uuid The UUID of the dangling index
|
34
34
|
# @option arguments [Boolean] :accept_data_loss Must be set to true in order to delete the dangling index
|
35
35
|
# @option arguments [Time] :timeout Explicit operation timeout
|
36
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
39
|
#
|
39
40
|
#
|
@@ -60,7 +61,8 @@ module OpenSearch
|
|
60
61
|
ParamsRegistry.register(:delete_dangling_index, [
|
61
62
|
:accept_data_loss,
|
62
63
|
:timeout,
|
63
|
-
:master_timeout
|
64
|
+
:master_timeout,
|
65
|
+
:cluster_manager_timeout
|
64
66
|
].freeze)
|
65
67
|
end
|
66
68
|
end
|
@@ -33,7 +33,8 @@ module OpenSearch
|
|
33
33
|
# @option arguments [String] :index_uuid The UUID of the dangling index
|
34
34
|
# @option arguments [Boolean] :accept_data_loss Must be set to true in order to import the dangling index
|
35
35
|
# @option arguments [Time] :timeout Explicit operation timeout
|
36
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
36
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
37
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
39
|
#
|
39
40
|
def import_dangling_index(arguments = {})
|
@@ -59,7 +60,8 @@ module OpenSearch
|
|
59
60
|
ParamsRegistry.register(:import_dangling_index, [
|
60
61
|
:accept_data_loss,
|
61
62
|
:timeout,
|
62
|
-
:master_timeout
|
63
|
+
:master_timeout,
|
64
|
+
:cluster_manager_timeout
|
63
65
|
].freeze)
|
64
66
|
end
|
65
67
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
#
|
7
|
+
# Modifications Copyright OpenSearch Contributors. See
|
8
|
+
# GitHub history for details.
|
9
|
+
|
10
|
+
module OpenSearch
|
11
|
+
module API
|
12
|
+
module Actions
|
13
|
+
# Deletes all PITs.
|
14
|
+
def delete_all_pits(arguments = {})
|
15
|
+
method = OpenSearch::API::HTTP_DELETE
|
16
|
+
path = "_search/point_in_time/_all"
|
17
|
+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
18
|
+
body = nil
|
19
|
+
|
20
|
+
perform_request(method, path, params, body).body
|
21
|
+
end
|
22
|
+
|
23
|
+
ParamsRegistry.register(:delete_all_pits, [].freeze)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
#
|
7
|
+
# Modifications Copyright OpenSearch Contributors. See
|
8
|
+
# GitHub history for details.
|
9
|
+
|
10
|
+
module OpenSearch
|
11
|
+
module API
|
12
|
+
module Actions
|
13
|
+
# Deletes one or several PITs.
|
14
|
+
#
|
15
|
+
# @option arguments [Hash] body: Must include `pit_id`, which is an array of PIT IDs to be deleted. (required)
|
16
|
+
def delete_pit(arguments = {})
|
17
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
18
|
+
|
19
|
+
method = OpenSearch::API::HTTP_DELETE
|
20
|
+
path = "_search/point_in_time"
|
21
|
+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
22
|
+
body = arguments[:body]
|
23
|
+
|
24
|
+
perform_request(method, path, params, body).body
|
25
|
+
end
|
26
|
+
|
27
|
+
ParamsRegistry.register(:delete_pit, [].freeze)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -31,7 +31,8 @@ module OpenSearch
|
|
31
31
|
#
|
32
32
|
# @option arguments [String] :id Script ID
|
33
33
|
# @option arguments [Time] :timeout Explicit operation timeout
|
34
|
-
|
34
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
35
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
35
36
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
37
|
#
|
37
38
|
#
|
@@ -57,7 +58,8 @@ module OpenSearch
|
|
57
58
|
# @since 6.2.0
|
58
59
|
ParamsRegistry.register(:delete_script, [
|
59
60
|
:timeout,
|
60
|
-
:master_timeout
|
61
|
+
:master_timeout,
|
62
|
+
:cluster_manager_timeout
|
61
63
|
].freeze)
|
62
64
|
end
|
63
65
|
end
|
@@ -30,7 +30,8 @@ module OpenSearch
|
|
30
30
|
module Actions
|
31
31
|
# Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
|
32
32
|
#
|
33
|
-
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
|
33
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node
|
34
|
+
# @option arguments [Time] :cluster_manager_timeout Explicit operation timeout for connection to cluster_manager node
|
34
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
36
|
#
|
36
37
|
#
|
@@ -51,7 +52,8 @@ module OpenSearch
|
|
51
52
|
#
|
52
53
|
# @since 6.2.0
|
53
54
|
ParamsRegistry.register(:get_features, [
|
54
|
-
:master_timeout
|
55
|
+
:master_timeout,
|
56
|
+
:cluster_manager_timeout
|
55
57
|
].freeze)
|
56
58
|
end
|
57
59
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
#
|
7
|
+
# Modifications Copyright OpenSearch Contributors. See
|
8
|
+
# GitHub history for details.
|
9
|
+
|
10
|
+
module OpenSearch
|
11
|
+
module API
|
12
|
+
module Actions
|
13
|
+
# Gets all PITs.
|
14
|
+
def get_all_pits(arguments = {})
|
15
|
+
method = OpenSearch::API::HTTP_GET
|
16
|
+
path = "_search/point_in_time/_all"
|
17
|
+
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
|
18
|
+
body = nil
|
19
|
+
|
20
|
+
perform_request(method, path, params, body).body
|
21
|
+
end
|
22
|
+
|
23
|
+
ParamsRegistry.register(:get_all_pits, [].freeze)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -30,7 +30,8 @@ module OpenSearch
|
|
30
30
|
# Returns a script.
|
31
31
|
#
|
32
32
|
# @option arguments [String] :id Script ID
|
33
|
-
# @option arguments [Time] :master_timeout Specify timeout for connection to master
|
33
|
+
# @option arguments [Time] :master_timeout (DEPRECATED: use cluster_manager_timeout instead) Specify timeout for connection to master
|
34
|
+
# @option arguments [Time] :cluster_manager_timeout Specify timeout for connection to cluster_manager
|
34
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
35
36
|
#
|
36
37
|
#
|
@@ -55,7 +56,8 @@ module OpenSearch
|
|
55
56
|
#
|
56
57
|
# @since 6.2.0
|
57
58
|
ParamsRegistry.register(:get_script, [
|
58
|
-
:master_timeout
|
59
|
+
:master_timeout,
|
60
|
+
:cluster_manager_timeout
|
59
61
|
].freeze)
|
60
62
|
end
|
61
63
|
end
|