Module: Elasticsearch::API::CrossClusterReplication::Actions
- Included in:
- CrossClusterReplicationClient
- Defined in:
- lib/elasticsearch/api/namespace/cross_cluster_replication.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb,
lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb
Instance Method Summary collapse
-
#delete_auto_follow_pattern(arguments = {}) ⇒ Object
Delete auto-follow patterns.
-
#follow(arguments = {}) ⇒ Object
Create a follower.
-
#follow_info(arguments = {}) ⇒ Object
Get follower information.
-
#follow_stats(arguments = {}) ⇒ Object
Get follower stats.
-
#forget_follower(arguments = {}) ⇒ Object
Forget a follower.
-
#get_auto_follow_pattern(arguments = {}) ⇒ Object
Get auto-follow patterns.
-
#pause_auto_follow_pattern(arguments = {}) ⇒ Object
Pause an auto-follow pattern.
-
#pause_follow(arguments = {}) ⇒ Object
Pause a follower.
-
#put_auto_follow_pattern(arguments = {}) ⇒ Object
Create or update auto-follow patterns.
-
#resume_auto_follow_pattern(arguments = {}) ⇒ Object
Resume an auto-follow pattern.
-
#resume_follow(arguments = {}) ⇒ Object
Resume a follower.
-
#stats(arguments = {}) ⇒ Object
Get cross-cluster replication stats.
-
#unfollow(arguments = {}) ⇒ Object
Unfollow an index.
Instance Method Details
#delete_auto_follow_pattern(arguments = {}) ⇒ Object
Delete auto-follow patterns
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#follow(arguments = {}) ⇒ Object
Create a follower
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# 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 |
#follow_info(arguments = {}) ⇒ Object
Get follower information
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#follow_stats(arguments = {}) ⇒ Object
Get follower stats
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#forget_follower(arguments = {}) ⇒ Object
Forget a follower
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# 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 |
#get_auto_follow_pattern(arguments = {}) ⇒ Object
Get auto-follow patterns
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# 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 |
#pause_auto_follow_pattern(arguments = {}) ⇒ Object
Pause an auto-follow pattern
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#pause_follow(arguments = {}) ⇒ Object
Pause a follower
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#put_auto_follow_pattern(arguments = {}) ⇒ Object
Create or update auto-follow patterns
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# 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 |
#resume_auto_follow_pattern(arguments = {}) ⇒ Object
Resume an auto-follow pattern
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |
#resume_follow(arguments = {}) ⇒ Object
Resume a follower
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# 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 |
#stats(arguments = {}) ⇒ Object
Get cross-cluster replication stats
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# 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 |
#unfollow(arguments = {}) ⇒ Object
Unfollow an index
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# 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 |