$lb = $hetznerClient->loadBalancers()->getByName('...');
foreach($lb->targets as $target) {
$ip = new LoadBalancerTargetIp($target->ip->ip);
$lb->removeTarget('ip', $ip);
}
Same for addTarget
How I expected it to work;
$lb = $hetznerClient->loadBalancers()->getByName('...');
foreach($lb->targets as $target) {
$lb->removeTarget($target);
# or maybe, or make it smart and work with $target only aswell
$lb->removeTargetByIp($target->ip);
}
This can't be meant how it's to be used is it?
Same for addTarget
How I expected it to work;
Also missing a removeTargets($targets);