aws-cdk-lib.aws_ecs_patterns.NetworkLoadBalancerProps

interface NetworkLoadBalancerProps

LanguageType name
.NETAmazon.CDK.AWS.ECS.Patterns.NetworkLoadBalancerProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecspatterns#NetworkLoadBalancerProps
Javasoftware.amazon.awscdk.services.ecs.patterns.NetworkLoadBalancerProps
Pythonaws_cdk.aws_ecs_patterns.NetworkLoadBalancerProps
TypeScript (source)aws-cdk-lib » aws_ecs_patterns » NetworkLoadBalancerProps

Properties to define an network load balancer.

Example

// 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

NameTypeDescription
listenersNetworkListenerProps[]Listeners (at least one listener) attached to this load balancer.
namestringName of the load balancer.
domainName?stringThe domain name for the service, e.g. "api.example.com.".
domainZone?IHostedZoneThe Route53 hosted zone for the domain, e.g. "example.com.".
publicLoadBalancer?booleanDetermines whether the Load Balancer will be internet-facing.

listeners

Type: NetworkListenerProps[]

Listeners (at least one listener) attached to this load balancer.


name

Type: string

Name of the load balancer.


domainName?

Type: string (optional, default: No domain name.)

The domain name for the service, e.g. "api.example.com.".


domainZone?

Type: IHostedZone (optional, default: No Route53 hosted domain zone.)

The Route53 hosted zone for the domain, e.g. "example.com.".


publicLoadBalancer?

Type: boolean (optional, default: true)

Determines whether the Load Balancer will be internet-facing.