Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions elasticsearch-api/lib/elasticsearch/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def perform_request(method, path, params = {}, body = nil, headers = nil, reques
:cluster,
:connector,
:dangling_indices,
:data_recovery,
:encryption,
:enrich,
:eql,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get aliases.
# Get a compact list of aliases.
# Get the cluster's index aliases, including filter and routing information.
# This API does not return data stream aliases.
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get component templates.
# Get a compact list of component templates.
# Get information about component templates in a cluster.
# Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get the cluster health status.
# Get a compact cluster health summary.
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console.
# They are not intended for use by applications. For application consumption, use the cluster health API.
# This API is often used to check malfunctioning clusters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get index information.
# Get a compact list of indices.
# Get high-level information about indices in a cluster, including backing indices for data streams.
# Use this request to get the following information for each index in a cluster:
# - shard count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get node information.
# Get a compact list of nodes.
# Get information about the nodes in a cluster.
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module Actions
#
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request.
# Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`.
# @option arguments [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries.
# @option arguments [Boolean] :active_only If `true`, the response only includes shard recoveries that have not yet completed (excludes `done` stage).
# @option arguments [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries.
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display.
# It supports simple wildcards. Server default: ip,hp,rp,r,m,n,cpu,l.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get snapshot repository information.
# Get a compact list of snapshot repositories.
# Get a list of snapshot repositories for a cluster.
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get snapshot information.
# Get a compact list of snapshots.
# Get information about the snapshots stored in one or more repositories.
# A snapshot is a backup of an index or running Elasticsearch cluster.
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cat
module Actions
# Get task information.
# Get a compact list of running tasks.
# Get information about tasks currently running in the cluster.
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
# This functionality is experimental and is not ready for production usage. Experimental
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def allocation_explain(arguments = {})
Elasticsearch::API::HTTP_GET
end

path = '_cluster/allocation/explain'
path = '_cluster/allocation/explain'
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Elasticsearch
module API
module Cluster
module Actions
# Get cluster info.
# Get cluster subsystem info.
# Returns basic information about the cluster.
#
# @option arguments [String, Array<String>] :target Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest. (*Required*)
Expand Down
10 changes: 5 additions & 5 deletions elasticsearch-api/lib/elasticsearch/api/actions/count.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def count(arguments = {})
Elasticsearch::API::HTTP_GET
end

path = if _index
"#{Utils.listify(_index)}/_count"
else
'_count'
end
path = if _index
"#{Utils.listify(_index)}/_count"
else
'_count'
end
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module DataRecovery
module Actions
# Get a recovery.
# Get the status and details of a recovery that was started with the start recovery API.
# This API is intended for internal operator use.
# The progress of a running recovery is reported as a percentage, and the repository and audit details of the recovery are not exposed.
# This functionality is subject to potential breaking changes within a
# minor version, meaning that your referencing code may break when this
# library is upgraded.
#
# @option arguments [String] :recovery_id The identifier of the recovery, as returned when the recovery was started. (*Required*)
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
# returned by Elasticsearch.
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
# For example `"exists_time": "1h"` for humans and
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
# readable values will be omitted. This makes sense for responses being consumed
# only by machines.
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
# this option for debugging only.
# @option arguments [Hash] :headers Custom HTTP headers
#
def get_recovery(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_recovery' }

defined_params = [:recovery_id].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
end
request_opts[:defined_params] = defined_params unless defined_params.empty?

raise ArgumentError, "Required argument 'recovery_id' missing" unless arguments[:recovery_id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

_recovery_id = arguments.delete(:recovery_id)

method = Elasticsearch::API::HTTP_GET
path = "_data_recovery/recoveries/#{Utils.listify(_recovery_id)}"
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module DataRecovery
module Actions
# Get recovery points.
# Get recovery points from the platform-managed data recovery repository.
# This API is intended for internal operator use.
# Recovery points are returned in descending order by end time. Repository,
# snapshot, and policy identifiers are not exposed.
# This functionality is subject to potential breaking changes within a
# minor version, meaning that your referencing code may break when this
# library is upgraded.
#
# @option arguments [String, Time] :end_time_before Return only recovery points whose end time is earlier than this value.
# The boundary is exclusive and can be set to the last recovery point's
# end time to retrieve the next page.
# @option arguments [Time] :master_timeout The period to wait for the master node.
# If the master node is not available before the timeout expires, the request fails and returns an error.
# To indicate that the request should never timeout, set it to `-1`. Server default: 30s.
# @option arguments [Integer] :size The maximum number of recovery points to return. The value must be between 1 and 1000. Server default: 100.
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
# returned by Elasticsearch.
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
# For example `"exists_time": "1h"` for humans and
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
# readable values will be omitted. This makes sense for responses being consumed
# only by machines.
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
# this option for debugging only.
# @option arguments [Hash] :headers Custom HTTP headers
#
def get_recovery_points(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_recovery_points' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_GET
path = '_data_recovery/points'
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module DataRecovery
module Actions
# Get recovery sources.
# Get the logical sources captured at an exact recovery point in the platform-managed data recovery repository.
# This API is intended for internal operator use. Repository, snapshot, and policy identifiers are not exposed.
# This functionality is subject to potential breaking changes within a
# minor version, meaning that your referencing code may break when this
# library is upgraded.
#
# @option arguments [String, Array<String>] :expression A comma-separated list of source expressions to match. Wildcards and exclusions prefixed with `-` are supported. (*Required*)
# @option arguments [Boolean] :include_incomplete_sources If `true`, include logical sources that were not completely captured in the recovery point.
# @option arguments [Time] :master_timeout The period to wait for the master node.
# If the master node is not available before the timeout expires, the request fails and returns an error.
# To indicate that the request should never timeout, set it to `-1`. Server default: 30s.
# @option arguments [String, Time] :recovery_point_end_time The exact end time of the recovery point. (*Required*)
# @option arguments [Integer] :size The maximum number of matching sources to return. The value must be between 1 and 1000. Server default: 100.
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
# returned by Elasticsearch.
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
# For example `"exists_time": "1h"` for humans and
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
# readable values will be omitted. This makes sense for responses being consumed
# only by machines.
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
# this option for debugging only.
# @option arguments [Hash] :headers Custom HTTP headers
#
def get_recovery_sources(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_recovery_sources' }

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = nil

method = Elasticsearch::API::HTTP_GET
path = '_data_recovery/sources'
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Loading
Loading