module Elasticsearch::API::SnapshotLifecycleManagement::Actions
def delete_lifecycle(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node. -
:policy_id(String) -- The id of the snapshot lifecycle policy to remove (*Required*)
def delete_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.delete_lifecycle' } defined_params = [:policy_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 'policy_id' missing" unless arguments[:policy_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_DELETE path = "_slm/policy/#{Utils.listify(_policy_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def execute_lifecycle(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node. -
:policy_id(String) -- The id of the snapshot lifecycle policy to be executed (*Required*)
def execute_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.execute_lifecycle' } defined_params = [:policy_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 'policy_id' missing" unless arguments[:policy_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_PUT path = "_slm/policy/#{Utils.listify(_policy_id)}/_execute" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def execute_retention(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node.
def execute_retention(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.execute_retention' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_POST path = '_slm/_execute_retention' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def get_lifecycle(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node. -
:policy_id(String, Array) -- Comma-separated list of snapshot lifecycle policies to retrieve
def get_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.get_lifecycle' } defined_params = [:policy_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 _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_GET path = if _policy_id "_slm/policy/#{Utils.listify(_policy_id)}" else '_slm/policy' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def get_stats(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s. -
:master_timeout(Time) -- Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
def get_stats(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.get_stats' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_slm/stats' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def get_status(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node.
def get_status(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.get_status' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_slm/status' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def put_lifecycle(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle -
Options Hash:
(**arguments)-
:body(Hash) -- request body -
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node. -
:policy_id(String) -- The identifier for the snapshot lifecycle policy you want to create or update. (*Required*)
def put_lifecycle(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.put_lifecycle' } defined_params = [:policy_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 'policy_id' missing" unless arguments[:policy_id] arguments = arguments.clone headers = arguments.delete(:headers) || {} body = arguments.delete(:body) _policy_id = arguments.delete(:policy_id) method = Elasticsearch::API::HTTP_PUT path = "_slm/policy/#{Utils.listify(_policy_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def start(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-start -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node.
def start(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.start' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_POST path = '_slm/start' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end
def stop(arguments = {})
- See: https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-stop -
Options Hash:
(**arguments)-
:headers(Hash) -- Custom HTTP headers -
:pretty(Boolean) -- If set to `true` the returned JSON will be "pretty-formatted". Only use -
:human(Boolean) -- When set to `true` will return statistics in a format suitable for humans. -
:filter_path(String, Array) -- Comma-separated list of filters in dot notation which reduce the response -
:error_trace(Boolean) -- When set to `true` Elasticsearch will include the full stack trace of errors -
:timeout(Time) -- The period to wait for a response. -
:master_timeout(Time) -- The period to wait for a connection to the master node.
def stop(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'slm.stop' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_POST path = '_slm/stop' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end