attachLoadBalancerToSubnets
abstract suspend fun attachLoadBalancerToSubnets(input: AttachLoadBalancerToSubnetsRequest): AttachLoadBalancerToSubnetsResponse
Adds one or more subnets to the set of configured subnets for the specified load balancer.
The load balancer evenly distributes requests across all registered subnets. For more information, see Add or Remove Subnets for Your Load Balancer in a VPC in the Classic Load Balancers Guide.
Samples
fun main() {
//sampleStart
// This example adds the specified subnet to the set of configured subnets for the specified load
// balancer.
val resp = elasticLoadBalancingClient.attachLoadBalancerToSubnets {
loadBalancerName = "my-load-balancer"
subnets = listOf<String>(
"subnet-0ecac448"
)
}
//sampleEnd
}