NetworkTargetProps

class aws_cdk.aws_ecs_patterns.NetworkTargetProps(*, container_port, listener=None)

Bases: object

Properties to define a network load balancer target group.

Parameters:
  • container_port (Union[int, float]) – The port number of the container. Only applicable when using application/network load balancers.

  • listener (Optional[str]) – Name of the listener the target group attached to. Default: - default listener (first added listener)

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs_patterns as ecs_patterns

network_target_props = ecs_patterns.NetworkTargetProps(
    container_port=123,

    # the properties below are optional
    listener="listener"
)

Attributes

container_port

The port number of the container.

Only applicable when using application/network load balancers.

listener

Name of the listener the target group attached to.

Default:
  • default listener (first added listener)