getLoadBalancers

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

argument

A collection of arguments for invoking getLoadBalancers.


suspend fun getLoadBalancers(addressIpVersion: String? = null, addressType: String? = null, dnsName: String? = null, ids: List<String>? = null, ipv6AddressType: String? = null, loadBalancerBusinessStatus: String? = null, loadBalancerNames: List<String>? = null, nameRegex: String? = null, outputFile: String? = null, resourceGroupId: String? = null, status: String? = null, tags: Map<String, Any>? = null, vpcIds: List<String>? = null, zoneId: String? = null): GetLoadBalancersResult

Return

A collection of values returned by getLoadBalancers.

See also

Parameters

addressIpVersion

The IP version.

addressType

The type of IPv4 address used by the NLB instance.

dnsName

The domain name of the NLB instance.

ids

A list of Load Balancer IDs.

ipv6AddressType

The type of IPv6 address used by the NLB instance.

loadBalancerBusinessStatus

The business status of the NLB instance.

loadBalancerNames

The name of the NLB instance. You can specify at most 10 names.

nameRegex

A regex string to filter results by Load Balancer name.

outputFile

File name where to save data source results (after running pulumi preview).

resourceGroupId

The ID of the resource group.

status

The status of the NLB instance.

tags

The tag of the resource.

vpcIds

The ID of the virtual private cloud (VPC) where the NLB instance is deployed. You can specify at most 10 IDs.

zoneId

The name of the zone.


Return

A collection of values returned by getLoadBalancers.

See also

Parameters

argument

Builder for com.pulumi.alicloud.nlb.kotlin.inputs.GetLoadBalancersPlainArgs.