Class NetworkTargetGroup
Define a Network Target Group.
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class NetworkTargetGroup : TargetGroupBase, INetworkTargetGroup, ITargetGroup, IConstruct, IDependable
Syntax (vb)
Public Class NetworkTargetGroup
Inherits TargetGroupBase
Implements INetworkTargetGroup, ITargetGroup, IConstruct, IDependable
Remarks
ExampleMetadata: infused
Examples
NetworkListener listener;
AutoScalingGroup asg1;
AutoScalingGroup asg2;
var group = listener.AddTargets("AppFleet", new AddNetworkTargetsProps {
Port = 443,
Targets = new [] { asg1 }
});
group.AddTarget(asg2);
Synopsis
Constructors
NetworkTargetGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
NetworkTargetGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
NetworkTargetGroup(Construct, String, INetworkTargetGroupProps) |
Properties
FirstLoadBalancerFullName | Full name of first load balancer. |
Methods
AddTarget(INetworkLoadBalancerTarget[]) | Add a load balancing target to this target group. |
FromTargetGroupAttributes(Construct, String, ITargetGroupAttributes) | Import an existing target group. |
Import(Construct, String, ITargetGroupImportProps) | (deprecated) Import an existing listener. |
MetricHealthyHostCount(IMetricOptions) | The number of targets that are considered healthy. |
MetricUnHealthyHostCount(IMetricOptions) | The number of targets that are considered unhealthy. |
RegisterListener(INetworkListener) | Register a listener that is load balancing to this target group. |
Validate() | Validate the current construct. |
Constructors
NetworkTargetGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected NetworkTargetGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
NetworkTargetGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected NetworkTargetGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
NetworkTargetGroup(Construct, String, INetworkTargetGroupProps)
public NetworkTargetGroup(Construct scope, string id, INetworkTargetGroupProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props INetworkTargetGroupProps
Properties
FirstLoadBalancerFullName
Full name of first load balancer.
public override string FirstLoadBalancerFullName { get; }
Property Value
System.String
Overrides
Methods
AddTarget(INetworkLoadBalancerTarget[])
Add a load balancing target to this target group.
public virtual void AddTarget(params INetworkLoadBalancerTarget[] targets)
Parameters
- targets INetworkLoadBalancerTarget[]
FromTargetGroupAttributes(Construct, String, ITargetGroupAttributes)
Import an existing target group.
public static INetworkTargetGroup FromTargetGroupAttributes(Construct scope, string id, ITargetGroupAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs ITargetGroupAttributes
Returns
Import(Construct, String, ITargetGroupImportProps)
(deprecated) Import an existing listener.
public static INetworkTargetGroup Import(Construct scope, string id, ITargetGroupImportProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ITargetGroupImportProps
Returns
Remarks
Stability: Deprecated
MetricHealthyHostCount(IMetricOptions)
The number of targets that are considered healthy.
public virtual Metric MetricHealthyHostCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Average over 5 minutes
MetricUnHealthyHostCount(IMetricOptions)
The number of targets that are considered unhealthy.
public virtual Metric MetricUnHealthyHostCount(IMetricOptions props = null)
Parameters
- props IMetricOptions
Returns
Remarks
Default: Average over 5 minutes
RegisterListener(INetworkListener)
Register a listener that is load balancing to this target group.
public virtual void RegisterListener(INetworkListener listener)
Parameters
- listener INetworkListener
Remarks
Don't call this directly. It will be called by listeners.
Validate()
Validate the current construct.
protected override string[] Validate()
Returns
System.String[]
Overrides
Remarks
This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.