GetTargetGroup
Note:
aws.alb.TargetGroupis known asaws.lb.TargetGroup. The functionality is identical.
Provides information about a Load Balancer Target Group.
This data source can prove useful when a module accepts an LB Target Group as an input variable and needs to know its attributes. It can also be used to get the ARN of an LB Target Group for use in other resources, given LB Target Group name.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var config = new Config();
var lbTgArn = config.Get("lbTgArn") ?? "";
var lbTgName = config.Get("lbTgName") ?? "";
var test = Output.Create(Aws.LB.GetTargetGroup.InvokeAsync(new Aws.LB.GetTargetGroupArgs
{
Arn = lbTgArn,
Name = lbTgName,
}));
}
}
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 := lbTgArn
opt1 := lbTgName
_, err := lb.LookupTargetGroup(ctx, &lb.LookupTargetGroupArgs{
Arn: &opt0,
Name: &opt1,
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
config = pulumi.Config()
lb_tg_arn = config.get("lbTgArn")
if lb_tg_arn is None:
lb_tg_arn = ""
lb_tg_name = config.get("lbTgName")
if lb_tg_name is None:
lb_tg_name = ""
test = aws.lb.get_target_group(arn=lb_tg_arn,
name=lb_tg_name)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const lbTgArn = config.get("lbTgArn") || "";
const lbTgName = config.get("lbTgName") || "";
const test = pulumi.output(aws.lb.getTargetGroup({
arn: lbTgArn,
name: lbTgName,
}, { async: true }));Deprecated: aws.applicationloadbalancing.getTargetGroup has been deprecated in favor of aws.alb.getTargetGroup
Using GetTargetGroup
function getTargetGroup(args: GetTargetGroupArgs, opts?: InvokeOptions): Promise<GetTargetGroupResult>function get_target_group(arn=None, name=None, tags=None, opts=None)func LookupTargetGroup(ctx *Context, args *LookupTargetGroupArgs, opts ...InvokeOption) (*LookupTargetGroupResult, error)Note: This function is named
LookupTargetGroupin the Go SDK.
public static class GetTargetGroup {
public static Task<GetTargetGroupResult> InvokeAsync(GetTargetGroupArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetTargetGroup Result
The following output properties are available:
- Arn string
- Arn
Suffix string - Deregistration
Delay int - Health
Check GetTarget Group Health Check - Id string
The provider-assigned unique ID for this managed resource.
- Lambda
Multi boolValue Headers Enabled - Load
Balancing stringAlgorithm Type - Name string
- Port int
- Protocol string
- Proxy
Protocol boolV2 - Slow
Start int - Stickiness
Get
Target Group Stickiness - Dictionary<string, string>
- Target
Type string - Vpc
Id string
- Arn string
- Arn
Suffix string - Deregistration
Delay int - Health
Check GetTarget Group Health Check - Id string
The provider-assigned unique ID for this managed resource.
- Lambda
Multi boolValue Headers Enabled - Load
Balancing stringAlgorithm Type - Name string
- Port int
- Protocol string
- Proxy
Protocol boolV2 - Slow
Start int - Stickiness
Get
Target Group Stickiness - map[string]string
- Target
Type string - Vpc
Id string
- arn string
- arn
Suffix string - deregistration
Delay number - health
Check GetTarget Group Health Check - id string
The provider-assigned unique ID for this managed resource.
- lambda
Multi booleanValue Headers Enabled - load
Balancing stringAlgorithm Type - name string
- port number
- protocol string
- proxy
Protocol booleanV2 - slow
Start number - stickiness
Get
Target Group Stickiness - {[key: string]: string}
- target
Type string - vpc
Id string
- arn str
- arn_
suffix str - deregistration_
delay float - health_
check Dict[GetTarget Group Health Check] - id str
The provider-assigned unique ID for this managed resource.
- lambda_
multi_ boolvalue_ headers_ enabled - load_
balancing_ stralgorithm_ type - name str
- port float
- protocol str
- proxy_
protocol_ boolv2 - slow_
start float - stickiness
Dict[Get
Target Group Stickiness] - Dict[str, str]
- target_
type str - vpc_
id str
Supporting Types
GetTargetGroupHealthCheck
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetTargetGroupStickiness
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.