123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- [[data-streams-delete-global-retention]]
- === Delete the global retention of data streams
- ++++
- <titleabbrev>Delete Data Stream Global Retention</titleabbrev>
- ++++
- preview::[]
- Deletes the global retention configuration that applies on every data stream managed by <<data-stream-lifecycle,data stream lifecycle>>.
- [[delete-global-retention-api-prereqs]]
- ==== {api-prereq-title}
- ** If the {es} {security-features} are enabled, you must have the `manage_data_stream_global_retention` <<privileges-list-cluster,cluster privilege>> to use this API.
- [[data-streams-delete-global-retention-request]]
- ==== {api-request-title}
- `DELETE _data_stream/_global_retention`
- [[data-streams-delete-global-retention-desc]]
- ==== {api-description-title}
- Deletes the global retention configuration that is applied on data streams managed by data stream lifecycle.
- [role="child_attributes"]
- [[delete-global-retention-api-query-parms]]
- ==== {api-query-parms-title}
- `dry_run`::
- (Boolean) Signals that the request should determine the effect of the removal of the existing without updating
- the global retention. The default value is `false`, which means the removal will happen.
- [[delete-global-retention-api-response-body]]
- ==== {api-response-body-title}
- `acknowledged`::
- (boolean)
- True, if the global retention has been removed. False, if it fails or if it was a dry run.
- `dry_run`::
- (boolean)
- True, if this was a dry run, false otherwise.
- `affected_data_streams`::
- (array of objects)
- Contains information about the data streams affected by the change.
- +
- .Properties of objects in `affected_data_streams`
- [%collapsible%open]
- ====
- `name`::
- (string)
- Name of the data stream.
- `previous_effective_retention`::
- (string)
- The retention that was effective before the change of this request. `infinite` if there was no retention applicable.
- `new_effective_retention`::
- (string)
- The retention that is or would be effective after this request. `infinite` if there is no retention applicable.
- ====
- [[data-streams-delete-global-retention-example]]
- ==== {api-examples-title}
- ////
- [source,console]
- --------------------------------------------------
- PUT _data_stream/_global_retention
- {
- "default_retention": "7d",
- "max_retention": "90d"
- }
- PUT /_index_template/template
- {
- "index_patterns": ["my-data-stream*"],
- "template": {
- "lifecycle": {}
- },
- "data_stream": { }
- }
- PUT /_data_stream/my-data-stream
- ----
- // TESTSETUP
- ////
- ////
- [source,console]
- ----
- DELETE /_data_stream/my-data-stream*
- DELETE /_index_template/template
- DELETE /_data_stream/_global_retention
- ----
- // TEARDOWN
- ////
- Let's update the global retention:
- [source,console]
- --------------------------------------------------
- DELETE _data_stream/_global_retention
- --------------------------------------------------
- The response will look like the following:
- [source,console-result]
- --------------------------------------------------
- {
- "acknowledged": true,
- "dry_run": false,
- "affected_data_streams": [
- {
- "name": "my-data-stream",
- "previous_effective_retention": "7d",
- "new_effective_retention": "infinite"
- }
- ]
- }
- --------------------------------------------------
|