| 1 | # Licensed to Elasticsearch B.V under one or more agreements. | ||
| 2 | # Elasticsearch B.V licenses this file to you under the Apache 2.0 License. | ||
| 3 | # See the LICENSE file in the project root for more information | ||
| 4 | |||
| 5 | package Search::Elasticsearch::Client::7_0::Direct::ILM; | ||
| 6 | $Search::Elasticsearch::Client::7_0::Direct::ILM::VERSION = '7.30_1'; # TRIAL | ||
| 7 | |||
| 8 | $Search::Elasticsearch::Client::7_0::Direct::ILM::VERSION = '7.301'; | ||
| 9 | use Moo; | ||
| 10 | with 'Search::Elasticsearch::Client::7_0::Role::API'; | ||
| 11 | with 'Search::Elasticsearch::Role::Client::Direct'; | ||
| 12 | use Search::Elasticsearch::Util qw(parse_params); | ||
| 13 | use namespace::clean; | ||
| 14 | __PACKAGE__->_install_api('ilm'); | ||
| 15 | |||
| 16 | 1; | ||
| 17 | |||
| 18 | =pod | ||
| 19 | |||
| 20 | =encoding UTF-8 | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Search::Elasticsearch::Client::7_0::Direct::ILM - Plugin providing index lifecycle management APIs for Search::Elasticsearch 7.x | ||
| 25 | |||
| 26 | =head1 VERSION | ||
| 27 | |||
| 28 | version 7.30_1 | ||
| 29 | |||
| 30 | =head2 DESCRIPTION | ||
| 31 | |||
| 32 | This module provides methods to use the index lifecycle management feature. | ||
| 33 | |||
| 34 | The full documentation for ILM is available here: | ||
| 35 | L<https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html> | ||
| 36 | |||
| 37 | =head1 POLICY METHODS | ||
| 38 | |||
| 39 | =head2 C<put_lifecycle()> | ||
| 40 | |||
| 41 | $response = $es->ilm->put_lifecycle( | ||
| 42 | policy => $policy # required | ||
| 43 | body => {...} # required | ||
| 44 | ) | ||
| 45 | |||
| 46 | The C<put_lifecycle()> method creates or updates a lifecycle policy. | ||
| 47 | |||
| 48 | Query string parameters: | ||
| 49 | C<error_trace>, | ||
| 50 | C<filter_path>, | ||
| 51 | C<human> | ||
| 52 | |||
| 53 | See the L<ILM put_lifecycle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html> | ||
| 54 | for more information. | ||
| 55 | |||
| 56 | =head2 C<put_lifecycle()> | ||
| 57 | |||
| 58 | $response = $es->ilm->put_lifecycle( | ||
| 59 | policy => $policy # required | ||
| 60 | body => {...} # required | ||
| 61 | ) | ||
| 62 | |||
| 63 | The C<put_lifecycle()> method creates or updates a lifecycle policy. | ||
| 64 | |||
| 65 | Query string parameters: | ||
| 66 | C<error_trace>, | ||
| 67 | C<filter_path>, | ||
| 68 | C<human> | ||
| 69 | |||
| 70 | See the L<ILM put_lifecycle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-put-lifecycle.html> | ||
| 71 | for more information. | ||
| 72 | |||
| 73 | =head2 C<get_lifecycle()> | ||
| 74 | |||
| 75 | $response = $es->ilm->get_lifecycle( | ||
| 76 | policy => $policy # required | ||
| 77 | ) | ||
| 78 | |||
| 79 | The C<get_lifecycle()> method retrieves the specified policy | ||
| 80 | |||
| 81 | Query string parameters: | ||
| 82 | C<error_trace>, | ||
| 83 | C<filter_path>, | ||
| 84 | C<human> | ||
| 85 | |||
| 86 | See the L<ILM get_lifecycle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-lifecycle.html> | ||
| 87 | for more information. | ||
| 88 | |||
| 89 | =head2 C<delete_lifecycle()> | ||
| 90 | |||
| 91 | $response = $es->ilm->delete_lifecycle( | ||
| 92 | policy => $policy # required | ||
| 93 | ) | ||
| 94 | |||
| 95 | The C<delete_lifecycle()> method deletes the specified policy | ||
| 96 | |||
| 97 | Query string parameters: | ||
| 98 | C<error_trace>, | ||
| 99 | C<filter_path>, | ||
| 100 | C<human> | ||
| 101 | |||
| 102 | See the L<ILM delete_lifecycle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-lifecycle.html> | ||
| 103 | for more information. | ||
| 104 | |||
| 105 | =head1 INDEX MANAGEMENT METHODS | ||
| 106 | |||
| 107 | =head2 C<move_to_step()> | ||
| 108 | |||
| 109 | $response = $es->ilm->move_to_step( | ||
| 110 | index => $index, # required | ||
| 111 | body => {...} # required | ||
| 112 | ) | ||
| 113 | |||
| 114 | The C<move_to_step()> method triggers execution of a specific step in the lifecycle policy. | ||
| 115 | |||
| 116 | Query string parameters: | ||
| 117 | C<error_trace>, | ||
| 118 | C<filter_path>, | ||
| 119 | C<human> | ||
| 120 | |||
| 121 | See the L<ILM move_to_step docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-move-to-step.html> | ||
| 122 | for more information. | ||
| 123 | |||
| 124 | =head2 C<retry()> | ||
| 125 | |||
| 126 | $response = $es->ilm->retry( | ||
| 127 | index => $index, # required | ||
| 128 | ) | ||
| 129 | |||
| 130 | The C<retry()> method retries executing the policy for an index that is in the ERROR step. | ||
| 131 | |||
| 132 | Query string parameters: | ||
| 133 | C<error_trace>, | ||
| 134 | C<filter_path>, | ||
| 135 | C<human> | ||
| 136 | |||
| 137 | See the L<ILM retry docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-retry.html> | ||
| 138 | for more information. | ||
| 139 | |||
| 140 | =head2 C<remove_lifecycle()> | ||
| 141 | |||
| 142 | $response = $es->ilm->remove_lifecycle( | ||
| 143 | index => $index # required | ||
| 144 | ) | ||
| 145 | |||
| 146 | The C<remove_lifecycle()> method removes a lifecycle from the specified index. | ||
| 147 | |||
| 148 | Query string parameters: | ||
| 149 | C<error_trace>, | ||
| 150 | C<filter_path>, | ||
| 151 | C<human> | ||
| 152 | |||
| 153 | See the L<ILM remove_lifecycle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-remove-lifecycle.html> | ||
| 154 | for more information. | ||
| 155 | |||
| 156 | =head2 C<explain_lifecycle()> | ||
| 157 | |||
| 158 | $response = $es->ilm->explain_lifecycle( | ||
| 159 | index => $index # required | ||
| 160 | ) | ||
| 161 | |||
| 162 | The C<explain_lifecycle()> method returns information about the index’s current lifecycle state. | ||
| 163 | |||
| 164 | Query string parameters: | ||
| 165 | C<error_trace>, | ||
| 166 | C<filter_path>, | ||
| 167 | C<human> | ||
| 168 | |||
| 169 | See the L<ILM explain_lifecycle docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-explain-lifecycle.html> | ||
| 170 | for more information. | ||
| 171 | |||
| 172 | =head1 OPERATION MANAGEMENT APIS | ||
| 173 | |||
| 174 | =head2 C<status()> | ||
| 175 | |||
| 176 | $response = $es->ilm->status; | ||
| 177 | |||
| 178 | The C<status()> method returns the current operating mode for ILM. | ||
| 179 | |||
| 180 | Query string parameters: | ||
| 181 | C<error_trace>, | ||
| 182 | C<filter_path>, | ||
| 183 | C<human> | ||
| 184 | |||
| 185 | See the L<ILM status docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-get-status.html> | ||
| 186 | for more information. | ||
| 187 | |||
| 188 | =head2 C<start()> | ||
| 189 | |||
| 190 | $response = $es->ilm->start; | ||
| 191 | |||
| 192 | The C<start()> method starts the index lifecycle management process. | ||
| 193 | |||
| 194 | Query string parameters: | ||
| 195 | C<error_trace>, | ||
| 196 | C<filter_path>, | ||
| 197 | C<human> | ||
| 198 | |||
| 199 | See the L<ILM start docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-start.html> | ||
| 200 | for more information. | ||
| 201 | |||
| 202 | =head2 C<stop()> | ||
| 203 | |||
| 204 | $response = $es->ilm->stop; | ||
| 205 | |||
| 206 | The C<stop()> method stops the index lifecycle management process. | ||
| 207 | |||
| 208 | Query string parameters: | ||
| 209 | C<error_trace>, | ||
| 210 | C<filter_path>, | ||
| 211 | C<human> | ||
| 212 | |||
| 213 | See the L<ILM stop docs|https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-stop.html> | ||
| 214 | for more information. | ||
| 215 | |||
| 216 | =head1 AUTHOR | ||
| 217 | |||
| 218 | Enrico Zimuel <enrico.zimuel@elastic.co> | ||
| 219 | |||
| 220 | =head1 COPYRIGHT AND LICENSE | ||
| 221 | |||
| 222 | This software is Copyright (c) 2020 by Elasticsearch BV. | ||
| 223 | |||
| 224 | This is free software, licensed under: | ||
| 225 | |||
| 226 | The Apache License, Version 2.0, January 2004 | ||
| 227 | |||
| 228 | =cut | ||
| 229 | |||
| 230 | __END__ |