Package org.elasticsearch.xpack.core.slm


package org.elasticsearch.xpack.core.slm
This is the Snapshot Lifecycle Management (SLM) core package. This package contains the core classes for SLM, including all of the custom cluster state metadata objects, execution history storage facilities, and the action definitions. For the main SLM service implementation classes, please see the ilmilm module's org.elasticsearch.xpack.slm package.

Contained within this specific package are the custom metadata objects and models used through out the SLM service. The names can be confusing, so it's important to know the differences between each metadata object.

The SnapshotLifecyclePolicy object is the user provided definition of the SLM policy. This is what a user provides when creating a snapshot policy, and acts as the blueprint for the create snapshot request that the service launches. It additionally surfaces the next point in time a policy should be executed.

Lateral to the policy, the SnapshotInvocationRecord represents an execution of a policy. It includes within it the policy name and details about its execution, success or failure.

Next is the SnapshotLifecyclePolicyMetadata object, which not only contains the SnapshotLifecyclePolicy blueprint, but also any contextual information about that policy, like the user information of who created it so that it may be used during execution, as well as the version of the policy, and both the last failed and successful runs as SnapshotInvocationRecords. This is the living representation of a policy within the cluster state.

When a "Get Policy" action is executed, the SnapshotLifecyclePolicyItem is returned instead. This is a thin wrapper around the internal SnapshotLifecyclePolicyMetadata object so that we do not expose any sensitive internal headers or user information in the Get API.

Finally, the SnapshotLifecycleMetadata class contains all living SLM policies and their metadata, acting as the SLM specific root object within the cluster state.