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:
Colin Goodheart-Smithe 2018-11-13 20:40:53 +00:00 committed by GitHub
parent 9728119b82
commit c934fb087a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 178 additions and 2 deletions

View 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[]

View file

@ -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[]