Skip to content

RegisterTargets

Source: src/AWS/ELBv2/RegisterTargets.ts

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

Registers targets (instances, IPs, Lambda functions, or an ALB) with the bound target group at runtime — e.g. custom blue/green orchestration, or compute that registers itself into a target group at boot. Provide the implementation with Effect.provide(AWS.ELBv2.RegisterTargetsHttp).

// init — bind the operation to the target group
const registerTargets = yield* AWS.ELBv2.RegisterTargets(targetGroup);
// runtime — register a target by IP and port
yield* registerTargets({
Targets: [{ Id: "10.0.1.15", Port: 8080 }],
});