File Coverage

blib/lib/Paws/ECS/PortMapping.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::ECS::PortMapping;
2 1     1   466 use Moose;
  1         2  
  1         8  
3             has ContainerPort => (is => 'ro', isa => 'Int', request_name => 'containerPort', traits => ['NameInRequest']);
4             has HostPort => (is => 'ro', isa => 'Int', request_name => 'hostPort', traits => ['NameInRequest']);
5             has Protocol => (is => 'ro', isa => 'Str', request_name => 'protocol', traits => ['NameInRequest']);
6             1;
7              
8             ### main pod documentation begin ###
9              
10             =head1 NAME
11              
12             Paws::ECS::PortMapping
13              
14             =head1 USAGE
15              
16             This class represents one of two things:
17              
18             =head3 Arguments in a call to a service
19              
20             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
21             Each attribute should be used as a named argument in the calls that expect this type of object.
22              
23             As an example, if Att1 is expected to be a Paws::ECS::PortMapping object:
24              
25             $service_obj->Method(Att1 => { ContainerPort => $value, ..., Protocol => $value });
26              
27             =head3 Results returned from an API call
28              
29             Use accessors for each attribute. If Att1 is expected to be an Paws::ECS::PortMapping object:
30              
31             $result = $service_obj->Method(...);
32             $result->Att1->ContainerPort
33              
34             =head1 DESCRIPTION
35              
36             Port mappings allow containers to access ports on the host container
37             instance to send or receive traffic. Port mappings are specified as
38             part of the container definition. After a task reaches the C<RUNNING>
39             status, manual and automatic host and container port assignments are
40             visible in the C<networkBindings> section of DescribeTasks API
41             responses.
42              
43             =head1 ATTRIBUTES
44              
45              
46             =head2 ContainerPort => Int
47              
48             The port number on the container that is bound to the user-specified or
49             automatically assigned host port. If you specify a container port and
50             not a host port, your container automatically receives a host port in
51             the ephemeral port range (for more information, see C<hostPort>). Port
52             mappings that are automatically assigned in this way do not count
53             toward the 100 reserved ports limit of a container instance.
54              
55              
56             =head2 HostPort => Int
57              
58             The port number on the container instance to reserve for your
59             container. You can specify a non-reserved host port for your container
60             port mapping, or you can omit the C<hostPort> (or set it to C<0>) while
61             specifying a C<containerPort> and your container automatically receives
62             a port in the ephemeral port range for your container instance
63             operating system and Docker version.
64              
65             The default ephemeral port range for Docker version 1.6.0 and later is
66             listed on the instance under C</proc/sys/net/ipv4/ip_local_port_range>;
67             if this kernel parameter is unavailable, the default ephemeral port
68             range of 49153 to 65535 is used. You should not attempt to specify a
69             host port in the ephemeral port range as these are reserved for
70             automatic assignment. In general, ports below 32768 are outside of the
71             ephemeral port range.
72              
73             The default ephemeral port range of 49153 to 65535 will always be used
74             for Docker versions prior to 1.6.0.
75              
76             The default reserved ports are 22 for SSH, the Docker ports 2375 and
77             2376, and the Amazon ECS container agent ports 51678 and 51679. Any
78             host port that was previously specified in a running task is also
79             reserved while the task is running (after a task stops, the host port
80             is released).The current reserved ports are displayed in the
81             C<remainingResources> of DescribeContainerInstances output, and a
82             container instance may have up to 100 reserved ports at a time,
83             including the default reserved ports (automatically assigned ports do
84             not count toward the 100 reserved ports limit).
85              
86              
87             =head2 Protocol => Str
88              
89             The protocol used for the port mapping. Valid values are C<tcp> and
90             C<udp>. The default is C<tcp>.
91              
92              
93              
94             =head1 SEE ALSO
95              
96             This class forms part of L<Paws>, describing an object used in L<Paws::ECS>
97              
98             =head1 BUGS and CONTRIBUTIONS
99              
100             The source code is located here: https://github.com/pplu/aws-sdk-perl
101              
102             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
103              
104             =cut
105