Class NetworkTargetGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.services.elasticloadbalancingv2.TargetGroupBase
software.amazon.awscdk.services.elasticloadbalancingv2.NetworkTargetGroup
- All Implemented Interfaces:
IConstruct,IDependable,INetworkTargetGroup,ITargetGroup,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.385Z")
@Stability(Stable)
public class NetworkTargetGroup
extends TargetGroupBase
implements INetworkTargetGroup
Define a Network Target Group.
Example:
NetworkListener listener;
AutoScalingGroup asg1;
AutoScalingGroup asg2;
NetworkTargetGroup group = listener.addTargets("AppFleet", AddNetworkTargetsProps.builder()
.port(443)
.targets(List.of(asg1))
.build());
group.addTarget(asg2);
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.INetworkTargetGroup
INetworkTargetGroup.Jsii$Default, INetworkTargetGroup.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.ITargetGroup
ITargetGroup.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNetworkTargetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedNetworkTargetGroup(software.amazon.jsii.JsiiObjectRef objRef) NetworkTargetGroup(software.constructs.Construct scope, String id, NetworkTargetGroupProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTarget(@NotNull INetworkLoadBalancerTarget... targets) Add a load balancing target to this target group.static INetworkTargetGroupdoImport(software.constructs.Construct scope, String id, TargetGroupImportProps props) Deprecated.static INetworkTargetGroupfromTargetGroupAttributes(software.constructs.Construct scope, String id, TargetGroupAttributes attrs) Import an existing target group.Full name of first load balancer.The number of targets that are considered healthy.The number of targets that are considered healthy.The number of targets that are considered unhealthy.The number of targets that are considered unhealthy.voidregisterListener(INetworkListener listener) Register a listener that is load balancing to this target group.validate()Validate the current construct.Methods inherited from class software.amazon.awscdk.services.elasticloadbalancingv2.TargetGroupBase
addLoadBalancerTarget, configureHealthCheck, getDefaultPort, getHealthCheck, getLoadBalancerArns, getLoadBalancerAttached, getLoadBalancerAttachedDependencies, getTargetGroupArn, getTargetGroupFullName, getTargetGroupLoadBalancerArns, getTargetGroupName, getTargetType, setAttribute, setAttribute, setHealthCheck, setTargetTypeMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesizeMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.ITargetGroup
getLoadBalancerArns, getLoadBalancerAttached, getTargetGroupArn, getTargetGroupNameMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
NetworkTargetGroup
protected NetworkTargetGroup(software.amazon.jsii.JsiiObjectRef objRef) -
NetworkTargetGroup
protected NetworkTargetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
NetworkTargetGroup
@Stability(Stable) public NetworkTargetGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull NetworkTargetGroupProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromTargetGroupAttributes
@Stability(Stable) @NotNull public static INetworkTargetGroup fromTargetGroupAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TargetGroupAttributes attrs) Import an existing target group.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
doImport
@Stability(Deprecated) @Deprecated @NotNull public static INetworkTargetGroup doImport(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull TargetGroupImportProps props) Deprecated.UsefromTargetGroupAttributesinstead(deprecated) Import an existing listener.- Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
addTarget
Add a load balancing target to this target group.- Specified by:
addTargetin interfaceINetworkTargetGroup- Parameters:
targets- This parameter is required.
-
metricHealthyHostCount
The number of targets that are considered healthy.Default: Average over 5 minutes
- Parameters:
props-
-
metricHealthyHostCount
The number of targets that are considered healthy.Default: Average over 5 minutes
-
metricUnHealthyHostCount
The number of targets that are considered unhealthy.Default: Average over 5 minutes
- Parameters:
props-
-
metricUnHealthyHostCount
The number of targets that are considered unhealthy.Default: Average over 5 minutes
-
registerListener
Register a listener that is load balancing to this target group.Don't call this directly. It will be called by listeners.
- Specified by:
registerListenerin interfaceINetworkTargetGroup- Parameters:
listener- This parameter is required.
-
validate
Validate the current construct.This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
- Overrides:
validatein classTargetGroupBase- Returns:
- An array of validation error messages, or an empty array if the construct is valid.
-
getFirstLoadBalancerFullName
Full name of first load balancer.- Specified by:
getFirstLoadBalancerFullNamein classTargetGroupBase
-
fromTargetGroupAttributesinstead