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