Module: Elasticsearch::API::Transform::Actions
- Included in:
- TransformClient
- Defined in:
- lib/elasticsearch/api/namespace/transform.rb,
lib/elasticsearch/api/actions/transform/get_transform.rb,
lib/elasticsearch/api/actions/transform/put_transform.rb,
lib/elasticsearch/api/actions/transform/get_node_stats.rb,
lib/elasticsearch/api/actions/transform/stop_transform.rb,
lib/elasticsearch/api/actions/transform/reset_transform.rb,
lib/elasticsearch/api/actions/transform/start_transform.rb,
lib/elasticsearch/api/actions/transform/delete_transform.rb,
lib/elasticsearch/api/actions/transform/update_transform.rb,
lib/elasticsearch/api/actions/transform/preview_transform.rb,
lib/elasticsearch/api/actions/transform/upgrade_transforms.rb,
lib/elasticsearch/api/actions/transform/get_transform_stats.rb,
lib/elasticsearch/api/actions/transform/schedule_now_transform.rb
Instance Method Summary collapse
-
#delete_transform(arguments = {}) ⇒ Object
Deletes an existing transform.
-
#get_node_stats(arguments = {}) ⇒ Object
Retrieves transform usage information for transform nodes.
-
#get_transform(arguments = {}) ⇒ Object
Retrieves configuration information for transforms.
-
#get_transform_stats(arguments = {}) ⇒ Object
Retrieves usage information for transforms.
-
#preview_transform(arguments = {}) ⇒ Object
Previews a transform.
-
#put_transform(arguments = {}) ⇒ Object
Instantiates a transform.
-
#reset_transform(arguments = {}) ⇒ Object
Resets an existing transform.
-
#schedule_now_transform(arguments = {}) ⇒ Object
Schedules now a transform.
-
#start_transform(arguments = {}) ⇒ Object
Starts one or more transforms.
-
#stop_transform(arguments = {}) ⇒ Object
Stops one or more transforms.
-
#update_transform(arguments = {}) ⇒ Object
Updates certain properties of a transform.
-
#upgrade_transforms(arguments = {}) ⇒ Object
Upgrades all transforms.
Instance Method Details
#delete_transform(arguments = {}) ⇒ Object
Deletes an existing transform.
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/transform/delete_transform.rb', line 35 def delete_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.delete_transform' } defined_params = [:transform_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 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_DELETE path = "_transform/#{Utils.__listify(_transform_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#get_node_stats(arguments = {}) ⇒ Object
Retrieves transform usage information for transform nodes.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/elasticsearch/api/actions/transform/get_node_stats.rb', line 31 def get_node_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.get_node_stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_transform/_node_stats' params = {} Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#get_transform(arguments = {}) ⇒ Object
Retrieves configuration information for transforms.
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 61 62 |
# File 'lib/elasticsearch/api/actions/transform/get_transform.rb', line 36 def get_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.get_transform' } defined_params = [:transform_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? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET path = if _transform_id "_transform/#{Utils.__listify(_transform_id)}" else '_transform' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#get_transform_stats(arguments = {}) ⇒ Object
Retrieves usage information for transforms.
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/transform/get_transform_stats.rb', line 36 def get_transform_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.get_transform_stats' } defined_params = [:transform_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 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET path = "_transform/#{Utils.__listify(_transform_id)}/_stats" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#preview_transform(arguments = {}) ⇒ Object
Previews a transform.
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 60 61 62 63 64 65 |
# File 'lib/elasticsearch/api/actions/transform/preview_transform.rb', line 34 def preview_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.preview_transform' } defined_params = [:transform_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? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _transform_id = arguments.delete(:transform_id) method = if body Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _transform_id "_transform/#{Utils.__listify(_transform_id)}/_preview" else '_transform/_preview' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#put_transform(arguments = {}) ⇒ Object
Instantiates a transform.
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/transform/put_transform.rb', line 35 def put_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.put_transform' } defined_params = [:transform_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 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_PUT path = "_transform/#{Utils.__listify(_transform_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#reset_transform(arguments = {}) ⇒ Object
Resets an existing transform.
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/transform/reset_transform.rb', line 34 def reset_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.reset_transform' } defined_params = [:transform_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 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Utils.__listify(_transform_id)}/_reset" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#schedule_now_transform(arguments = {}) ⇒ Object
Schedules now a transform.
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/transform/schedule_now_transform.rb', line 33 def schedule_now_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.schedule_now_transform' } defined_params = [:transform_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 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Utils.__listify(_transform_id)}/_schedule_now" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#start_transform(arguments = {}) ⇒ Object
Starts one or more transforms.
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/transform/start_transform.rb', line 34 def start_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.start_transform' } defined_params = [:transform_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 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Utils.__listify(_transform_id)}/_start" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#stop_transform(arguments = {}) ⇒ Object
Stops one or more transforms.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/elasticsearch/api/actions/transform/stop_transform.rb', line 37 def stop_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.stop_transform' } defined_params = [:transform_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 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Utils.__listify(_transform_id)}/_stop" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#update_transform(arguments = {}) ⇒ Object
Updates certain properties of a transform.
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/transform/update_transform.rb', line 35 def update_transform(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.update_transform' } defined_params = [:transform_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 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Utils.__listify(_transform_id)}/_update" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#upgrade_transforms(arguments = {}) ⇒ Object
Upgrades all transforms.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/api/actions/transform/upgrade_transforms.rb', line 33 def upgrade_transforms(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'transform.upgrade_transforms' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_POST path = '_transform/_upgrade' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |