get_lifecycle_policy.asciidoc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --
  2. :api: ilm-get-lifecycle-policy
  3. :request: GetLifecyclePolicyRequest
  4. :response: GetLifecyclePolicyResponse
  5. --
  6. [id="{upid}-{api}"]
  7. === Get Lifecycle Policy API
  8. [id="{upid}-{api}-request"]
  9. ==== Request
  10. The Get Lifecycle Policy API allows you to retrieve the definition of an Index
  11. Lifecycle Management Policy from the cluster.
  12. ["source","java",subs="attributes,callouts,macros"]
  13. --------------------------------------------------
  14. include-tagged::{doc-tests-file}[{api}-request]
  15. --------------------------------------------------
  16. <1> Gets all policies.
  17. <2> Gets `my_policy` and `other_policy`
  18. [id="{upid}-{api}-response"]
  19. ==== Response
  20. The returned +{response}+ contains a map of `LifecyclePolicyMetadata`,
  21. accessible by the name of the policy, which contains data about each policy,
  22. as well as the policy definition.
  23. ["source","java",subs="attributes,callouts,macros"]
  24. --------------------------------------------------
  25. include-tagged::{doc-tests-file}[{api}-response]
  26. --------------------------------------------------
  27. <1> The retrieved policies are retrieved by name.
  28. <2> The policy definition itself.
  29. include::../execution.asciidoc[]