2018-10-16 15:18:54 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
2018-11-27 16:28:58 -05:00
|
|
|
[[ilm-remove-policy]]
|
|
|
|
=== Remove Policy from Index API
|
2018-10-16 15:18:54 -04:00
|
|
|
++++
|
2018-11-27 16:28:58 -05:00
|
|
|
<titleabbrev>Remove Policy</titleabbrev>
|
2018-10-16 15:18:54 -04:00
|
|
|
++++
|
|
|
|
|
2018-11-16 13:49:55 -05:00
|
|
|
beta[]
|
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
Removes the assigned lifecycle policy from an index.
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
==== Request
|
|
|
|
|
2018-11-06 10:46:25 -05:00
|
|
|
`POST <index>/_ilm/remove`
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
==== Description
|
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
Removes the assigned lifecycle policy and stops managing the specified index.
|
|
|
|
If an index pattern is specified, removes the assigned policies from all matching
|
|
|
|
indices.
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
==== Path Parameters
|
|
|
|
|
|
|
|
`index` (required)::
|
|
|
|
(string) Identifier for the index.
|
|
|
|
|
|
|
|
==== Request Parameters
|
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
include::{docdir}/rest-api/timeoutparms.asciidoc[]
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
==== Authorization
|
2018-10-16 15:18:54 -04:00
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
include::ilm-cluster-mgt-privilege.asciidoc[]
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
==== Examples
|
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
The following example removes the assigned policy from `my_index`.
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2018-10-30 19:19:05 -04:00
|
|
|
PUT _ilm/policy/my_policy
|
2018-10-16 15:18:54 -04:00
|
|
|
{
|
|
|
|
"policy": {
|
|
|
|
"phases": {
|
|
|
|
"warm": {
|
2018-10-30 15:54:02 -04:00
|
|
|
"min_age": "10d",
|
2018-10-16 15:18:54 -04:00
|
|
|
"actions": {
|
|
|
|
"forcemerge": {
|
|
|
|
"max_num_segments": 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"delete": {
|
2018-10-30 15:54:02 -04:00
|
|
|
"min_age": "30d",
|
2018-10-16 15:18:54 -04:00
|
|
|
"actions": {
|
|
|
|
"delete": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
PUT my_index
|
2018-10-24 11:14:59 -04:00
|
|
|
{
|
|
|
|
"settings": {
|
|
|
|
"index.lifecycle.name": "my_policy"
|
|
|
|
}
|
|
|
|
}
|
2018-10-16 15:18:54 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST
|
|
|
|
|
|
|
|
//////////////////////////
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2018-11-06 10:46:25 -05:00
|
|
|
POST my_index/_ilm/remove
|
2018-10-16 15:18:54 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TEST[continued]
|
|
|
|
|
2018-11-08 18:26:27 -05:00
|
|
|
If the request succeeds, you receive the following result:
|
2018-10-16 15:18:54 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"has_failures" : false,
|
|
|
|
"failed_indexes" : []
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|
|
|
|
// CONSOLE
|
|
|
|
// TESTRESPONSE
|