67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
[[slm-api-delete-policy]]
|
|
=== Delete snapshot lifecycle policy API
|
|
++++
|
|
<titleabbrev>Delete policy</titleabbrev>
|
|
++++
|
|
|
|
Deletes an existing snapshot lifecycle policy.
|
|
|
|
[[slm-api-delete-lifecycle-request]]
|
|
==== {api-request-title}
|
|
|
|
`DELETE /_slm/policy/<snapshot-lifecycle-policy-id>`
|
|
|
|
[[slm-api-delete-lifecycle-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
If the {es} {security-features} are enabled, you must have the `manage_slm`
|
|
cluster privilege to use this API. For more information, see
|
|
<<security-privileges>>.
|
|
|
|
[[slm-api-delete-lifecycle-desc]]
|
|
==== {api-description-title}
|
|
|
|
Deletes the specified lifecycle policy definition.
|
|
This prevents any future snapshots from being taken
|
|
but does not cancel in-progress snapshots
|
|
or remove previously-taken snapshots.
|
|
|
|
|
|
[[slm-api-delete-lifecycle-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<policy-id>`::
|
|
(Required, string)
|
|
ID of the snapshot lifecycle policy to delete.
|
|
|
|
[[slm-api-delete-lifecycle-example]]
|
|
==== {api-examples-title}
|
|
|
|
////
|
|
[source,console]
|
|
--------------------------------------------------
|
|
PUT /_slm/policy/daily-snapshots
|
|
{
|
|
"schedule": "0 30 1 * * ?", <1>
|
|
"name": "<daily-snap-{now/d}>", <2>
|
|
"repository": "my_repository", <3>
|
|
"config": { <4>
|
|
"indices": ["data-*", "important"], <5>
|
|
"ignore_unavailable": false,
|
|
"include_global_state": false
|
|
},
|
|
"retention": { <6>
|
|
"expire_after": "30d", <7>
|
|
"min_count": 5, <8>
|
|
"max_count": 50 <9>
|
|
}
|
|
}
|
|
--------------------------------------------------
|
|
// TEST[setup:setup-repository]
|
|
////
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE /_slm/policy/daily-snapshots
|
|
--------------------------------------------------
|
|
// TEST[continued] |