Skip to content

GetLifecyclePolicy

Source: src/AWS/DLM/GetLifecyclePolicy.ts

Runtime binding for dlm:GetLifecyclePolicy.

Reads the bound LifecyclePolicy’s full detail — state (including the observed-only ERROR), status message, execution role, and the complete policy document — so an ops function can audit backup coverage or alert on a policy that stopped running. The policy id is injected from the binding. Provide the implementation with Effect.provide(AWS.DLM.GetLifecyclePolicyHttp).

// init — bind the operation to the lifecycle policy
const getLifecyclePolicy = yield* AWS.DLM.GetLifecyclePolicy(policy);
// runtime
const { Policy } = yield* getLifecyclePolicy();
if (Policy?.State === "ERROR") {
yield* Effect.logError(`DLM policy failed: ${Policy.StatusMessage}`);
}