Update data stream lifecycles Added in 8.11.0
Update the data stream lifecycle of the specified data streams.
Path parameters
-
Comma-separated list of data streams used to limit the request. Supports wildcards (
*
). To target all data streams use*
or_all
.
Query parameters
-
expand_wildcards string | array[string]
Type of data stream that wildcard patterns can match. Supports comma-separated values, such as
open,hidden
. Valid values are:all
,hidden
,open
,closed
,none
. -
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
-
data_retention string
A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value. -
downsampling object
Additional properties are allowed.
curl \
-X PUT http://api.example.com/_data_stream/{name}/_lifecycle \
-H "Content-Type: application/json" \
-d '"{\n \"data_retention\": \"7d\"\n}"'
{
"data_retention": "7d"
}
{
"downsampling": [
{
"after": "1d",
"fixed_interval": "10m"
},
{
"after": "7d",
"fixed_interval": "1d"
}
]
}
{
"acknowledged": true
}