Class NetworkLoadBalancerProps
Properties for a network load balancer.
Inheritance
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NetworkLoadBalancerProps : Object, INetworkLoadBalancerProps, IBaseLoadBalancerProps
Syntax (vb)
Public Class NetworkLoadBalancerProps
Inherits Object
Implements INetworkLoadBalancerProps, IBaseLoadBalancerProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.HttpNlbIntegration;
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
NetworkLoadBalancerProps() |
Properties
ClientRoutingPolicy | The AZ affinity routing policy. |
CrossZoneEnabled | Indicates whether cross-zone load balancing is enabled. |
DeletionProtection | Indicates whether deletion protection is enabled. |
DenyAllIgwTraffic | Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). |
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic | Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink. |
InternetFacing | Whether the load balancer has an internet-routable address. |
IpAddressType | The type of IP addresses to use. |
LoadBalancerName | Name of the load balancer. |
SecurityGroups | Security groups to associate with this load balancer. |
Vpc | The VPC network to place the load balancer in. |
VpcSubnets | Which subnets place the load balancer in. |
Constructors
NetworkLoadBalancerProps()
public NetworkLoadBalancerProps()
Properties
ClientRoutingPolicy
The AZ affinity routing policy.
public Nullable<ClientRoutingPolicy> ClientRoutingPolicy { get; set; }
Property Value
System.Nullable<ClientRoutingPolicy>
Remarks
Default: - AZ affinity is disabled.
CrossZoneEnabled
Indicates whether cross-zone load balancing is enabled.
public Nullable<bool> CrossZoneEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false for Network Load Balancers and true for Application Load Balancers.
This can not be false
for Application Load Balancers.
DeletionProtection
Indicates whether deletion protection is enabled.
public Nullable<bool> DeletionProtection { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
DenyAllIgwTraffic
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).
public Nullable<bool> DenyAllIgwTraffic { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false for internet-facing load balancers and true for internal load balancers
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic
Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.
public Nullable<bool> EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
InternetFacing
Whether the load balancer has an internet-routable address.
public Nullable<bool> InternetFacing { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
IpAddressType
The type of IP addresses to use.
public Nullable<IpAddressType> IpAddressType { get; set; }
Property Value
System.Nullable<IpAddressType>
Remarks
If you want to add a UDP or TCP_UDP listener to the load balancer, you must choose IPv4.
Default: IpAddressType.IPV4
LoadBalancerName
Name of the load balancer.
public string LoadBalancerName { get; set; }
Property Value
System.String
Remarks
Default: - Automatically generated name.
SecurityGroups
Security groups to associate with this load balancer.
public ISecurityGroup[] SecurityGroups { get; set; }
Property Value
Remarks
Default: - No security groups associated with the load balancer.
Vpc
VpcSubnets
Which subnets place the load balancer in.
public ISubnetSelection VpcSubnets { get; set; }
Property Value
Remarks
Default: - the Vpc default strategy.