get_snapshot_lifecycle_policy.asciidoc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --
  2. :api: slm-get-snapshot-lifecycle-policy
  3. :request: GetSnapshotLifecyclePolicyRequest
  4. :response: GetSnapshotLifecyclePolicyResponse
  5. --
  6. [role="xpack"]
  7. [id="{upid}-{api}"]
  8. === Get Snapshot Lifecycle Policy API
  9. [id="{upid}-{api}-request"]
  10. ==== Request
  11. The Get Snapshot Lifecycle Policy API allows you to retrieve the definition of a Snapshot Lifecycle
  12. Management Policy from the cluster.
  13. ["source","java",subs="attributes,callouts,macros"]
  14. --------------------------------------------------
  15. include-tagged::{doc-tests-file}[{api}-request]
  16. --------------------------------------------------
  17. <1> Gets all policies.
  18. <2> Gets `policy_id`
  19. [id="{upid}-{api}-response"]
  20. ==== Response
  21. The returned +{response}+ contains a map of `SnapshotLifecyclePolicyMetadata`, accessible by the id
  22. of the policy, which contains data about each policy, 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 id.
  28. <2> The policy definition itself.
  29. include::../execution.asciidoc[]