elasticsearch-api/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb
# Creates or updates a snapshot lifecycle policy.
#
# @option arguments [String] :policy_id The id of the snapshot lifecycle policy
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The snapshot lifecycle policy definition to register
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html
#
Creates or updates a snapshot lifecycle policy.
Creates or updates a snapshot lifecycle policy .
def put_lifecycle(arguments = {})
          raise ArgumentError, "Required argument 'policy_id' missing" unless arguments[:policy_id]
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          arguments = arguments.clone
          _policy_id = arguments.delete(:policy_id)
          method = Elasticsearch::API::HTTP_PUT
          path   = "_slm/policy/#{Utils.__listify(_policy_id)}"
          params = {}
          perform_request(method, path, params, body, headers).body
        end
def put_lifecycle ( arguments = { } ) raise ArgumentError , "Required argument 'policy_id' missing" unless arguments [ :policy_id ] headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) arguments = arguments . clone _policy_id = arguments . delete ( :policy_id ) method = Elasticsearch :: API :: HTTP_PUT path = "_slm/policy/#{Utils.__listify(_policy_id)}" params = { } perform_request ( method , path , params , body , headers ) . body end
Creates or updates a snapshot lifecycle policy.
Creates or updates a snapshot lifecycle policy .
arguments
:body The snapshot lifecycle policy definition to register
: body The snapshot lifecycle policy definition to register
see
None