@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:57.687Z") public class NetworkTargetGroup extends TargetGroupBase implements INetworkTargetGroup
Example:
NetworkListener listener; AutoScalingGroup asg1; AutoScalingGroup asg2; NetworkTargetGroup group = listener.addTargets("AppFleet", AddNetworkTargetsProps.builder() .port(443) .targets(List.of(asg1)) .build()); group.addTarget(asg2);
Modifier and Type | Class and Description |
---|---|
static class |
NetworkTargetGroup.Builder
A fluent builder for
NetworkTargetGroup . |
INetworkTargetGroup.Jsii$Default, INetworkTargetGroup.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
NetworkTargetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NetworkTargetGroup(software.amazon.jsii.JsiiObjectRef objRef) |
|
NetworkTargetGroup(software.constructs.Construct scope,
java.lang.String id,
NetworkTargetGroupProps props) |
Modifier and Type | Method and Description |
---|---|
void |
addTarget(INetworkLoadBalancerTarget... targets)
Add a load balancing target to this target group.
|
static INetworkTargetGroup |
doImport(software.constructs.Construct scope,
java.lang.String id,
TargetGroupImportProps props)
Deprecated.
Use `fromTargetGroupAttributes` instead
|
static INetworkTargetGroup |
fromTargetGroupAttributes(software.constructs.Construct scope,
java.lang.String id,
TargetGroupAttributes attrs)
Import an existing target group.
|
java.lang.String |
getFirstLoadBalancerFullName()
Full name of first load balancer.
|
Metric |
metricHealthyHostCount()
The number of targets that are considered healthy.
|
Metric |
metricHealthyHostCount(MetricOptions props)
The number of targets that are considered healthy.
|
Metric |
metricUnHealthyHostCount()
The number of targets that are considered unhealthy.
|
Metric |
metricUnHealthyHostCount(MetricOptions props)
The number of targets that are considered unhealthy.
|
void |
registerListener(INetworkListener listener)
Register a listener that is load balancing to this target group.
|
protected java.util.List<java.lang.String> |
validate()
Validate the current construct.
|
addLoadBalancerTarget, configureHealthCheck, getDefaultPort, getHealthCheck, getLoadBalancerArns, getLoadBalancerAttached, getLoadBalancerAttachedDependencies, getTargetGroupArn, getTargetGroupFullName, getTargetGroupLoadBalancerArns, getTargetGroupName, getTargetType, setAttribute, setAttribute, setHealthCheck, setTargetType
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoadBalancerArns, getLoadBalancerAttached, getTargetGroupArn, getTargetGroupName
getNode
protected NetworkTargetGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected NetworkTargetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public NetworkTargetGroup(software.constructs.Construct scope, java.lang.String id, NetworkTargetGroupProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static INetworkTargetGroup fromTargetGroupAttributes(software.constructs.Construct scope, java.lang.String id, TargetGroupAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.@Deprecated public static INetworkTargetGroup doImport(software.constructs.Construct scope, java.lang.String id, TargetGroupImportProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public void addTarget(INetworkLoadBalancerTarget... targets)
addTarget
in interface INetworkTargetGroup
targets
- This parameter is required.public Metric metricHealthyHostCount(MetricOptions props)
Default: Average over 5 minutes
props
- public Metric metricHealthyHostCount()
Default: Average over 5 minutes
public Metric metricUnHealthyHostCount(MetricOptions props)
Default: Average over 5 minutes
props
- public Metric metricUnHealthyHostCount()
Default: Average over 5 minutes
public void registerListener(INetworkListener listener)
Don't call this directly. It will be called by listeners.
registerListener
in interface INetworkTargetGroup
listener
- This parameter is required.protected java.util.List<java.lang.String> validate()
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.
validate
in class TargetGroupBase
public java.lang.String getFirstLoadBalancerFullName()
getFirstLoadBalancerFullName
in class TargetGroupBase