getLoadBalancers

This data source provides the Alb Load Balancers of the current Alibaba Cloud user.

NOTE: Available in v1.132.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.alb.AlbFunctions;
import com.pulumi.alicloud.alb.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 = AlbFunctions.getLoadBalancers();
ctx.export("albLoadBalancerId1", ids.applyValue(getLoadBalancersResult -> getLoadBalancersResult.balancers()[0].id()));
final var nameRegex = AlbFunctions.getLoadBalancers(GetLoadBalancersArgs.builder()
.nameRegex("^my-LoadBalancer")
.build());
ctx.export("albLoadBalancerId2", 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(addressType: String? = null, enableDetails: Boolean? = null, ids: List<String>? = null, loadBalancerBusinessStatus: String? = null, loadBalancerBussinessStatus: String? = null, loadBalancerIds: List<String>? = null, loadBalancerName: String? = null, nameRegex: String? = null, outputFile: String? = null, resourceGroupId: String? = null, status: String? = null, tags: Map<String, Any>? = null, vpcId: String? = null, vpcIds: List<String>? = null, zoneId: String? = null): GetLoadBalancersResult

Return

A collection of values returned by getLoadBalancers.

See also

Parameters

addressType

The type of IP address that the ALB instance uses to provide services.

enableDetails

Default to false. Set it to true can output more details about resource attributes.

ids

A list of Load Balancer IDs.

loadBalancerBusinessStatus

Load Balancing of the Service Status. Valid Values: Abnormal and Normal. NOTE: Available in 1.142.0+

loadBalancerBussinessStatus

Load Balancing of the Service Status. Valid Values: Abnormal and Normal. NOTE: Field 'load_balancer_bussiness_status' has been deprecated from provider version 1.142.0.

loadBalancerIds

The load balancer ids.

loadBalancerName

The name of the resource.

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 The load balancer status. Valid values: Active, Configuring, CreateFailed, Inactive and Provisioning.

tags

The tag of the resource.

vpcId

The ID of the virtual private cloud (VPC) where the ALB instance is deployed.

vpcIds

The vpc ids.

zoneId

The ID of the zone to which the ALB instance belongs.


Return

A collection of values returned by getLoadBalancers.

See also

Parameters

argument

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