Skip to content

Commit a536143

Browse files
[+DOC] ILM Move Step example only phase (#90329)
* [+DOC] ILM Move Step example only phase Updates [doc](https://www.elastic.co/guide/en/elasticsearch/reference/master/ilm-move-to-step.html?edit) to append example similar to #75435 (≥v7.15.0) to show users working example of only using `next_step.phase`. * Move example to the end of the page * Fix failing code snippet tests Co-authored-by: Abdon Pijpelink <[email protected]>
1 parent 4224026 commit a536143

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

docs/reference/ilm/apis/move-to-step.asciidoc

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ The name of the phase that contains the action you want to perform or resume.
9696
9797
`action`::
9898
(Optional, string)
99-
The name action you want to perform or resume.
99+
The name action you want to perform or resume. Required if `name` used.
100100
101101
`name`::
102102
(Optional, string)
103-
The name of the step to move to and execute.
103+
The name of the step to move to and execute. Required if `action` used.
104104
105105
====
106106

@@ -176,6 +176,56 @@ If the request succeeds, you receive the following result:
176176
"acknowledged": true
177177
}
178178
--------------------------------------------------
179+
// TEST[continued]
179180

180181
The request will fail if the index is not in the `new` phase as specified
181182
by the `current_step`.
183+
184+
The following example pushes `my-index-000001` from the end of hot phase into
185+
the start of warm:
186+
187+
////
188+
[source,console]
189+
----
190+
DELETE my-index-000001
191+
192+
PUT _ilm/policy/my_policy
193+
{
194+
"policy": {
195+
"phases": {
196+
"hot": {
197+
"actions": {}
198+
},
199+
"warm": {
200+
"min_age": "10d",
201+
"actions": {}
202+
}
203+
}
204+
}
205+
}
206+
207+
PUT my-index-000001
208+
{
209+
"settings": {
210+
"index.lifecycle.name": "my_policy"
211+
}
212+
}
213+
----
214+
// TEST[continued]
215+
////
216+
217+
[source,console]
218+
--------------------------------------------------
219+
POST _ilm/move/my-index-000001
220+
{
221+
"current_step": {
222+
"phase": "hot",
223+
"action": "complete",
224+
"name": "complete"
225+
},
226+
"next_step": {
227+
"phase": "warm"
228+
}
229+
}
230+
--------------------------------------------------
231+
// TEST[continued]

0 commit comments

Comments
 (0)