Skip to content
v2.273.0

NetworkTargetProps Struct ​

Properties to define a network load balancer target group.

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';
const networkTargetProps: ecs_patterns.NetworkTargetProps = {
  containerPort: 123,

  // the properties below are optional
  listener: 'listener',
};

Properties ​

containerPortnumbercontainer_portint | floatcontainerPortNumberContainerPortdoubleContainerPort*float64required#
The port number of the container.

Only applicable when using application/network load balancers.

listenerstringlistenerstrlistenerStringListenerstringListener*string= default listener (first added li…#
Name of the listener the target group attached to.
default

Default: default listener (first added listener)