getLB

suspend fun getLB(argument: GetLBPlainArgs): GetLBResult

Use this data source to access information about an existing Load Balancer

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.lb.LbFunctions;
import com.pulumi.azure.lb.inputs.GetLBArgs;
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 example = LbFunctions.getLB(GetLBArgs.builder()
.name("example-lb")
.resourceGroupName("example-resources")
.build());
ctx.export("loadbalancerId", example.applyValue(getLBResult -> getLBResult.id()));
}
}

Return

A collection of values returned by getLB.

Parameters

argument

A collection of arguments for invoking getLB.


suspend fun getLB(name: String, resourceGroupName: String): GetLBResult

Return

A collection of values returned by getLB.

See also

Parameters

name

Specifies the name of the Load Balancer.

resourceGroupName

The name of the Resource Group in which the Load Balancer exists.


suspend fun getLB(argument: suspend GetLBPlainArgsBuilder.() -> Unit): GetLBResult

Return

A collection of values returned by getLB.

See also

Parameters

argument

Builder for com.pulumi.azure.lb.kotlin.inputs.GetLBPlainArgs.