View definition

(ContainerDefinition).PortMappings

Defined in github.com/aws/aws-sdk-go/service/ecs/api.go

Description

The list of port mappings for the container. Port mappings allow containers to access ports on the host container instance to send or receive traffic. This parameter maps to PortBindings in the Create a container (https://docs.docker.com/reference/api/docker_remote_api_v1.23/#create-a-container) section of the Docker Remote API (https://docs.docker.com/reference/api/docker_remote_api_v1.23/) and the --publish option to docker run (https://docs.docker.com/reference/commandline/run/). If the network mode of a task definition is set to none, then you cannot specify port mappings. If the network mode of a task definition is set to host, then host ports must either be undefined or they must match the container port in the port mapping.

After a task reaches the RUNNING status, manual and automatic host and

container port assignments are visible in the Network Bindings section of a container description of a selected task in the Amazon ECS console, or the networkBindings section DescribeTasks responses.

PortMappings is referenced in 3 repositories

github.com/99designs/ecs-cli github.com/jhspaybar/ecs_state github.com/mefellows/godspeed