LoadBalancerTargetOptions

class aws_cdk.aws_ecs.LoadBalancerTargetOptions(*, container_name, container_port=None, protocol=None)

Bases: object

__init__(*, container_name, container_port=None, protocol=None)

Properties for defining an ECS target.

The port mapping for it must already have been created through addPortMapping().

Parameters
  • container_name (str) – The name of the container.

  • container_port (Union[int, float, None]) – The port number of the container. Only applicable when using application/network load balancers. Default: - Container port of the first added port mapping.

  • protocol (Optional[Protocol]) – The protocol used for the port mapping. Only applicable when using application load balancers. Default: Protocol.TCP

Attributes

container_name

The name of the container.

Return type

str

container_port

The port number of the container.

Only applicable when using application/network load balancers.

default :default: - Container port of the first added port mapping.

Return type

Union[int, float, None]

protocol

The protocol used for the port mapping.

Only applicable when using application load balancers.

default :default: Protocol.TCP

Return type

Optional[Protocol]