We recommend new projects start with resources from the AWS provider.
AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi
aws-native.elasticloadbalancingv2.getTargetGroup
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi
Resource Type definition for AWS::ElasticLoadBalancingV2::TargetGroup
Using getTargetGroup
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 getTargetGroup(args: GetTargetGroupArgs, opts?: InvokeOptions): Promise<GetTargetGroupResult>
function getTargetGroupOutput(args: GetTargetGroupOutputArgs, opts?: InvokeOptions): Output<GetTargetGroupResult>def get_target_group(target_group_arn: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetTargetGroupResult
def get_target_group_output(target_group_arn: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetTargetGroupResult]func LookupTargetGroup(ctx *Context, args *LookupTargetGroupArgs, opts ...InvokeOption) (*LookupTargetGroupResult, error)
func LookupTargetGroupOutput(ctx *Context, args *LookupTargetGroupOutputArgs, opts ...InvokeOption) LookupTargetGroupResultOutput> Note: This function is named LookupTargetGroup in the Go SDK.
public static class GetTargetGroup 
{
    public static Task<GetTargetGroupResult> InvokeAsync(GetTargetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetTargetGroupResult> Invoke(GetTargetGroupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTargetGroupResult> getTargetGroup(GetTargetGroupArgs args, InvokeOptions options)
public static Output<GetTargetGroupResult> getTargetGroup(GetTargetGroupArgs args, InvokeOptions options)
fn::invoke:
  function: aws-native:elasticloadbalancingv2:getTargetGroup
  arguments:
    # arguments dictionaryThe following arguments are supported:
- TargetGroup stringArn 
- The ARN of the Target Group
- TargetGroup stringArn 
- The ARN of the Target Group
- targetGroup StringArn 
- The ARN of the Target Group
- targetGroup stringArn 
- The ARN of the Target Group
- target_group_ strarn 
- The ARN of the Target Group
- targetGroup StringArn 
- The ARN of the Target Group
getTargetGroup Result
The following output properties are available:
- HealthCheck boolEnabled 
- Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
- HealthCheck intInterval Seconds 
- The approximate amount of time, in seconds, between health checks of an individual target.
- HealthCheck stringPath 
- [HTTP/HTTPS health checks] The destination for health checks on the targets. [HTTP1 or HTTP2 protocol version] The ping path. The default is /. [GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /AWS.ALB/healthcheck.
- HealthCheck stringPort 
- The port the load balancer uses when performing health checks on targets.
- HealthCheck stringProtocol 
- The protocol the load balancer uses when performing health checks on targets.
- HealthCheck intTimeout Seconds 
- The amount of time, in seconds, during which no response from a target means a failed health check.
- HealthyThreshold intCount 
- The number of consecutive health checks successes required before considering an unhealthy target healthy.
- LoadBalancer List<string>Arns 
- The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- Matcher
Pulumi.Aws Native. Elastic Load Balancing V2. Outputs. Target Group Matcher 
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- 
List<Pulumi.Aws Native. Outputs. Tag> 
- The tags.
- TargetGroup stringArn 
- The ARN of the Target Group
- TargetGroup List<Pulumi.Attributes Aws Native. Elastic Load Balancing V2. Outputs. Target Group Attribute> 
- The attributes.
- TargetGroup stringFull Name 
- The full name of the target group.
- TargetGroup stringName 
- The name of the target group.
- Targets
List<Pulumi.Aws Native. Elastic Load Balancing V2. Outputs. Target Group Target Description> 
- The targets.
- UnhealthyThreshold intCount 
- The number of consecutive health check failures required before considering a target unhealthy.
- HealthCheck boolEnabled 
- Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
- HealthCheck intInterval Seconds 
- The approximate amount of time, in seconds, between health checks of an individual target.
- HealthCheck stringPath 
- [HTTP/HTTPS health checks] The destination for health checks on the targets. [HTTP1 or HTTP2 protocol version] The ping path. The default is /. [GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /AWS.ALB/healthcheck.
- HealthCheck stringPort 
- The port the load balancer uses when performing health checks on targets.
- HealthCheck stringProtocol 
- The protocol the load balancer uses when performing health checks on targets.
- HealthCheck intTimeout Seconds 
- The amount of time, in seconds, during which no response from a target means a failed health check.
- HealthyThreshold intCount 
- The number of consecutive health checks successes required before considering an unhealthy target healthy.
- LoadBalancer []stringArns 
- The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- Matcher
TargetGroup Matcher 
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- Tag
- The tags.
- TargetGroup stringArn 
- The ARN of the Target Group
- TargetGroup []TargetAttributes Group Attribute 
- The attributes.
- TargetGroup stringFull Name 
- The full name of the target group.
- TargetGroup stringName 
- The name of the target group.
- Targets
[]TargetGroup Target Description 
- The targets.
- UnhealthyThreshold intCount 
- The number of consecutive health check failures required before considering a target unhealthy.
- healthCheck BooleanEnabled 
- Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
- healthCheck IntegerInterval Seconds 
- The approximate amount of time, in seconds, between health checks of an individual target.
- healthCheck StringPath 
- [HTTP/HTTPS health checks] The destination for health checks on the targets. [HTTP1 or HTTP2 protocol version] The ping path. The default is /. [GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /AWS.ALB/healthcheck.
- healthCheck StringPort 
- The port the load balancer uses when performing health checks on targets.
- healthCheck StringProtocol 
- The protocol the load balancer uses when performing health checks on targets.
- healthCheck IntegerTimeout Seconds 
- The amount of time, in seconds, during which no response from a target means a failed health check.
- healthyThreshold IntegerCount 
- The number of consecutive health checks successes required before considering an unhealthy target healthy.
- loadBalancer List<String>Arns 
- The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- matcher
TargetGroup Matcher 
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- List<Tag>
- The tags.
- targetGroup StringArn 
- The ARN of the Target Group
- targetGroup List<TargetAttributes Group Attribute> 
- The attributes.
- targetGroup StringFull Name 
- The full name of the target group.
- targetGroup StringName 
- The name of the target group.
- targets
List<TargetGroup Target Description> 
- The targets.
- unhealthyThreshold IntegerCount 
- The number of consecutive health check failures required before considering a target unhealthy.
- healthCheck booleanEnabled 
- Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
- healthCheck numberInterval Seconds 
- The approximate amount of time, in seconds, between health checks of an individual target.
- healthCheck stringPath 
- [HTTP/HTTPS health checks] The destination for health checks on the targets. [HTTP1 or HTTP2 protocol version] The ping path. The default is /. [GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /AWS.ALB/healthcheck.
- healthCheck stringPort 
- The port the load balancer uses when performing health checks on targets.
- healthCheck stringProtocol 
- The protocol the load balancer uses when performing health checks on targets.
- healthCheck numberTimeout Seconds 
- The amount of time, in seconds, during which no response from a target means a failed health check.
- healthyThreshold numberCount 
- The number of consecutive health checks successes required before considering an unhealthy target healthy.
- loadBalancer string[]Arns 
- The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- matcher
TargetGroup Matcher 
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- Tag[]
- The tags.
- targetGroup stringArn 
- The ARN of the Target Group
- targetGroup TargetAttributes Group Attribute[] 
- The attributes.
- targetGroup stringFull Name 
- The full name of the target group.
- targetGroup stringName 
- The name of the target group.
- targets
TargetGroup Target Description[] 
- The targets.
- unhealthyThreshold numberCount 
- The number of consecutive health check failures required before considering a target unhealthy.
- health_check_ boolenabled 
- Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
- health_check_ intinterval_ seconds 
- The approximate amount of time, in seconds, between health checks of an individual target.
- health_check_ strpath 
- [HTTP/HTTPS health checks] The destination for health checks on the targets. [HTTP1 or HTTP2 protocol version] The ping path. The default is /. [GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /AWS.ALB/healthcheck.
- health_check_ strport 
- The port the load balancer uses when performing health checks on targets.
- health_check_ strprotocol 
- The protocol the load balancer uses when performing health checks on targets.
- health_check_ inttimeout_ seconds 
- The amount of time, in seconds, during which no response from a target means a failed health check.
- healthy_threshold_ intcount 
- The number of consecutive health checks successes required before considering an unhealthy target healthy.
- load_balancer_ Sequence[str]arns 
- The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- matcher
TargetGroup Matcher 
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- Sequence[root_Tag]
- The tags.
- target_group_ strarn 
- The ARN of the Target Group
- target_group_ Sequence[Targetattributes Group Attribute] 
- The attributes.
- target_group_ strfull_ name 
- The full name of the target group.
- target_group_ strname 
- The name of the target group.
- targets
Sequence[TargetGroup Target Description] 
- The targets.
- unhealthy_threshold_ intcount 
- The number of consecutive health check failures required before considering a target unhealthy.
- healthCheck BooleanEnabled 
- Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
- healthCheck NumberInterval Seconds 
- The approximate amount of time, in seconds, between health checks of an individual target.
- healthCheck StringPath 
- [HTTP/HTTPS health checks] The destination for health checks on the targets. [HTTP1 or HTTP2 protocol version] The ping path. The default is /. [GRPC protocol version] The path of a custom health check method with the format /package.service/method. The default is /AWS.ALB/healthcheck.
- healthCheck StringPort 
- The port the load balancer uses when performing health checks on targets.
- healthCheck StringProtocol 
- The protocol the load balancer uses when performing health checks on targets.
- healthCheck NumberTimeout Seconds 
- The amount of time, in seconds, during which no response from a target means a failed health check.
- healthyThreshold NumberCount 
- The number of consecutive health checks successes required before considering an unhealthy target healthy.
- loadBalancer List<String>Arns 
- The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- matcher Property Map
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- List<Property Map>
- The tags.
- targetGroup StringArn 
- The ARN of the Target Group
- targetGroup List<Property Map>Attributes 
- The attributes.
- targetGroup StringFull Name 
- The full name of the target group.
- targetGroup StringName 
- The name of the target group.
- targets List<Property Map>
- The targets.
- unhealthyThreshold NumberCount 
- The number of consecutive health check failures required before considering a target unhealthy.
Supporting Types
Tag
TargetGroupAttribute  
TargetGroupMatcher  
- GrpcCode string
- You can specify values between 0 and 99. You can specify multiple values, or a range of values. The default value is 12.
- HttpCode string
- For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values or a range of values.
- GrpcCode string
- You can specify values between 0 and 99. You can specify multiple values, or a range of values. The default value is 12.
- HttpCode string
- For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values or a range of values.
- grpcCode String
- You can specify values between 0 and 99. You can specify multiple values, or a range of values. The default value is 12.
- httpCode String
- For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values or a range of values.
- grpcCode string
- You can specify values between 0 and 99. You can specify multiple values, or a range of values. The default value is 12.
- httpCode string
- For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values or a range of values.
- grpc_code str
- You can specify values between 0 and 99. You can specify multiple values, or a range of values. The default value is 12.
- http_code str
- For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values or a range of values.
- grpcCode String
- You can specify values between 0 and 99. You can specify multiple values, or a range of values. The default value is 12.
- httpCode String
- For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values or a range of values.
TargetGroupTargetDescription   
- Id string
- The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.
- AvailabilityZone string
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
- Port int
- The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. Not used if the target is a Lambda function.
- Id string
- The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.
- AvailabilityZone string
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
- Port int
- The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. Not used if the target is a Lambda function.
- id String
- The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.
- availabilityZone String
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
- port Integer
- The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. Not used if the target is a Lambda function.
- id string
- The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.
- availabilityZone string
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
- port number
- The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. Not used if the target is a Lambda function.
- id str
- The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.
- availability_zone str
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
- port int
- The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. Not used if the target is a Lambda function.
- id String
- The ID of the target. If the target type of the target group is instance, specify an instance ID. If the target type is ip, specify an IP address. If the target type is lambda, specify the ARN of the Lambda function. If the target type is alb, specify the ARN of the Application Load Balancer target.
- availabilityZone String
- An Availability Zone or all. This determines whether the target receives traffic from the load balancer nodes in the specified Availability Zone or from all enabled Availability Zones for the load balancer.
- port Number
- The port on which the target is listening. If the target group protocol is GENEVE, the supported port is 6081. If the target type is alb, the targeted Application Load Balancer must have at least one listener whose port matches the target group port. Not used if the target is a Lambda function.
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.
AWS Cloud Control v1.26.0 published on Wednesday, Mar 12, 2025 by Pulumi