Skip to content

DeregisterTargets

Source: src/AWS/ELBv2/DeregisterTargets.ts

Runtime binding for the DeregisterTargets operation (IAM action elasticloadbalancing:DeregisterTargets scoped to the target-group ARN).

Deregisters targets from the bound target group at runtime — the target enters draining and is removed once in-flight requests complete. Pairs with RegisterTargets for custom blue/green orchestration or graceful self-removal on shutdown. Provide the implementation with Effect.provide(AWS.ELBv2.DeregisterTargetsHttp).

// init — bind the operation to the target group
const deregisterTargets = yield* AWS.ELBv2.DeregisterTargets(targetGroup);
// runtime — start draining the target
yield* deregisterTargets({
Targets: [{ Id: "10.0.1.15", Port: 8080 }],
});