We recommend new projects start with resources from the AWS provider.
aws-native.elasticloadbalancingv2.TargetGroup
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::ElasticLoadBalancingV2::TargetGroup
Create TargetGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TargetGroup(name: string, args?: TargetGroupArgs, opts?: CustomResourceOptions);
@overload
def TargetGroup(resource_name: str,
args: Optional[TargetGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def TargetGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
health_check_enabled: Optional[bool] = None,
health_check_interval_seconds: Optional[int] = None,
health_check_path: Optional[str] = None,
health_check_port: Optional[str] = None,
health_check_protocol: Optional[str] = None,
health_check_timeout_seconds: Optional[int] = None,
healthy_threshold_count: Optional[int] = None,
ip_address_type: Optional[str] = None,
matcher: Optional[TargetGroupMatcherArgs] = None,
name: Optional[str] = None,
port: Optional[int] = None,
protocol: Optional[str] = None,
protocol_version: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
target_group_attributes: Optional[Sequence[TargetGroupAttributeArgs]] = None,
target_type: Optional[str] = None,
targets: Optional[Sequence[TargetGroupTargetDescriptionArgs]] = None,
unhealthy_threshold_count: Optional[int] = None,
vpc_id: Optional[str] = None)
func NewTargetGroup(ctx *Context, name string, args *TargetGroupArgs, opts ...ResourceOption) (*TargetGroup, error)
public TargetGroup(string name, TargetGroupArgs? args = null, CustomResourceOptions? opts = null)
public TargetGroup(String name, TargetGroupArgs args)
public TargetGroup(String name, TargetGroupArgs args, CustomResourceOptions options)
type: aws-native:elasticloadbalancingv2:TargetGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args TargetGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args TargetGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args TargetGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TargetGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TargetGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TargetGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TargetGroup resource accepts the following input properties:
- 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 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.
- Health
Check stringPort - The port the load balancer uses when performing health checks on targets.
- Health
Check stringProtocol - 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.
- Ip
Address stringType - The type of IP address used for this target group. The possible values are ipv4 and ipv6.
- Matcher
Pulumi.
Aws Native. Elastic Load Balancing V2. Inputs. Target Group Matcher - [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- Name string
- The name of the target group.
- Port int
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
- Protocol string
- The protocol to use for routing traffic to the targets.
- Protocol
Version string - [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.
- List<Pulumi.
Aws Native. Inputs. Tag> - The tags.
- Target
Group List<Pulumi.Attributes Aws Native. Elastic Load Balancing V2. Inputs. Target Group Attribute> - The attributes.
- Target
Type string - The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
- Targets
List<Pulumi.
Aws Native. Elastic Load Balancing V2. Inputs. Target Group Target Description> - The targets.
- Unhealthy
Threshold intCount - The number of consecutive health check failures required before considering a target unhealthy.
- Vpc
Id string - The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
- 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 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.
- Health
Check stringPort - The port the load balancer uses when performing health checks on targets.
- Health
Check stringProtocol - 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.
- Ip
Address stringType - The type of IP address used for this target group. The possible values are ipv4 and ipv6.
- Matcher
Target
Group Matcher Args - [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- Name string
- The name of the target group.
- Port int
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
- Protocol string
- The protocol to use for routing traffic to the targets.
- Protocol
Version string - [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.
- Tag
Args - The tags.
- Target
Group []TargetAttributes Group Attribute Args - The attributes.
- Target
Type string - The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
- Targets
[]Target
Group Target Description Args - The targets.
- Unhealthy
Threshold intCount - The number of consecutive health check failures required before considering a target unhealthy.
- Vpc
Id string - The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
- health
Check 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.
- health
Check IntegerInterval Seconds - The approximate amount of time, in seconds, between health checks of an individual target.
- health
Check 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.
- health
Check StringPort - The port the load balancer uses when performing health checks on targets.
- health
Check StringProtocol - The protocol the load balancer uses when performing health checks on targets.
- health
Check IntegerTimeout Seconds - The amount of time, in seconds, during which no response from a target means a failed health check.
- healthy
Threshold IntegerCount - The number of consecutive health checks successes required before considering an unhealthy target healthy.
- ip
Address StringType - The type of IP address used for this target group. The possible values are ipv4 and ipv6.
- matcher
Target
Group Matcher - [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- name String
- The name of the target group.
- port Integer
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
- protocol String
- The protocol to use for routing traffic to the targets.
- protocol
Version String - [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.
- List<Tag>
- The tags.
- target
Group List<TargetAttributes Group Attribute> - The attributes.
- target
Type String - The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
- targets
List<Target
Group Target Description> - The targets.
- unhealthy
Threshold IntegerCount - The number of consecutive health check failures required before considering a target unhealthy.
- vpc
Id String - The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
- health
Check 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.
- health
Check numberInterval Seconds - The approximate amount of time, in seconds, between health checks of an individual target.
- health
Check 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.
- health
Check stringPort - The port the load balancer uses when performing health checks on targets.
- health
Check stringProtocol - The protocol the load balancer uses when performing health checks on targets.
- health
Check numberTimeout Seconds - The amount of time, in seconds, during which no response from a target means a failed health check.
- healthy
Threshold numberCount - The number of consecutive health checks successes required before considering an unhealthy target healthy.
- ip
Address stringType - The type of IP address used for this target group. The possible values are ipv4 and ipv6.
- matcher
Target
Group Matcher - [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- name string
- The name of the target group.
- port number
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
- protocol string
- The protocol to use for routing traffic to the targets.
- protocol
Version string - [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.
- Tag[]
- The tags.
- target
Group TargetAttributes Group Attribute[] - The attributes.
- target
Type string - The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
- targets
Target
Group Target Description[] - The targets.
- unhealthy
Threshold numberCount - The number of consecutive health check failures required before considering a target unhealthy.
- vpc
Id string - The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
- 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.
- ip_
address_ strtype - The type of IP address used for this target group. The possible values are ipv4 and ipv6.
- matcher
Target
Group Matcher Args - [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- name str
- The name of the target group.
- port int
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
- protocol str
- The protocol to use for routing traffic to the targets.
- protocol_
version str - [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.
- Sequence[Tag
Args] - The tags.
- target_
group_ Sequence[Targetattributes Group Attribute Args] - The attributes.
- target_
type str - The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
- targets
Sequence[Target
Group Target Description Args] - The targets.
- unhealthy_
threshold_ intcount - The number of consecutive health check failures required before considering a target unhealthy.
- vpc_
id str - The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
- health
Check 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.
- health
Check NumberInterval Seconds - The approximate amount of time, in seconds, between health checks of an individual target.
- health
Check 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.
- health
Check StringPort - The port the load balancer uses when performing health checks on targets.
- health
Check StringProtocol - The protocol the load balancer uses when performing health checks on targets.
- health
Check NumberTimeout Seconds - The amount of time, in seconds, during which no response from a target means a failed health check.
- healthy
Threshold NumberCount - The number of consecutive health checks successes required before considering an unhealthy target healthy.
- ip
Address StringType - The type of IP address used for this target group. The possible values are ipv4 and ipv6.
- matcher Property Map
- [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
- name String
- The name of the target group.
- port Number
- The port on which the targets receive traffic. This port is used unless you specify a port override when registering the target. If the target is a Lambda function, this parameter does not apply. If the protocol is GENEVE, the supported port is 6081.
- protocol String
- The protocol to use for routing traffic to the targets.
- protocol
Version String - [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, HTTP1, and HTTP2.
- List<Property Map>
- The tags.
- target
Group List<Property Map>Attributes - The attributes.
- target
Type String - The type of target that you must specify when registering targets with this target group. You can't specify targets for a target group using more than one target type.
- targets List<Property Map>
- The targets.
- unhealthy
Threshold NumberCount - The number of consecutive health check failures required before considering a target unhealthy.
- vpc
Id String - The identifier of the virtual private cloud (VPC). If the target is a Lambda function, this parameter does not apply.
Outputs
All input properties are implicitly available as output properties. Additionally, the TargetGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer List<string>Arns - The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- Target
Group stringArn - The ARN of the Target Group
- Target
Group stringFull Name - The full name of the target group.
- Target
Group stringName - The name of the target group.
- Id string
- The provider-assigned unique ID for this managed resource.
- Load
Balancer []stringArns - The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- Target
Group stringArn - The ARN of the Target Group
- Target
Group stringFull Name - The full name of the target group.
- Target
Group stringName - The name of the target group.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer List<String>Arns - The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- target
Group StringArn - The ARN of the Target Group
- target
Group StringFull Name - The full name of the target group.
- target
Group StringName - The name of the target group.
- id string
- The provider-assigned unique ID for this managed resource.
- load
Balancer string[]Arns - The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- target
Group stringArn - The ARN of the Target Group
- target
Group stringFull Name - The full name of the target group.
- target
Group stringName - The name of the target group.
- id str
- The provider-assigned unique ID for this managed resource.
- load_
balancer_ Sequence[str]arns - The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- target_
group_ strarn - The ARN of the Target Group
- target_
group_ strfull_ name - The full name of the target group.
- target_
group_ strname - The name of the target group.
- id String
- The provider-assigned unique ID for this managed resource.
- load
Balancer List<String>Arns - The Amazon Resource Names (ARNs) of the load balancers that route traffic to this target group.
- target
Group StringArn - The ARN of the Target Group
- target
Group StringFull Name - The full name of the target group.
- target
Group StringName - The name of the target group.
Supporting Types
Tag, TagArgs
TargetGroupAttribute, TargetGroupAttributeArgs
TargetGroupMatcher, TargetGroupMatcherArgs
- Grpc
Code string - 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 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 string - 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 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 String - 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 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 string - 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 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.
- grpc
Code String - 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 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, TargetGroupTargetDescriptionArgs
- 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.
- Availability
Zone 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.
- Availability
Zone 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.
- availability
Zone 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.
- availability
Zone 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.
- availability
Zone 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.