Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.lb.getLbs
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Use this data source to get a list of Load Balancer ARNs matching the specified criteria. Useful for passing to other resources.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.lb.getLbs({
tags: {
"elbv2.k8s.aws/cluster": "my-cluster",
},
});
import pulumi
import pulumi_aws as aws
example = aws.lb.get_lbs(tags={
"elbv2.k8s.aws/cluster": "my-cluster",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lb.GetLbs(ctx, &lb.GetLbsArgs{
Tags: map[string]interface{}{
"elbv2.k8s.aws/cluster": "my-cluster",
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.LB.GetLbs.Invoke(new()
{
Tags =
{
{ "elbv2.k8s.aws/cluster", "my-cluster" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lb.LbFunctions;
import com.pulumi.aws.lb.inputs.GetLbsArgs;
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.getLbs(GetLbsArgs.builder()
.tags(Map.of("elbv2.k8s.aws/cluster", "my-cluster"))
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:lb:getLbs
Arguments:
tags:
elbv2.k8s.aws/cluster: my-cluster
Using getLbs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLbs(args: GetLbsArgs, opts?: InvokeOptions): Promise<GetLbsResult>
function getLbsOutput(args: GetLbsOutputArgs, opts?: InvokeOptions): Output<GetLbsResult>
def get_lbs(tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetLbsResult
def get_lbs_output(tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLbsResult]
func GetLbs(ctx *Context, args *GetLbsArgs, opts ...InvokeOption) (*GetLbsResult, error)
func GetLbsOutput(ctx *Context, args *GetLbsOutputArgs, opts ...InvokeOption) GetLbsResultOutput
> Note: This function is named GetLbs
in the Go SDK.
public static class GetLbs
{
public static Task<GetLbsResult> InvokeAsync(GetLbsArgs args, InvokeOptions? opts = null)
public static Output<GetLbsResult> Invoke(GetLbsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLbsResult> getLbs(GetLbsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:lb/getLbs:getLbs
arguments:
# arguments dictionary
The following arguments are supported:
- Dictionary<string, string>
- Map of tags, each pair of which must exactly match a pair on the desired Load Balancers.
- map[string]string
- Map of tags, each pair of which must exactly match a pair on the desired Load Balancers.
- Map<String,String>
- Map of tags, each pair of which must exactly match a pair on the desired Load Balancers.
- {[key: string]: string}
- Map of tags, each pair of which must exactly match a pair on the desired Load Balancers.
- Mapping[str, str]
- Map of tags, each pair of which must exactly match a pair on the desired Load Balancers.
- Map<String>
- Map of tags, each pair of which must exactly match a pair on the desired Load Balancers.
getLbs Result
The following output properties are available:
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi