Interface TargetGroup.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<TargetGroup.Builder,TargetGroup>
,SdkBuilder<TargetGroup.Builder,TargetGroup>
,SdkPojo
- Enclosing class:
- TargetGroup
public static interface TargetGroup.Builder extends SdkPojo, CopyableBuilder<TargetGroup.Builder,TargetGroup>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TargetGroup.Builder
healthCheckEnabled(Boolean healthCheckEnabled)
Indicates whether health checks are enabled.TargetGroup.Builder
healthCheckIntervalSeconds(Integer healthCheckIntervalSeconds)
The approximate amount of time, in seconds, between health checks of an individual target.TargetGroup.Builder
healthCheckPath(String healthCheckPath)
The destination for health checks on the targets.TargetGroup.Builder
healthCheckPort(String healthCheckPort)
The port to use to connect with the target.TargetGroup.Builder
healthCheckProtocol(String healthCheckProtocol)
The protocol to use to connect with the target.TargetGroup.Builder
healthCheckProtocol(ProtocolEnum healthCheckProtocol)
The protocol to use to connect with the target.TargetGroup.Builder
healthCheckTimeoutSeconds(Integer healthCheckTimeoutSeconds)
The amount of time, in seconds, during which no response means a failed health check.TargetGroup.Builder
healthyThresholdCount(Integer healthyThresholdCount)
The number of consecutive health checks successes required before considering an unhealthy target healthy.TargetGroup.Builder
ipAddressType(String ipAddressType)
The IP address type.TargetGroup.Builder
ipAddressType(TargetGroupIpAddressTypeEnum ipAddressType)
The IP address type.TargetGroup.Builder
loadBalancerArns(String... loadBalancerArns)
The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group.TargetGroup.Builder
loadBalancerArns(Collection<String> loadBalancerArns)
The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group.default TargetGroup.Builder
matcher(Consumer<Matcher.Builder> matcher)
The HTTP or gRPC codes to use when checking for a successful response from a target.TargetGroup.Builder
matcher(Matcher matcher)
The HTTP or gRPC codes to use when checking for a successful response from a target.TargetGroup.Builder
port(Integer port)
The port on which the targets are listening.TargetGroup.Builder
protocol(String protocol)
The protocol to use for routing traffic to the targets.TargetGroup.Builder
protocol(ProtocolEnum protocol)
The protocol to use for routing traffic to the targets.TargetGroup.Builder
protocolVersion(String protocolVersion)
[HTTP/HTTPS protocol] The protocol version.TargetGroup.Builder
targetGroupArn(String targetGroupArn)
The Amazon Resource Name (ARN) of the target group.TargetGroup.Builder
targetGroupName(String targetGroupName)
The name of the target group.TargetGroup.Builder
targetType(String targetType)
The type of target that you must specify when registering targets with this target group.TargetGroup.Builder
targetType(TargetTypeEnum targetType)
The type of target that you must specify when registering targets with this target group.TargetGroup.Builder
unhealthyThresholdCount(Integer unhealthyThresholdCount)
The number of consecutive health check failures required before considering the target unhealthy.TargetGroup.Builder
vpcId(String vpcId)
The ID of the VPC for the targets.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
targetGroupArn
TargetGroup.Builder targetGroupArn(String targetGroupArn)
The Amazon Resource Name (ARN) of the target group.
- Parameters:
targetGroupArn
- The Amazon Resource Name (ARN) of the target group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetGroupName
TargetGroup.Builder targetGroupName(String targetGroupName)
The name of the target group.
- Parameters:
targetGroupName
- The name of the target group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
protocol
TargetGroup.Builder protocol(String protocol)
The protocol to use for routing traffic to the targets.
- Parameters:
protocol
- The protocol to use for routing traffic to the targets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ProtocolEnum
,ProtocolEnum
-
protocol
TargetGroup.Builder protocol(ProtocolEnum protocol)
The protocol to use for routing traffic to the targets.
- Parameters:
protocol
- The protocol to use for routing traffic to the targets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ProtocolEnum
,ProtocolEnum
-
port
TargetGroup.Builder port(Integer port)
The port on which the targets are listening. This parameter is not used if the target is a Lambda function.
- Parameters:
port
- The port on which the targets are listening. This parameter is not used if the target is a Lambda function.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
vpcId
TargetGroup.Builder vpcId(String vpcId)
The ID of the VPC for the targets.
- Parameters:
vpcId
- The ID of the VPC for the targets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheckProtocol
TargetGroup.Builder healthCheckProtocol(String healthCheckProtocol)
The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.
- Parameters:
healthCheckProtocol
- The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ProtocolEnum
,ProtocolEnum
-
healthCheckProtocol
TargetGroup.Builder healthCheckProtocol(ProtocolEnum healthCheckProtocol)
The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.
- Parameters:
healthCheckProtocol
- The protocol to use to connect with the target. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ProtocolEnum
,ProtocolEnum
-
healthCheckPort
TargetGroup.Builder healthCheckPort(String healthCheckPort)
The port to use to connect with the target.
- Parameters:
healthCheckPort
- The port to use to connect with the target.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheckEnabled
TargetGroup.Builder healthCheckEnabled(Boolean healthCheckEnabled)
Indicates whether health checks are enabled.
- Parameters:
healthCheckEnabled
- Indicates whether health checks are enabled.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheckIntervalSeconds
TargetGroup.Builder healthCheckIntervalSeconds(Integer healthCheckIntervalSeconds)
The approximate amount of time, in seconds, between health checks of an individual target.
- Parameters:
healthCheckIntervalSeconds
- The approximate amount of time, in seconds, between health checks of an individual target.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheckTimeoutSeconds
TargetGroup.Builder healthCheckTimeoutSeconds(Integer healthCheckTimeoutSeconds)
The amount of time, in seconds, during which no response means a failed health check.
- Parameters:
healthCheckTimeoutSeconds
- The amount of time, in seconds, during which no response means a failed health check.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthyThresholdCount
TargetGroup.Builder healthyThresholdCount(Integer healthyThresholdCount)
The number of consecutive health checks successes required before considering an unhealthy target healthy.
- Parameters:
healthyThresholdCount
- The number of consecutive health checks successes required before considering an unhealthy target healthy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
unhealthyThresholdCount
TargetGroup.Builder unhealthyThresholdCount(Integer unhealthyThresholdCount)
The number of consecutive health check failures required before considering the target unhealthy.
- Parameters:
unhealthyThresholdCount
- The number of consecutive health check failures required before considering the target unhealthy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
healthCheckPath
TargetGroup.Builder healthCheckPath(String healthCheckPath)
The destination for health checks on the targets.
- Parameters:
healthCheckPath
- The destination for health checks on the targets.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
matcher
TargetGroup.Builder matcher(Matcher matcher)
The HTTP or gRPC codes to use when checking for a successful response from a target.
- Parameters:
matcher
- The HTTP or gRPC codes to use when checking for a successful response from a target.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
matcher
default TargetGroup.Builder matcher(Consumer<Matcher.Builder> matcher)
The HTTP or gRPC codes to use when checking for a successful response from a target.
This is a convenience method that creates an instance of theMatcher.Builder
avoiding the need to create one manually viaMatcher.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tomatcher(Matcher)
.- Parameters:
matcher
- a consumer that will call methods onMatcher.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
matcher(Matcher)
-
loadBalancerArns
TargetGroup.Builder loadBalancerArns(Collection<String> loadBalancerArns)
The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group. You can use each target group with only one load balancer.
- Parameters:
loadBalancerArns
- The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group. You can use each target group with only one load balancer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
loadBalancerArns
TargetGroup.Builder loadBalancerArns(String... loadBalancerArns)
The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group. You can use each target group with only one load balancer.
- Parameters:
loadBalancerArns
- The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group. You can use each target group with only one load balancer.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetType
TargetGroup.Builder targetType(String targetType)
The type of target that you must specify when registering targets with this target group. The possible values are
instance
(register targets by instance ID),ip
(register targets by IP address),lambda
(register a single Lambda function as a target), oralb
(register a single Application Load Balancer as a target).- Parameters:
targetType
- The type of target that you must specify when registering targets with this target group. The possible values areinstance
(register targets by instance ID),ip
(register targets by IP address),lambda
(register a single Lambda function as a target), oralb
(register a single Application Load Balancer as a target).- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TargetTypeEnum
,TargetTypeEnum
-
targetType
TargetGroup.Builder targetType(TargetTypeEnum targetType)
The type of target that you must specify when registering targets with this target group. The possible values are
instance
(register targets by instance ID),ip
(register targets by IP address),lambda
(register a single Lambda function as a target), oralb
(register a single Application Load Balancer as a target).- Parameters:
targetType
- The type of target that you must specify when registering targets with this target group. The possible values areinstance
(register targets by instance ID),ip
(register targets by IP address),lambda
(register a single Lambda function as a target), oralb
(register a single Application Load Balancer as a target).- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TargetTypeEnum
,TargetTypeEnum
-
protocolVersion
TargetGroup.Builder protocolVersion(String protocolVersion)
[HTTP/HTTPS protocol] The protocol version. The possible values are
GRPC
,HTTP1
, andHTTP2
.- Parameters:
protocolVersion
- [HTTP/HTTPS protocol] The protocol version. The possible values areGRPC
,HTTP1
, andHTTP2
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ipAddressType
TargetGroup.Builder ipAddressType(String ipAddressType)
The IP address type. The default value is
ipv4
.- Parameters:
ipAddressType
- The IP address type. The default value isipv4
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TargetGroupIpAddressTypeEnum
,TargetGroupIpAddressTypeEnum
-
ipAddressType
TargetGroup.Builder ipAddressType(TargetGroupIpAddressTypeEnum ipAddressType)
The IP address type. The default value is
ipv4
.- Parameters:
ipAddressType
- The IP address type. The default value isipv4
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
TargetGroupIpAddressTypeEnum
,TargetGroupIpAddressTypeEnum
-
-