Skip to content
v2.274.0

NetworkLoadBalancerProps Struct ​

Properties to define an network load balancer.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs_patterns as ecs_patterns } from 'aws-cdk-lib';
import { aws_route53 as route53 } from 'aws-cdk-lib';

declare const hostedZone: route53.HostedZone;
const networkLoadBalancerProps: ecs_patterns.NetworkLoadBalancerProps = {
  listeners: [{
    name: 'name',

    // the properties below are optional
    port: 123,
  }],
  name: 'name',

  // the properties below are optional
  domainName: 'domainName',
  domainZone: hostedZone,
  publicLoadBalancer: false,
};

Properties ​

domainNamestringdomain_namestrdomainNameStringDomainNamestringDomainName*string= No domain name.#
The domain name for the service, e.g. "api.example.com.".
domainZoneIHostedZonedomain_zoneIHostedZonedomainZoneIHostedZoneDomainZoneIHostedZoneDomainZoneIHostedZone= No Route53 hosted domain zone.#
The Route53 hosted zone for the domain, e.g. "example.com.".
listenersNetworkListenerProps[]listenerstyping.List[NetworkListenerProps]listenersList<NetworkListenerProps>ListenersNetworkListenerProps[]Listeners*[]NetworkListenerProps= nonerequired#
Listeners (at least one listener) attached to this load balancer.
namestringnamestrnameStringNamestringName*stringrequired#
Name of the load balancer.
publicLoadBalancerbooleanpublic_load_balancerboolpublicLoadBalancerBooleanPublicLoadBalancerboolPublicLoadBalancer*bool= true#
Determines whether the Load Balancer will be internet-facing.