Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the lifecycle field in the PUT _lifecycle request #95201

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

andreidan
Copy link
Contributor

@andreidan andreidan commented Apr 12, 2023

This removes a redundant lifecycle field in the PUT _lifecycle request.

Before we had

PUT _data_stream/logs-nginx/_lifecycle
{
    "lifecycle": {
        "data_retention": "7d"
    }
}

This changes the request to

PUT _data_stream/logs-nginx/_lifecycle
{
  "data_retention": "7d"
}

To configure a lifecycle with infinite retention the following request is needed:

PUT _data_stream/logs-nginx/_lifecycle
{
}

Relates to #93596

This removes a redundant `lifecycle` field in the `PUT _lifecycle`
request.

Before we had
```
PUT _data_stream/logs-nginx/_lifecycle
{
    "lifecycle": {
        "data_retention": "7d"
    }
}
```

This changes the request to
```
PUT _data_stream/logs-nginx/_lifecycle
{
  "data_retention": "7d"
}
```
@github-actions
Copy link
Contributor

Documentation preview:

@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Apr 12, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@andreidan
Copy link
Contributor Author

@elasticmachine update branch

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Andrei

@andreidan andreidan merged commit 8340260 into elastic:main Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>refactoring Team:Data Management Meta label for data/management team v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants