2018-10-16 15:18:54 -04:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
2018-11-27 16:28:58 -05:00
|
|
|
[[ilm-remove-policy]]
|
2018-12-20 13:23:28 -05:00
|
|
|
=== Remove policy from index API
|
2018-10-16 15:18:54 -04:00
|
|
|
++++
|
2018-12-20 13:23:28 -05:00
|
|
|
<titleabbrev>Remove policy</titleabbrev>
|
2018-10-16 15:18:54 -04:00
|
|
|
++++
|
|
|
|
|
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
|
|
|
|
|
2019-08-02 08:42:33 -04:00
|
|
|
include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|
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-12-18 12:53:25 -05:00
|
|
|
You must have the `manage_ilm` privileges on the indices being managed to use this API.
|
|
|
|
For more information, see {stack-ov}/security-privileges.html[Security Privileges].
|
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": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-18 03:34:11 -05:00
|
|
|
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
|
|
|
|
2019-09-06 09:22:08 -04:00
|
|
|
[source,console-result]
|
2018-10-16 15:18:54 -04:00
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"has_failures" : false,
|
|
|
|
"failed_indexes" : []
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|