123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- [[dlm-delete-lifecycle]]
- === Delete the lifecycle of a data stream
- ++++
- <titleabbrev>Delete Data Stream Lifecycle</titleabbrev>
- ++++
- experimental::[]
- Deletes the lifecycle from a set of data streams.
- [[dlm-delete-lifecycle-request]]
- ==== {api-request-title}
- `DELETE _data_stream/<data-stream>/_lifecycle`
- [[dlm-delete-lifecycle-desc]]
- ==== {api-description-title}
- 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`.
- [[dlm-delete-lifecycle-path-params]]
- ==== {api-path-parms-title}
- `<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`.
- [role="child_attributes"]
- [[delete-data-lifecycle-api-query-parms]]
- ==== {api-query-parms-title}
- include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=ds-expand-wildcards]
- +
- Defaults to `open`.
- [[dlm-delete-lifecycle-example]]
- ==== {api-examples-title}
- ////
- [source,console]
- --------------------------------------------------
- PUT /_index_template/my-template
- {
- "index_patterns" : ["my-data-stream*"],
- "priority" : 1,
- "data_stream": {},
- "template": {
- "lifecycle" : {
- "data_retention" : "7d"
- }
- }
- }
- PUT /_data_stream/my-data-stream
- --------------------------------------------------
- // TESTSETUP
- [source,console]
- --------------------------------------------------
- DELETE _data_stream/my-data-stream
- DELETE _index_template/my-template
- --------------------------------------------------
- // TEARDOWN
- ////
- The following example deletes the lifecycle of `my-data-stream`:
- [source,console]
- --------------------------------------------------
- DELETE _data_stream/my-data-stream/_lifecycle
- --------------------------------------------------
- When the policy is successfully deleted from all selected data streams, you receive the following result:
- [source,console-result]
- --------------------------------------------------
- {
- "acknowledged": true
- }
- --------------------------------------------------
|