Fugue.AWS.ECS.PortMapping

Table of Contents

Module Members

tcp

(Function)

Create a new TCP port mapping.

Example usage:

ephemeralHostPort: ECS.PortMapping.tcp {
  containerPort: 80,
}

reservedHostPort: ECS.PortMapping.tcp {
  containerPort: 80,
  hostPort: 8080,
}

Type Signature

 fun { containerPort: Int,
       hostPort: Optional<Int> } -> PortMapping
Argument: containerPort

The port number on the container.

Type: Int

Argument: hostPort

The port on the container instance to reserve for a task. Defaults to 0, which will cause ECS to automatically allocate an ephemeral port.

Type: Optional<Int>

Returns:

A TCP PortMapping.

Type: PortMapping

udp

(Function)

Create a new UDP port mapping.

Example usage:

ephemeralHostPort: ECS.PortMapping.udp {
  containerPort: 53,
}

reservedHostPort: ECS.PortMapping.udp {
  containerPort: 53,
  hostPort: 5353,
}

Type Signature

 fun { containerPort: Int,
       hostPort: Optional<Int> } -> PortMapping
Argument: containerPort

The port number on the container.

Type: Int

Argument: hostPort

The port on the container instance to reserve for a task. Defaults to 0, which will cause ECS to automatically allocate an ephemeral port.

Type: Optional<Int>

Returns:

A UDP PortMapping.

Type: PortMapping