Delete the lifecycle of a data stream
Deletes the lifecycle from a set of data streams.
Prerequisites
- If the Elasticsearch security features are enabled, you must have the
manage_data_stream_lifecycleindex privilege or higher to use this API. For more information, see Security privileges.
Request
DELETE _data_stream/<data-stream>/_lifecycle
Description
Deletes the lifecycle from the specified data streams. If multiple data streams are provided but at least one of them does not exist, then the deletion of the lifecycle will fail for all of them and the API will respond with 404.
Path parameters
-
<data-stream> - (Required, 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 -
(Optional, string) Type of data stream that wildcard patterns can match. Supports comma-separated values, such as
open,hidden. Valid values are:-
all,hidden - Match any data stream, including hidden ones.
-
open,closed - Matches any non-hidden data stream. Data streams cannot be closed.
-
none - Wildcard patterns are not accepted.
Defaults to
open. -
Examples
The following example deletes the lifecycle of my-data-stream:
resp = client.indices.delete_data_lifecycle(
name="my-data-stream",
)
print(resp) response = client.indices.delete_data_lifecycle( name: 'my-data-stream' ) puts response
const response = await client.indices.deleteDataLifecycle({
name: "my-data-stream",
});
console.log(response); DELETE _data_stream/my-data-stream/_lifecycle
When the policy is successfully deleted from all selected data streams, you receive the following result:
{
"acknowledged": true
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/data-streams-delete-lifecycle.html