Class LifecyclePolicyConfig

java.lang.Object
org.elasticsearch.xpack.core.template.LifecyclePolicyConfig

public class LifecyclePolicyConfig extends Object
Describes an index lifecycle policy to be loaded from a resource file for use with an IndexTemplateRegistry.
  • Field Details

    • DEFAULT_X_CONTENT_REGISTRY

      public static final org.elasticsearch.xcontent.NamedXContentRegistry DEFAULT_X_CONTENT_REGISTRY
  • Constructor Details

    • LifecyclePolicyConfig

      public LifecyclePolicyConfig(String policyName, String fileName)
      Describes a lifecycle policy definition to be loaded from a resource file.
      Parameters:
      policyName - The name that will be used for the policy.
      fileName - The filename the policy definition should be loaded from. Literal, should include leading / and extension if necessary.
    • LifecyclePolicyConfig

      public LifecyclePolicyConfig(String policyName, String fileName, Map<String,String> templateVariables)
      Describes a lifecycle policy definition to be loaded from a resource file.
      Parameters:
      policyName - The name that will be used for the policy.
      fileName - The filename the policy definition should be loaded from. Literal, should include leading / and extension if necessary.
      templateVariables - A map containing values for template variables present in the resource file.
  • Method Details

    • getPolicyName

      public String getPolicyName()
    • getFileName

      public String getFileName()
    • load

      public LifecyclePolicy load(org.elasticsearch.xcontent.NamedXContentRegistry xContentRegistry)