GetLoadBalancer
Note:
aws.alb.LoadBalanceris known asaws.lb.LoadBalancer. The functionality is identical.
Provides information about a Load Balancer.
This data source can prove useful when a module accepts an LB as an input variable and needs to, for example, determine the security groups associated with it, etc.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var lbArn = config.Get("lbArn") ?? "";
var lbName = config.Get("lbName") ?? "";
var test = Output.Create(Aws.LB.GetLoadBalancer.InvokeAsync(new Aws.LB.GetLoadBalancerArgs
{
Arn = lbArn,
Name = lbName,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lb"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := lbArn
opt1 := lbName
_, err := lb.LookupLoadBalancer(ctx, &lb.LookupLoadBalancerArgs{
Arn: &opt0,
Name: &opt1,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
config = pulumi.Config()
lb_arn = config.get("lbArn")
if lb_arn is None:
lb_arn = ""
lb_name = config.get("lbName")
if lb_name is None:
lb_name = ""
test = aws.lb.get_load_balancer(arn=lb_arn,
name=lb_name)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const lbArn = config.get("lbArn") || "";
const lbName = config.get("lbName") || "";
const test = pulumi.output(aws.lb.getLoadBalancer({
arn: lbArn,
name: lbName,
}, { async: true }));Deprecated: aws.applicationloadbalancing.getLoadBalancer has been deprecated in favor of aws.alb.getLoadBalancer
Using GetLoadBalancer
function getLoadBalancer(args: GetLoadBalancerArgs, opts?: InvokeOptions): Promise<GetLoadBalancerResult>function get_load_balancer(arn=None, name=None, tags=None, opts=None)func LookupLoadBalancer(ctx *Context, args *LookupLoadBalancerArgs, opts ...InvokeOption) (*LookupLoadBalancerResult, error)Note: This function is named
LookupLoadBalancerin the Go SDK.
public static class GetLoadBalancer {
public static Task<GetLoadBalancerResult> InvokeAsync(GetLoadBalancerArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetLoadBalancer Result
The following output properties are available:
- Access
Logs GetLoad Balancer Access Logs - Arn string
- Arn
Suffix string - Dns
Name string - Drop
Invalid boolHeader Fields - Enable
Deletion boolProtection - Id string
The provider-assigned unique ID for this managed resource.
- Idle
Timeout int - Internal bool
- Ip
Address stringType - Load
Balancer stringType - Name string
- Security
Groups List<string> - Subnet
Mappings List<GetLoad Balancer Subnet Mapping> - Subnets List<string>
- Dictionary<string, string>
- Vpc
Id string - Zone
Id string
- Access
Logs GetLoad Balancer Access Logs - Arn string
- Arn
Suffix string - Dns
Name string - Drop
Invalid boolHeader Fields - Enable
Deletion boolProtection - Id string
The provider-assigned unique ID for this managed resource.
- Idle
Timeout int - Internal bool
- Ip
Address stringType - Load
Balancer stringType - Name string
- Security
Groups []string - Subnet
Mappings []GetLoad Balancer Subnet Mapping - Subnets []string
- map[string]string
- Vpc
Id string - Zone
Id string
- access
Logs GetLoad Balancer Access Logs - arn string
- arn
Suffix string - dns
Name string - drop
Invalid booleanHeader Fields - enable
Deletion booleanProtection - id string
The provider-assigned unique ID for this managed resource.
- idle
Timeout number - internal boolean
- ip
Address stringType - load
Balancer stringType - name string
- security
Groups string[] - subnet
Mappings GetLoad Balancer Subnet Mapping[] - subnets string[]
- {[key: string]: string}
- vpc
Id string - zone
Id string
- access_
logs Dict[GetLoad Balancer Access Logs] - arn str
- arn_
suffix str - dns_
name str - drop_
invalid_ boolheader_ fields - enable_
deletion_ boolprotection - id str
The provider-assigned unique ID for this managed resource.
- idle_
timeout float - internal bool
- ip_
address_ strtype - load_
balancer_ strtype - name str
- security_
groups List[str] - subnet_
mappings List[GetLoad Balancer Subnet Mapping] - subnets List[str]
- Dict[str, str]
- vpc_
id str - zone_
id str
Supporting Types
GetLoadBalancerAccessLogs
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetLoadBalancerSubnetMapping
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.