mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
Adds HLRC docs for put lifecycle policy (#35457)
* Adds HLRC docs for put lifecycle policy * Adds link to docs in client javadocs * Fixes checkstyle * Make the documentation use the right ack response
This commit is contained in:
parent
9728119b82
commit
c934fb087a
4 changed files with 178 additions and 2 deletions
38
docs/java-rest/high-level/ilm/put_lifecycle_policy.asciidoc
Normal file
38
docs/java-rest/high-level/ilm/put_lifecycle_policy.asciidoc
Normal file
|
@ -0,0 +1,38 @@
|
|||
--
|
||||
:api: ilm-put-lifecycle-policy
|
||||
:request: PutLifecyclePolicyRequest
|
||||
:response: AcknowledgedResponse
|
||||
--
|
||||
|
||||
[id="{upid}-{api}"]
|
||||
=== Put Lifecycle Policy API
|
||||
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Request
|
||||
|
||||
The Put Lifecycle Policy API allows you to add an Index Lifecycle Management
|
||||
Policy to the cluster.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
<1> Adds a hot phase with a rollover action
|
||||
<2> Adds a delete phase that will delete in the index 90 days after rollover
|
||||
<3> Creates the policy with the defined phases and the name `my_policy`
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Response
|
||||
|
||||
The returned +{response}+ indicates if the put lifecycle policy request was received.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
||||
<1> Whether or not the put lifecycle policy was acknowledge.
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
|
|
@ -420,3 +420,15 @@ The Java High Level REST Client supports the following CCR APIs:
|
|||
|
||||
include::ccr/put_follow.asciidoc[]
|
||||
include::ccr/pause_follow.asciidoc[]
|
||||
|
||||
== Index Lifecycle Management APIs
|
||||
|
||||
:upid: {mainid}-ilm
|
||||
:doc-tests-file: {doc-tests}/ILMDocumentationIT.java
|
||||
|
||||
The Java High Level REST Client supports the following Index Lifecycle
|
||||
Management APIs:
|
||||
|
||||
* <<{upid}-ilm-put-lifecycle-policy>>
|
||||
|
||||
include::ilm/put_lifecycle_policy.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue