Creates or updates a snapshot lifecycle policy Added in 7.4.0
Path parameters
-
ID for the snapshot lifecycle policy you want to create or update.
Query parameters
-
master_timeout string
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
-
timeout string
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Body
-
config object
Additional properties are allowed.
-
name string
-
repository string
Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API.
-
retention object
Additional properties are allowed.
-
schedule string
PUT
/_slm/policy/{policy_id}
curl \
-X PUT http://api.example.com/_slm/policy/{policy_id} \
-H "Content-Type: application/json" \
-d '{"config":{"ignore_unavailable":true,"indices":"string","include_global_state":true,"feature_states":["string"],"metadata":{"additionalProperty1":{},"additionalProperty2":{}},"partial":true},"name":"string","repository":"string","retention":{"expire_after":"string","max_count":42.0,"min_count":42.0},"schedule":"string"}'
Request examples
{
"config": {
"ignore_unavailable": true,
"indices": "string",
"include_global_state": true,
"feature_states": [
"string"
],
"metadata": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"partial": true
},
"name": "string",
"repository": "string",
"retention": {
"expire_after": "string",
"max_count": 42.0,
"min_count": 42.0
},
"schedule": "string"
}
Response examples (200)
{
"acknowledged": true
}