Search...ct::ILM(3pm)

πŸ“¦
version 8.12 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

ok so this is Search::Elasticsearch::Client::8_0::Direct::ILM β€” it's a plugin that gives you the index lifecycle management (ILM) APIs for Search::Elasticsearch 8.x. it's living in the perl doc pages, manual section 3pm, and honestly? it's giving "I manage your indices' whole life arc" energy. 🌈

✨ VERSION ✨

version 8.12 πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

bestie, this module hands you the methods to use the index lifecycle management feature. that's it, that's the whole job. πŸ’…

the full documentation for ILM lives right here, go read it:

https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html


πŸ‘‘ POLICY METHODS πŸ‘‘

🌸 put_lifecycle()

$response = $es->ilm->put_lifecycle(
    policy  => $policy  # required
    body    => {...}    # required
)

put_lifecycle() creates or updates a lifecycle policy. so like, new policy or glow-up on an existing one, either way it slays. ✨

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM put_lifecycle docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html

🌸 put_lifecycle() (yes, again)

$response = $es->ilm->put_lifecycle(
    policy  => $policy  # required
    body    => {...}    # required
)

not me listing this twice β€” no fr, the page really does list put_lifecycle() twice, back to back, same everything. main character energy so strong it got two entries. 😭

put_lifecycle() creates or updates a lifecycle policy.

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM put_lifecycle docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html

πŸŽ€ get_lifecycle()

$response = $es->ilm->get_lifecycle(
    policy  => $policy  # required
)

get_lifecycle() retrieves the policy you asked for. you said "show me the policy" and it shows you the policy. we love a method that does exactly what it says. 🫢

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM get_lifecycle docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html

πŸ’€ delete_lifecycle()

$response = $es->ilm->delete_lifecycle(
    policy  => $policy  # required
)

delete_lifecycle() deletes the specified policy. it's gone, it's in the past, we don't talk about it. πŸ’€

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM delete_lifecycle docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-lifecycle.html


πŸ”₯ INDEX MANAGEMENT METHODS πŸ”₯

⭐ move_to_step()

$response = $es->ilm->move_to_step(
    index  => $index,       # required
    body   => {...}         # required
)

move_to_step() triggers execution of a specific step in the lifecycle policy. like skipping to your fav track on the playlist, except it's a lifecycle step. πŸ”₯

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM move_to_step docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html

🧚 retry()

$response = $es->ilm->retry(
    index  => $index,       # required
)

retry() retries executing the policy for an index that's stuck in the ERROR step. it's the "okay bestie, run it back" button. 😭

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM retry docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry.html

πŸ“ remove_lifecycle()

$response = $es->ilm->remove_lifecycle(
    index  => $index  # required
)

remove_lifecycle() removes a lifecycle from the index you point at. it's unsubscribing, but for a lifecycle policy. πŸ“

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM remove_lifecycle docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-lifecycle.html

πŸ” explain_lifecycle()

$response = $es->ilm->explain_lifecycle(
    index  => $index  # required
)

explain_lifecycle() returns info about the index's current lifecycle state. it's the vibe check for your index β€” where is it, what's it doing, why is it like this. πŸ”

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM explain_lifecycle docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html


πŸ’œ OPERATION MANAGEMENT APIS πŸ’œ

🌈 status()

$response = $es->ilm->status;

status() returns the current operating mode for ILM. no args, no drama, just the status. 🌈

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM status docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html

✨ start()

$response = $es->ilm->start;

start() starts the index lifecycle management process. go girl, go. ✨

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM start docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html

πŸ›‘ stop()

$response = $es->ilm->stop;

stop() stops the index lifecycle management process. nap time. 😴

Query string parameters:

  • "error_trace"
  • "filter_path"
  • "human"

See the ILM stop docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html


🫢 AUTHOR 🫢

Enrico Zimuel <enrico.zimuel@elastic.co> β€” icon, legend, the moment. πŸ‘‘

This software is Copyright (c) 2024 by Elasticsearch BV.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004

okay so that's the whole page, bestie β€” every single method, every query string param, every link, all of it. nothing skipped, periodt. πŸ’…

perl v5.38.2 Β· 2024-02-04 Β· Search::Elasticsearch::Client::8_0::Direct::ILM (3pm) β€” mwah, love u, go manage some lifecycles πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from