# Update data stream lifecycles **PUT /_data_stream/{name}/_lifecycle** Update the data stream lifecycle of the specified data streams. [About data stream lifecycle](https://www.elastic.co/docs/manage-data/lifecycle/data-stream) ## Servers - http://api.example.com: http://api.example.com () ## Authentication methods - Api key auth - Basic auth - Bearer auth ## Parameters ### Path parameters - **name** (string | array[string]) 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`. Supported values include: - `all`: Match any data stream or index, including hidden ones. - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream. - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`. - `none`: Wildcard expressions are not accepted. - **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: application/json (object) - **data_retention** (string) If defined, every document added to this data stream will be stored at least for this time frame. Any time after this duration the document could be deleted. When empty, every document in this data stream will be stored indefinitely. - **downsampling** (array[object]) The downsampling configuration to execute for the managed backing index after rollover. - **downsampling_method** (string) The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires `downsampling` to be defined. Defaults to `aggregate`. - **enabled** (boolean) If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle that's disabled (enabled: `false`) will have no effect on the data stream. ## Responses ### 200 #### Body: application/json (object) - **acknowledged** (boolean) For a successful response, this value is always true. On failure, an exception is returned instead. [Powered by Bump.sh](https://bump.sh)