Module: Elasticsearch::XPack::API::Transform::Actions
- Included in:
- TransformClient
- Defined in:
- lib/elasticsearch/xpack/api/namespace/transform.rb,
lib/elasticsearch/xpack/api/actions/transform/get_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/put_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/stop_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/params_registry.rb,
lib/elasticsearch/xpack/api/actions/transform/start_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/delete_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/update_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/preview_transform.rb,
lib/elasticsearch/xpack/api/actions/transform/upgrade_transforms.rb,
lib/elasticsearch/xpack/api/actions/transform/get_transform_stats.rb
Defined Under Namespace
Modules: ParamsRegistry
Instance Method Summary collapse
-
#delete_transform(arguments = {}) ⇒ Object
Deletes an existing transform.
-
#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.
-
#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.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/elasticsearch/xpack/api/actions/transform/delete_transform.rb', line 32 def delete_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_DELETE path = "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#get_transform(arguments = {}) ⇒ Object
Retrieves configuration information for transforms.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/elasticsearch/xpack/api/actions/transform/get_transform.rb', line 34 def get_transform(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET path = if _transform_id "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}" else "_transform" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#get_transform_stats(arguments = {}) ⇒ Object
Retrieves usage information for transforms.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/elasticsearch/xpack/api/actions/transform/get_transform_stats.rb', line 33 def get_transform_stats(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_GET path = "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}/_stats" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#preview_transform(arguments = {}) ⇒ Object
Previews a transform.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/elasticsearch/xpack/api/actions/transform/preview_transform.rb', line 32 def preview_transform(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = if arguments[:body] Elasticsearch::API::HTTP_POST else Elasticsearch::API::HTTP_GET end path = if _transform_id "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}/_preview" else "_transform/_preview" end params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#put_transform(arguments = {}) ⇒ Object
Instantiates a transform.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/xpack/api/actions/transform/put_transform.rb', line 33 def put_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_PUT path = "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#start_transform(arguments = {}) ⇒ Object
Starts one or more transforms.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/elasticsearch/xpack/api/actions/transform/start_transform.rb', line 31 def start_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}/_start" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#stop_transform(arguments = {}) ⇒ Object
Stops one or more transforms.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/elasticsearch/xpack/api/actions/transform/stop_transform.rb', line 35 def stop_transform(arguments = {}) raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}/_stop" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |
#update_transform(arguments = {}) ⇒ Object
Updates certain properties of a transform.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/elasticsearch/xpack/api/actions/transform/update_transform.rb', line 33 def update_transform(arguments = {}) raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] raise ArgumentError, "Required argument 'transform_id' missing" unless arguments[:transform_id] headers = arguments.delete(:headers) || {} arguments = arguments.clone _transform_id = arguments.delete(:transform_id) method = Elasticsearch::API::HTTP_POST path = "_transform/#{Elasticsearch::API::Utils.__listify(_transform_id)}/_update" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = arguments[:body] perform_request(method, path, params, body, headers).body end |
#upgrade_transforms(arguments = {}) ⇒ Object
Upgrades all transforms.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/elasticsearch/xpack/api/actions/transform/upgrade_transforms.rb', line 31 def upgrade_transforms(arguments = {}) headers = arguments.delete(:headers) || {} arguments = arguments.clone method = Elasticsearch::API::HTTP_POST path = "_transform/_upgrade" params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__) body = nil perform_request(method, path, params, body, headers).body end |