module Elasticsearch::API::CrossClusterReplication::Actions
Public Instance Methods
Deletes auto-follow patterns.
@option arguments [String] :name The name of the auto follow pattern. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-delete-auto-follow-pattern.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb, line 33 def delete_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.delete_auto_follow_pattern' } defined_params = [:name].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 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_DELETE path = "_ccr/auto_follow/#{Utils.__listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Creates a new follower index configured to follow the referenced leader index.
@option arguments [String] :index The name of the follower index @option arguments [String] :wait_for_active_shards Sets the number of shard copies that must be active before returning. Defaults to 0. Set to ‘all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-put-follow.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb, line 35 def follow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow' } defined_params = [:index].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 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_PUT path = "#{Utils.__listify(_index)}/_ccr/follow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Retrieves information about all follower indices, including parameters and status for each follower index
@option arguments [List] :index A comma-separated list of index patterns; use ‘_all` to perform the operation on all indices @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-follow-info.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb, line 33 def follow_info(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow_info' } defined_params = [:index].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 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = "#{Utils.__listify(_index)}/_ccr/info" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.
@option arguments [List] :index A comma-separated list of index patterns; use ‘_all` to perform the operation on all indices @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-follow-stats.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb, line 33 def follow_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.follow_stats' } defined_params = [:index].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 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = "#{Utils.__listify(_index)}/_ccr/stats" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Removes the follower retention leases from the leader.
@option arguments [String] :index the name of the leader index for which specified follower retention leases should be removed @option arguments [Time] :timeout Explicit operation timeout @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body the name and UUID of the follower index, the name of the cluster containing the follower index, and the alias from the perspective of that cluster for the remote cluster containing the leader index (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-forget-follower.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb, line 34 def forget_follower(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.forget_follower' } defined_params = [:index].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 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/forget_follower" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.
@option arguments [String] :name The name of the auto follow pattern. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-auto-follow-pattern.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb, line 33 def get_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.get_auto_follow_pattern' } defined_params = [:name].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? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_GET path = if _name "_ccr/auto_follow/#{Utils.__listify(_name)}" else '_ccr/auto_follow' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Pauses an auto-follow pattern
@option arguments [String] :name The name of the auto follow pattern that should pause discovering new indices to follow. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-pause-auto-follow-pattern.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb, line 33 def pause_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.pause_auto_follow_pattern' } defined_params = [:name].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 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST path = "_ccr/auto_follow/#{Utils.__listify(_name)}/pause" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Pauses a follower index. The follower index will not fetch any additional operations from the leader index.
@option arguments [String] :index The name of the follower index that should pause following its leader index. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-pause-follow.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb, line 33 def pause_follow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.pause_follow' } defined_params = [:index].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 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/pause_follow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.
@option arguments [String] :name The name of the auto follow pattern. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The specification of the auto follow pattern (Required)
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-put-auto-follow-pattern.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb, line 34 def put_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.put_auto_follow_pattern' } defined_params = [:name].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 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_PUT path = "_ccr/auto_follow/#{Utils.__listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Resumes an auto-follow pattern that has been paused
@option arguments [String] :name The name of the auto follow pattern to resume discovering new indices to follow. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-resume-auto-follow-pattern.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb, line 33 def resume_auto_follow_pattern(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.resume_auto_follow_pattern' } defined_params = [:name].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 'name' missing" unless arguments[:name] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _name = arguments.delete(:name) method = Elasticsearch::API::HTTP_POST path = "_ccr/auto_follow/#{Utils.__listify(_name)}/resume" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Resumes a follower index that has been paused
@option arguments [String] :index The name of the follow index to resume following. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers @option arguments [Hash] :body The name of the leader index and other optional ccr related parameters
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-resume-follow.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb, line 34 def resume_follow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.resume_follow' } defined_params = [:index].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 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/resume_follow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Gets all stats related to cross-cluster replication.
@option arguments [Time] :timeout Explicit operation timeout @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-stats.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb, line 33 def stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_ccr/stats' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
@option arguments [String] :index The name of the follower index that should be turned into a regular index. @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [Hash] :headers Custom HTTP headers
@see www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-unfollow.html
# File lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb, line 33 def unfollow(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'ccr.unfollow' } defined_params = [:index].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 'index' missing" unless arguments[:index] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_POST path = "#{Utils.__listify(_index)}/_ccr/unfollow" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end