Skip to content

GetEnabledControl

Source: src/AWS/ControlTower/GetEnabledControl.ts

Runtime binding for controltower:GetEnabledControl.

Bind this operation to an EnabledControl to read the enablement’s live status, drift status, and parameters from inside a function runtime. Useful for drift-monitoring functions that alert when a guardrail drifts. Provide the implementation with Effect.provide(AWS.ControlTower.GetEnabledControlHttp).

// init — bind the operation to the enabled control
const getEnabledControl = yield* AWS.ControlTower.GetEnabledControl(guardrail);
// runtime
const { enabledControlDetails } = yield* getEnabledControl();
console.log(enabledControlDetails.driftStatusSummary?.driftStatus);