SetInstanceProtection
Source:
src/AWS/AutoScaling/SetInstanceProtection.ts
Runtime binding for the SetInstanceProtection operation (IAM action
autoscaling:SetInstanceProtection scoped to the group ARN).
Toggles scale-in protection on instances — e.g. a worker protects itself
while it processes a long-running job, then removes protection when idle so
the group may reclaim it. Provide the implementation with
Effect.provide(AWS.AutoScaling.SetInstanceProtectionHttp).
Scale-In Protection
Section titled “Scale-In Protection”// init — bind the operation to the groupconst setInstanceProtection = yield* AWS.AutoScaling.SetInstanceProtection(group);
// runtime — protect while working, release when idleyield* setInstanceProtection({ InstanceIds: [instanceId], ProtectedFromScaleIn: true,});