PortMapping class
Port mappings allow containers to access ports on the host container instance to send or receive traffic. Port mappings are specified as part of the container definition.
If you are using containers in a task with the awsvpc
or
host
network mode, exposed ports should be specified using
containerPort
. The hostPort
can be left blank or
it must be the same value as the containerPort
.
After a task reaches the RUNNING
status, manual and automatic
host and container port assignments are visible in the
networkBindings
section of DescribeTasks API responses.
Constructors
- PortMapping({int? containerPort, int? hostPort, TransportProtocol? protocol})
-
PortMapping.fromJson(Map<
String, dynamic> json) -
factory
Properties
- containerPort → int?
-
The port number on the container that is bound to the user-specified or
automatically assigned host port.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostPort → int?
-
The port number on the container instance to reserve for your container.
final
- protocol → TransportProtocol?
-
The protocol used for the port mapping. Valid values are
tcp
andudp
. The default istcp
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited