Show / Hide Table of Contents

Class NetworkLoadBalancer

Define a new network load balancer.

Inheritance
System.Object
Construct
Resource
BaseLoadBalancer
NetworkLoadBalancer
Implements
INetworkLoadBalancer
ILoadBalancerV2
IResource
IConstruct
Constructs.IConstruct
IDependable
IVpcEndpointServiceLoadBalancer
Inherited Members
BaseLoadBalancer.LogAccessLogs(IBucket, String)
BaseLoadBalancer.RemoveAttribute(String)
BaseLoadBalancer.SetAttribute(String, String)
BaseLoadBalancer.Validate()
BaseLoadBalancer.LoadBalancerArn
BaseLoadBalancer.LoadBalancerCanonicalHostedZoneId
BaseLoadBalancer.LoadBalancerDnsName
BaseLoadBalancer.LoadBalancerFullName
BaseLoadBalancer.LoadBalancerName
BaseLoadBalancer.LoadBalancerSecurityGroups
BaseLoadBalancer.Vpc
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Node
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.AWS.ElasticLoadBalancingV2.dll
Syntax (csharp)
public class NetworkLoadBalancer : BaseLoadBalancer, INetworkLoadBalancer, ILoadBalancerV2, IResource, IConstruct, IDependable, IVpcEndpointServiceLoadBalancer
Syntax (vb)
Public Class NetworkLoadBalancer
    Inherits BaseLoadBalancer
    Implements INetworkLoadBalancer, ILoadBalancerV2, IResource, IConstruct, IDependable, IVpcEndpointServiceLoadBalancer
Remarks

Resource: AWS::ElasticLoadBalancingV2::LoadBalancer

ExampleMetadata: infused

Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;


var vpc = new Vpc(this, "VPC");
var lb = new NetworkLoadBalancer(this, "lb", new NetworkLoadBalancerProps { Vpc = vpc });
var listener = lb.AddListener("listener", new BaseNetworkListenerProps { Port = 80 });
listener.AddTargets("target", new AddNetworkTargetsProps {
    Port = 80
});

var httpEndpoint = new HttpApi(this, "HttpProxyPrivateApi", new HttpApiProps {
    DefaultIntegration = new HttpNlbIntegration("DefaultIntegration", listener)
});

Synopsis

Constructors

NetworkLoadBalancer(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

NetworkLoadBalancer(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

NetworkLoadBalancer(Construct, String, INetworkLoadBalancerProps)

Methods

AddListener(String, IBaseNetworkListenerProps)

Add a listener to this load balancer.

FromLookup(Construct, String, INetworkLoadBalancerLookupOptions)

Looks up the network load balancer.

FromNetworkLoadBalancerAttributes(Construct, String, INetworkLoadBalancerAttributes)
Metric(String, IMetricOptions)

Return the given named metric for this Network Load Balancer.

MetricActiveFlowCount(IMetricOptions)

The total number of concurrent TCP flows (or connections) from clients to targets.

MetricConsumedLCUs(IMetricOptions)

The number of load balancer capacity units (LCU) used by your load balancer.

MetricHealthyHostCount(IMetricOptions)

(deprecated) The number of targets that are considered healthy.

MetricNewFlowCount(IMetricOptions)

The total number of new TCP flows (or connections) established from clients to targets in the time period.

MetricProcessedBytes(IMetricOptions)

The total number of bytes processed by the load balancer, including TCP/IP headers.

MetricTcpClientResetCount(IMetricOptions)

The total number of reset (RST) packets sent from a client to a target.

MetricTcpElbResetCount(IMetricOptions)

The total number of reset (RST) packets generated by the load balancer.

MetricTcpTargetResetCount(IMetricOptions)

The total number of reset (RST) packets sent from a target to a client.

MetricUnHealthyHostCount(IMetricOptions)

(deprecated) The number of targets that are considered unhealthy.

Constructors

NetworkLoadBalancer(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected NetworkLoadBalancer(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

NetworkLoadBalancer(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected NetworkLoadBalancer(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

NetworkLoadBalancer(Construct, String, INetworkLoadBalancerProps)

public NetworkLoadBalancer(Construct scope, string id, INetworkLoadBalancerProps props)
Parameters
scope Constructs.Construct
id System.String
props INetworkLoadBalancerProps

Methods

AddListener(String, IBaseNetworkListenerProps)

Add a listener to this load balancer.

public virtual NetworkListener AddListener(string id, IBaseNetworkListenerProps props)
Parameters
id System.String
props IBaseNetworkListenerProps
Returns

NetworkListener

The newly created listener

FromLookup(Construct, String, INetworkLoadBalancerLookupOptions)

Looks up the network load balancer.

public static INetworkLoadBalancer FromLookup(Construct scope, string id, INetworkLoadBalancerLookupOptions options)
Parameters
scope Constructs.Construct
id System.String
options INetworkLoadBalancerLookupOptions
Returns

INetworkLoadBalancer

FromNetworkLoadBalancerAttributes(Construct, String, INetworkLoadBalancerAttributes)

public static INetworkLoadBalancer FromNetworkLoadBalancerAttributes(Construct scope, string id, INetworkLoadBalancerAttributes attrs)
Parameters
scope Constructs.Construct
id System.String
attrs INetworkLoadBalancerAttributes
Returns

INetworkLoadBalancer

Metric(String, IMetricOptions)

Return the given named metric for this Network Load Balancer.

public virtual Metric Metric(string metricName, IMetricOptions props = null)
Parameters
metricName System.String
props IMetricOptions
Returns

Metric

Remarks

Default: Average over 5 minutes

MetricActiveFlowCount(IMetricOptions)

The total number of concurrent TCP flows (or connections) from clients to targets.

public virtual Metric MetricActiveFlowCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

This metric includes connections in the SYN_SENT and ESTABLISHED states. TCP connections are not terminated at the load balancer, so a client opening a TCP connection to a target counts as a single flow.

Default: Average over 5 minutes

MetricConsumedLCUs(IMetricOptions)

The number of load balancer capacity units (LCU) used by your load balancer.

public virtual Metric MetricConsumedLCUs(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: Sum over 5 minutes

MetricHealthyHostCount(IMetricOptions)

(deprecated) The number of targets that are considered healthy.

public virtual Metric MetricHealthyHostCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: Average over 5 minutes

Stability: Deprecated

MetricNewFlowCount(IMetricOptions)

The total number of new TCP flows (or connections) established from clients to targets in the time period.

public virtual Metric MetricNewFlowCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: Sum over 5 minutes

MetricProcessedBytes(IMetricOptions)

The total number of bytes processed by the load balancer, including TCP/IP headers.

public virtual Metric MetricProcessedBytes(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: Sum over 5 minutes

MetricTcpClientResetCount(IMetricOptions)

The total number of reset (RST) packets sent from a client to a target.

public virtual Metric MetricTcpClientResetCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

These resets are generated by the client and forwarded by the load balancer.

Default: Sum over 5 minutes

MetricTcpElbResetCount(IMetricOptions)

The total number of reset (RST) packets generated by the load balancer.

public virtual Metric MetricTcpElbResetCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: Sum over 5 minutes

MetricTcpTargetResetCount(IMetricOptions)

The total number of reset (RST) packets sent from a target to a client.

public virtual Metric MetricTcpTargetResetCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

These resets are generated by the target and forwarded by the load balancer.

Default: Sum over 5 minutes

MetricUnHealthyHostCount(IMetricOptions)

(deprecated) The number of targets that are considered unhealthy.

public virtual Metric MetricUnHealthyHostCount(IMetricOptions props = null)
Parameters
props IMetricOptions
Returns

Metric

Remarks

Default: Average over 5 minutes

Stability: Deprecated

Implements

INetworkLoadBalancer
ILoadBalancerV2
IResource
IConstruct
Constructs.IConstruct
IDependable
IVpcEndpointServiceLoadBalancer
Back to top Generated by DocFX