get Load Balancers
This data source provides the Nlb Load Balancers of the current Alibaba Cloud user.
NOTE: Available in v1.191.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nlb.NlbFunctions;
import com.pulumi.alicloud.nlb.inputs.GetLoadBalancersArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var ids = NlbFunctions.getLoadBalancers(GetLoadBalancersArgs.builder()
.ids("example_id")
.build());
ctx.export("nlbLoadBalancerId1", ids.applyValue(getLoadBalancersResult -> getLoadBalancersResult.balancers()[0].id()));
final var nameRegex = NlbFunctions.getLoadBalancers(GetLoadBalancersArgs.builder()
.nameRegex("^my-LoadBalancer")
.build());
ctx.export("nlbLoadBalancerId2", nameRegex.applyValue(getLoadBalancersResult -> getLoadBalancersResult.balancers()[0].id()));
}
}
Return
A collection of values returned by getLoadBalancers.
Parameters
A collection of arguments for invoking getLoadBalancers.
Return
A collection of values returned by getLoadBalancers.
See also
Parameters
The IP version.
The type of IPv4 address used by the NLB instance.
The domain name of the NLB instance.
A list of Load Balancer IDs.
The type of IPv6 address used by the NLB instance.
The business status of the NLB instance.
The name of the NLB instance. You can specify at most 10 names.
A regex string to filter results by Load Balancer name.
File name where to save data source results (after running pulumi preview
).
The ID of the resource group.
The status of the NLB instance.
The tag of the resource.
The ID of the virtual private cloud (VPC) where the NLB instance is deployed. You can specify at most 10 IDs.
The name of the zone.
Return
A collection of values returned by getLoadBalancers.
See also
Parameters
Builder for com.pulumi.alicloud.nlb.kotlin.inputs.GetLoadBalancersPlainArgs.