line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Paws::ECS::ContainerDefinition; |
2
|
1
|
|
|
1
|
|
474
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
3
|
|
|
|
|
|
|
has Command => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'command', traits => ['NameInRequest']); |
4
|
|
|
|
|
|
|
has Cpu => (is => 'ro', isa => 'Int', request_name => 'cpu', traits => ['NameInRequest']); |
5
|
|
|
|
|
|
|
has DisableNetworking => (is => 'ro', isa => 'Bool', request_name => 'disableNetworking', traits => ['NameInRequest']); |
6
|
|
|
|
|
|
|
has DnsSearchDomains => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'dnsSearchDomains', traits => ['NameInRequest']); |
7
|
|
|
|
|
|
|
has DnsServers => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'dnsServers', traits => ['NameInRequest']); |
8
|
|
|
|
|
|
|
has DockerLabels => (is => 'ro', isa => 'Paws::ECS::DockerLabelsMap', request_name => 'dockerLabels', traits => ['NameInRequest']); |
9
|
|
|
|
|
|
|
has DockerSecurityOptions => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'dockerSecurityOptions', traits => ['NameInRequest']); |
10
|
|
|
|
|
|
|
has EntryPoint => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'entryPoint', traits => ['NameInRequest']); |
11
|
|
|
|
|
|
|
has Environment => (is => 'ro', isa => 'ArrayRef[Paws::ECS::KeyValuePair]', request_name => 'environment', traits => ['NameInRequest']); |
12
|
|
|
|
|
|
|
has Essential => (is => 'ro', isa => 'Bool', request_name => 'essential', traits => ['NameInRequest']); |
13
|
|
|
|
|
|
|
has ExtraHosts => (is => 'ro', isa => 'ArrayRef[Paws::ECS::HostEntry]', request_name => 'extraHosts', traits => ['NameInRequest']); |
14
|
|
|
|
|
|
|
has Hostname => (is => 'ro', isa => 'Str', request_name => 'hostname', traits => ['NameInRequest']); |
15
|
|
|
|
|
|
|
has Image => (is => 'ro', isa => 'Str', request_name => 'image', traits => ['NameInRequest']); |
16
|
|
|
|
|
|
|
has Links => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'links', traits => ['NameInRequest']); |
17
|
|
|
|
|
|
|
has LinuxParameters => (is => 'ro', isa => 'Paws::ECS::LinuxParameters', request_name => 'linuxParameters', traits => ['NameInRequest']); |
18
|
|
|
|
|
|
|
has LogConfiguration => (is => 'ro', isa => 'Paws::ECS::LogConfiguration', request_name => 'logConfiguration', traits => ['NameInRequest']); |
19
|
|
|
|
|
|
|
has Memory => (is => 'ro', isa => 'Int', request_name => 'memory', traits => ['NameInRequest']); |
20
|
|
|
|
|
|
|
has MemoryReservation => (is => 'ro', isa => 'Int', request_name => 'memoryReservation', traits => ['NameInRequest']); |
21
|
|
|
|
|
|
|
has MountPoints => (is => 'ro', isa => 'ArrayRef[Paws::ECS::MountPoint]', request_name => 'mountPoints', traits => ['NameInRequest']); |
22
|
|
|
|
|
|
|
has Name => (is => 'ro', isa => 'Str', request_name => 'name', traits => ['NameInRequest']); |
23
|
|
|
|
|
|
|
has PortMappings => (is => 'ro', isa => 'ArrayRef[Paws::ECS::PortMapping]', request_name => 'portMappings', traits => ['NameInRequest']); |
24
|
|
|
|
|
|
|
has Privileged => (is => 'ro', isa => 'Bool', request_name => 'privileged', traits => ['NameInRequest']); |
25
|
|
|
|
|
|
|
has ReadonlyRootFilesystem => (is => 'ro', isa => 'Bool', request_name => 'readonlyRootFilesystem', traits => ['NameInRequest']); |
26
|
|
|
|
|
|
|
has Ulimits => (is => 'ro', isa => 'ArrayRef[Paws::ECS::Ulimit]', request_name => 'ulimits', traits => ['NameInRequest']); |
27
|
|
|
|
|
|
|
has User => (is => 'ro', isa => 'Str', request_name => 'user', traits => ['NameInRequest']); |
28
|
|
|
|
|
|
|
has VolumesFrom => (is => 'ro', isa => 'ArrayRef[Paws::ECS::VolumeFrom]', request_name => 'volumesFrom', traits => ['NameInRequest']); |
29
|
|
|
|
|
|
|
has WorkingDirectory => (is => 'ro', isa => 'Str', request_name => 'workingDirectory', traits => ['NameInRequest']); |
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
### main pod documentation begin ### |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Paws::ECS::ContainerDefinition |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 USAGE |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
This class represents one of two things: |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head3 Arguments in a call to a service |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. |
45
|
|
|
|
|
|
|
Each attribute should be used as a named argument in the calls that expect this type of object. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
As an example, if Att1 is expected to be a Paws::ECS::ContainerDefinition object: |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$service_obj->Method(Att1 => { Command => $value, ..., WorkingDirectory => $value }); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head3 Results returned from an API call |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Use accessors for each attribute. If Att1 is expected to be an Paws::ECS::ContainerDefinition object: |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
$result = $service_obj->Method(...); |
56
|
|
|
|
|
|
|
$result->Att1->Command |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 DESCRIPTION |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Container definitions are used in task definitions to describe the |
61
|
|
|
|
|
|
|
different containers that are launched as part of a task. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 Command => ArrayRef[Str|Undef] |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
The command that is passed to the container. This parameter maps to |
69
|
|
|
|
|
|
|
C<Cmd> in the Create a container section of the Docker Remote API and |
70
|
|
|
|
|
|
|
the C<COMMAND> parameter to docker run. For more information, see |
71
|
|
|
|
|
|
|
https://docs.docker.com/engine/reference/builder/#cmd. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 Cpu => Int |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
The number of C<cpu> units reserved for the container. A container |
77
|
|
|
|
|
|
|
instance has 1,024 C<cpu> units for every CPU core. This parameter |
78
|
|
|
|
|
|
|
specifies the minimum amount of CPU to reserve for a container, and |
79
|
|
|
|
|
|
|
containers share unallocated CPU units with other containers on the |
80
|
|
|
|
|
|
|
instance with the same ratio as their allocated amount. This parameter |
81
|
|
|
|
|
|
|
maps to C<CpuShares> in the Create a container section of the Docker |
82
|
|
|
|
|
|
|
Remote API and the C<--cpu-shares> option to docker run. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can determine the number of CPU units that are available per EC2 |
85
|
|
|
|
|
|
|
instance type by multiplying the vCPUs listed for that instance type on |
86
|
|
|
|
|
|
|
the Amazon EC2 Instances detail page by 1,024. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
For example, if you run a single-container task on a single-core |
89
|
|
|
|
|
|
|
instance type with 512 CPU units specified for that container, and that |
90
|
|
|
|
|
|
|
is the only task running on the container instance, that container |
91
|
|
|
|
|
|
|
could use the full 1,024 CPU unit share at any given time. However, if |
92
|
|
|
|
|
|
|
you launched another copy of the same task on that container instance, |
93
|
|
|
|
|
|
|
each task would be guaranteed a minimum of 512 CPU units when needed, |
94
|
|
|
|
|
|
|
and each container could float to higher CPU usage if the other |
95
|
|
|
|
|
|
|
container was not using it, but if both tasks were 100% active all of |
96
|
|
|
|
|
|
|
the time, they would be limited to 512 CPU units. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The Docker daemon on the container instance uses the CPU value to |
99
|
|
|
|
|
|
|
calculate the relative CPU share ratios for running containers. For |
100
|
|
|
|
|
|
|
more information, see CPU share constraint in the Docker documentation. |
101
|
|
|
|
|
|
|
The minimum valid CPU share value that the Linux kernel allows is 2; |
102
|
|
|
|
|
|
|
however, the CPU parameter is not required, and you can use CPU values |
103
|
|
|
|
|
|
|
below 2 in your container definitions. For CPU values below 2 |
104
|
|
|
|
|
|
|
(including null), the behavior varies based on your Amazon ECS |
105
|
|
|
|
|
|
|
container agent version: |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=over |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
B<Agent versions less than or equal to 1.1.0:> Null and zero CPU values |
112
|
|
|
|
|
|
|
are passed to Docker as 0, which Docker then converts to 1,024 CPU |
113
|
|
|
|
|
|
|
shares. CPU values of 1 are passed to Docker as 1, which the Linux |
114
|
|
|
|
|
|
|
kernel converts to 2 CPU shares. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
B<Agent versions greater than or equal to 1.2.0:> Null, zero, and CPU |
119
|
|
|
|
|
|
|
values of 1 are passed to Docker as 2. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=back |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 DisableNetworking => Bool |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
When this parameter is true, networking is disabled within the |
128
|
|
|
|
|
|
|
container. This parameter maps to C<NetworkDisabled> in the Create a |
129
|
|
|
|
|
|
|
container section of the Docker Remote API. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head2 DnsSearchDomains => ArrayRef[Str|Undef] |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
A list of DNS search domains that are presented to the container. This |
135
|
|
|
|
|
|
|
parameter maps to C<DnsSearch> in the Create a container section of the |
136
|
|
|
|
|
|
|
Docker Remote API and the C<--dns-search> option to docker run. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 DnsServers => ArrayRef[Str|Undef] |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
A list of DNS servers that are presented to the container. This |
142
|
|
|
|
|
|
|
parameter maps to C<Dns> in the Create a container section of the |
143
|
|
|
|
|
|
|
Docker Remote API and the C<--dns> option to docker run. |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=head2 DockerLabels => L<Paws::ECS::DockerLabelsMap> |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
A key/value map of labels to add to the container. This parameter maps |
149
|
|
|
|
|
|
|
to C<Labels> in the Create a container section of the Docker Remote API |
150
|
|
|
|
|
|
|
and the C<--label> option to docker run. This parameter requires |
151
|
|
|
|
|
|
|
version 1.18 of the Docker Remote API or greater on your container |
152
|
|
|
|
|
|
|
instance. To check the Docker Remote API version on your container |
153
|
|
|
|
|
|
|
instance, log into your container instance and run the following |
154
|
|
|
|
|
|
|
command: C<sudo docker version | grep "Server API version"> |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 DockerSecurityOptions => ArrayRef[Str|Undef] |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
A list of strings to provide custom labels for SELinux and AppArmor |
160
|
|
|
|
|
|
|
multi-level security systems. This parameter maps to C<SecurityOpt> in |
161
|
|
|
|
|
|
|
the Create a container section of the Docker Remote API and the |
162
|
|
|
|
|
|
|
C<--security-opt> option to docker run. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
The Amazon ECS container agent running on a container instance must |
165
|
|
|
|
|
|
|
register with the C<ECS_SELINUX_CAPABLE=true> or |
166
|
|
|
|
|
|
|
C<ECS_APPARMOR_CAPABLE=true> environment variables before containers |
167
|
|
|
|
|
|
|
placed on that instance can use these security options. For more |
168
|
|
|
|
|
|
|
information, see Amazon ECS Container Agent Configuration in the |
169
|
|
|
|
|
|
|
I<Amazon EC2 Container Service Developer Guide>. |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head2 EntryPoint => ArrayRef[Str|Undef] |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
Early versions of the Amazon ECS container agent do not properly handle |
175
|
|
|
|
|
|
|
C<entryPoint> parameters. If you have problems using C<entryPoint>, |
176
|
|
|
|
|
|
|
update your container agent or enter your commands and arguments as |
177
|
|
|
|
|
|
|
C<command> array items instead. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
The entry point that is passed to the container. This parameter maps to |
180
|
|
|
|
|
|
|
C<Entrypoint> in the Create a container section of the Docker Remote |
181
|
|
|
|
|
|
|
API and the C<--entrypoint> option to docker run. For more information, |
182
|
|
|
|
|
|
|
see https://docs.docker.com/engine/reference/builder/#entrypoint. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head2 Environment => ArrayRef[L<Paws::ECS::KeyValuePair>] |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
The environment variables to pass to a container. This parameter maps |
188
|
|
|
|
|
|
|
to C<Env> in the Create a container section of the Docker Remote API |
189
|
|
|
|
|
|
|
and the C<--env> option to docker run. |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
We do not recommend using plain text environment variables for |
192
|
|
|
|
|
|
|
sensitive information, such as credential data. |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head2 Essential => Bool |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
If the C<essential> parameter of a container is marked as C<true>, and |
198
|
|
|
|
|
|
|
that container fails or stops for any reason, all other containers that |
199
|
|
|
|
|
|
|
are part of the task are stopped. If the C<essential> parameter of a |
200
|
|
|
|
|
|
|
container is marked as C<false>, then its failure does not affect the |
201
|
|
|
|
|
|
|
rest of the containers in a task. If this parameter is omitted, a |
202
|
|
|
|
|
|
|
container is assumed to be essential. |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
All tasks must have at least one essential container. If you have an |
205
|
|
|
|
|
|
|
application that is composed of multiple containers, you should group |
206
|
|
|
|
|
|
|
containers that are used for a common purpose into components, and |
207
|
|
|
|
|
|
|
separate the different components into multiple task definitions. For |
208
|
|
|
|
|
|
|
more information, see Application Architecture in the I<Amazon EC2 |
209
|
|
|
|
|
|
|
Container Service Developer Guide>. |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=head2 ExtraHosts => ArrayRef[L<Paws::ECS::HostEntry>] |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
A list of hostnames and IP address mappings to append to the |
215
|
|
|
|
|
|
|
C</etc/hosts> file on the container. This parameter maps to |
216
|
|
|
|
|
|
|
C<ExtraHosts> in the Create a container section of the Docker Remote |
217
|
|
|
|
|
|
|
API and the C<--add-host> option to docker run. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=head2 Hostname => Str |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
The hostname to use for your container. This parameter maps to |
223
|
|
|
|
|
|
|
C<Hostname> in the Create a container section of the Docker Remote API |
224
|
|
|
|
|
|
|
and the C<--hostname> option to docker run. |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
=head2 Image => Str |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
The image used to start a container. This string is passed directly to |
230
|
|
|
|
|
|
|
the Docker daemon. Images in the Docker Hub registry are available by |
231
|
|
|
|
|
|
|
default. Other repositories are specified with either C< |
232
|
|
|
|
|
|
|
I<repository-url>/I<image>:I<tag> > or C< |
233
|
|
|
|
|
|
|
I<repository-url>/I<image>@I<digest> >. Up to 255 letters (uppercase |
234
|
|
|
|
|
|
|
and lowercase), numbers, hyphens, underscores, colons, periods, forward |
235
|
|
|
|
|
|
|
slashes, and number signs are allowed. This parameter maps to C<Image> |
236
|
|
|
|
|
|
|
in the Create a container section of the Docker Remote API and the |
237
|
|
|
|
|
|
|
C<IMAGE> parameter of docker run. |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=over |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=item * |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
Images in Amazon ECR repositories can be specified by either using the |
244
|
|
|
|
|
|
|
full C<registry/repository:tag> or C<registry/repository@digest>. For |
245
|
|
|
|
|
|
|
example, |
246
|
|
|
|
|
|
|
C<012345678910.dkr.ecr.E<lt>region-nameE<gt>.amazonaws.com/E<lt>repository-nameE<gt>:latest> |
247
|
|
|
|
|
|
|
or |
248
|
|
|
|
|
|
|
C<012345678910.dkr.ecr.E<lt>region-nameE<gt>.amazonaws.com/E<lt>repository-nameE<gt>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE>. |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=item * |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
Images in official repositories on Docker Hub use a single name (for |
253
|
|
|
|
|
|
|
example, C<ubuntu> or C<mongo>). |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=item * |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Images in other repositories on Docker Hub are qualified with an |
258
|
|
|
|
|
|
|
organization name (for example, C<amazon/amazon-ecs-agent>). |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
=item * |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
Images in other online repositories are qualified further by a domain |
263
|
|
|
|
|
|
|
name (for example, C<quay.io/assemblyline/ubuntu>). |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=back |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
=head2 Links => ArrayRef[Str|Undef] |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
The C<link> parameter allows containers to communicate with each other |
272
|
|
|
|
|
|
|
without the need for port mappings, using the C<name> parameter and |
273
|
|
|
|
|
|
|
optionally, an C<alias> for the link. This construct is analogous to |
274
|
|
|
|
|
|
|
C<name:alias> in Docker links. Up to 255 letters (uppercase and |
275
|
|
|
|
|
|
|
lowercase), numbers, hyphens, and underscores are allowed for each |
276
|
|
|
|
|
|
|
C<name> and C<alias>. For more information on linking Docker |
277
|
|
|
|
|
|
|
containers, see |
278
|
|
|
|
|
|
|
https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/. |
279
|
|
|
|
|
|
|
This parameter maps to C<Links> in the Create a container section of |
280
|
|
|
|
|
|
|
the Docker Remote API and the C<--link> option to docker run. |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
Containers that are collocated on a single container instance may be |
283
|
|
|
|
|
|
|
able to communicate with each other without requiring links or host |
284
|
|
|
|
|
|
|
port mappings. Network isolation is achieved on the container instance |
285
|
|
|
|
|
|
|
using security groups and VPC settings. |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=head2 LinuxParameters => L<Paws::ECS::LinuxParameters> |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
Linux-specific modifications that are applied to the container, such as |
291
|
|
|
|
|
|
|
Linux KernelCapabilities. |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
=head2 LogConfiguration => L<Paws::ECS::LogConfiguration> |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
The log configuration specification for the container. This parameter |
297
|
|
|
|
|
|
|
maps to C<LogConfig> in the Create a container section of the Docker |
298
|
|
|
|
|
|
|
Remote API and the C<--log-driver> option to docker run. By default, |
299
|
|
|
|
|
|
|
containers use the same logging driver that the Docker daemon uses; |
300
|
|
|
|
|
|
|
however the container may use a different logging driver than the |
301
|
|
|
|
|
|
|
Docker daemon by specifying a log driver with this parameter in the |
302
|
|
|
|
|
|
|
container definition. To use a different logging driver for a |
303
|
|
|
|
|
|
|
container, the log system must be configured properly on the container |
304
|
|
|
|
|
|
|
instance (or on a different log server for remote logging options). For |
305
|
|
|
|
|
|
|
more information on the options for different supported log drivers, |
306
|
|
|
|
|
|
|
see Configure logging drivers in the Docker documentation. |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
Amazon ECS currently supports a subset of the logging drivers available |
309
|
|
|
|
|
|
|
to the Docker daemon (shown in the LogConfiguration data type). |
310
|
|
|
|
|
|
|
Additional log drivers may be available in future releases of the |
311
|
|
|
|
|
|
|
Amazon ECS container agent. |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
This parameter requires version 1.18 of the Docker Remote API or |
314
|
|
|
|
|
|
|
greater on your container instance. To check the Docker Remote API |
315
|
|
|
|
|
|
|
version on your container instance, log into your container instance |
316
|
|
|
|
|
|
|
and run the following command: C<sudo docker version | grep "Server API |
317
|
|
|
|
|
|
|
version"> |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
The Amazon ECS container agent running on a container instance must |
320
|
|
|
|
|
|
|
register the logging drivers available on that instance with the |
321
|
|
|
|
|
|
|
C<ECS_AVAILABLE_LOGGING_DRIVERS> environment variable before containers |
322
|
|
|
|
|
|
|
placed on that instance can use these log configuration options. For |
323
|
|
|
|
|
|
|
more information, see Amazon ECS Container Agent Configuration in the |
324
|
|
|
|
|
|
|
I<Amazon EC2 Container Service Developer Guide>. |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
=head2 Memory => Int |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
The hard limit (in MiB) of memory to present to the container. If your |
330
|
|
|
|
|
|
|
container attempts to exceed the memory specified here, the container |
331
|
|
|
|
|
|
|
is killed. This parameter maps to C<Memory> in the Create a container |
332
|
|
|
|
|
|
|
section of the Docker Remote API and the C<--memory> option to docker |
333
|
|
|
|
|
|
|
run. |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
You must specify a non-zero integer for one or both of C<memory> or |
336
|
|
|
|
|
|
|
C<memoryReservation> in container definitions. If you specify both, |
337
|
|
|
|
|
|
|
C<memory> must be greater than C<memoryReservation>. If you specify |
338
|
|
|
|
|
|
|
C<memoryReservation>, then that value is subtracted from the available |
339
|
|
|
|
|
|
|
memory resources for the container instance on which the container is |
340
|
|
|
|
|
|
|
placed; otherwise, the value of C<memory> is used. |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
The Docker daemon reserves a minimum of 4 MiB of memory for a |
343
|
|
|
|
|
|
|
container, so you should not specify fewer than 4 MiB of memory for |
344
|
|
|
|
|
|
|
your containers. |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
=head2 MemoryReservation => Int |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
The soft limit (in MiB) of memory to reserve for the container. When |
350
|
|
|
|
|
|
|
system memory is under heavy contention, Docker attempts to keep the |
351
|
|
|
|
|
|
|
container memory to this soft limit; however, your container can |
352
|
|
|
|
|
|
|
consume more memory when it needs to, up to either the hard limit |
353
|
|
|
|
|
|
|
specified with the C<memory> parameter (if applicable), or all of the |
354
|
|
|
|
|
|
|
available memory on the container instance, whichever comes first. This |
355
|
|
|
|
|
|
|
parameter maps to C<MemoryReservation> in the Create a container |
356
|
|
|
|
|
|
|
section of the Docker Remote API and the C<--memory-reservation> option |
357
|
|
|
|
|
|
|
to docker run. |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
You must specify a non-zero integer for one or both of C<memory> or |
360
|
|
|
|
|
|
|
C<memoryReservation> in container definitions. If you specify both, |
361
|
|
|
|
|
|
|
C<memory> must be greater than C<memoryReservation>. If you specify |
362
|
|
|
|
|
|
|
C<memoryReservation>, then that value is subtracted from the available |
363
|
|
|
|
|
|
|
memory resources for the container instance on which the container is |
364
|
|
|
|
|
|
|
placed; otherwise, the value of C<memory> is used. |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
For example, if your container normally uses 128 MiB of memory, but |
367
|
|
|
|
|
|
|
occasionally bursts to 256 MiB of memory for short periods of time, you |
368
|
|
|
|
|
|
|
can set a C<memoryReservation> of 128 MiB, and a C<memory> hard limit |
369
|
|
|
|
|
|
|
of 300 MiB. This configuration would allow the container to only |
370
|
|
|
|
|
|
|
reserve 128 MiB of memory from the remaining resources on the container |
371
|
|
|
|
|
|
|
instance, but also allow the container to consume more memory resources |
372
|
|
|
|
|
|
|
when needed. |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
=head2 MountPoints => ArrayRef[L<Paws::ECS::MountPoint>] |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
The mount points for data volumes in your container. This parameter |
378
|
|
|
|
|
|
|
maps to C<Volumes> in the Create a container section of the Docker |
379
|
|
|
|
|
|
|
Remote API and the C<--volume> option to docker run. |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
=head2 Name => Str |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
The name of a container. If you are linking multiple containers |
385
|
|
|
|
|
|
|
together in a task definition, the C<name> of one container can be |
386
|
|
|
|
|
|
|
entered in the C<links> of another container to connect the containers. |
387
|
|
|
|
|
|
|
Up to 255 letters (uppercase and lowercase), numbers, hyphens, and |
388
|
|
|
|
|
|
|
underscores are allowed. This parameter maps to C<name> in the Create a |
389
|
|
|
|
|
|
|
container section of the Docker Remote API and the C<--name> option to |
390
|
|
|
|
|
|
|
docker run. |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
=head2 PortMappings => ArrayRef[L<Paws::ECS::PortMapping>] |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
The list of port mappings for the container. Port mappings allow |
396
|
|
|
|
|
|
|
containers to access ports on the host container instance to send or |
397
|
|
|
|
|
|
|
receive traffic. This parameter maps to C<PortBindings> in the Create a |
398
|
|
|
|
|
|
|
container section of the Docker Remote API and the C<--publish> option |
399
|
|
|
|
|
|
|
to docker run. If the network mode of a task definition is set to |
400
|
|
|
|
|
|
|
C<none>, then you cannot specify port mappings. If the network mode of |
401
|
|
|
|
|
|
|
a task definition is set to C<host>, then host ports must either be |
402
|
|
|
|
|
|
|
undefined or they must match the container port in the port mapping. |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
After a task reaches the C<RUNNING> status, manual and automatic host |
405
|
|
|
|
|
|
|
and container port assignments are visible in the B<Network Bindings> |
406
|
|
|
|
|
|
|
section of a container description of a selected task in the Amazon ECS |
407
|
|
|
|
|
|
|
console, or the C<networkBindings> section DescribeTasks responses. |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=head2 Privileged => Bool |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
When this parameter is true, the container is given elevated privileges |
413
|
|
|
|
|
|
|
on the host container instance (similar to the C<root> user). This |
414
|
|
|
|
|
|
|
parameter maps to C<Privileged> in the Create a container section of |
415
|
|
|
|
|
|
|
the Docker Remote API and the C<--privileged> option to docker run. |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
=head2 ReadonlyRootFilesystem => Bool |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
When this parameter is true, the container is given read-only access to |
421
|
|
|
|
|
|
|
its root file system. This parameter maps to C<ReadonlyRootfs> in the |
422
|
|
|
|
|
|
|
Create a container section of the Docker Remote API and the |
423
|
|
|
|
|
|
|
C<--read-only> option to C<docker run>. |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=head2 Ulimits => ArrayRef[L<Paws::ECS::Ulimit>] |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
A list of C<ulimits> to set in the container. This parameter maps to |
429
|
|
|
|
|
|
|
C<Ulimits> in the Create a container section of the Docker Remote API |
430
|
|
|
|
|
|
|
and the C<--ulimit> option to docker run. Valid naming values are |
431
|
|
|
|
|
|
|
displayed in the Ulimit data type. This parameter requires version 1.18 |
432
|
|
|
|
|
|
|
of the Docker Remote API or greater on your container instance. To |
433
|
|
|
|
|
|
|
check the Docker Remote API version on your container instance, log |
434
|
|
|
|
|
|
|
into your container instance and run the following command: C<sudo |
435
|
|
|
|
|
|
|
docker version | grep "Server API version"> |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
=head2 User => Str |
439
|
|
|
|
|
|
|
|
440
|
|
|
|
|
|
|
The user name to use inside the container. This parameter maps to |
441
|
|
|
|
|
|
|
C<User> in the Create a container section of the Docker Remote API and |
442
|
|
|
|
|
|
|
the C<--user> option to docker run. |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
=head2 VolumesFrom => ArrayRef[L<Paws::ECS::VolumeFrom>] |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
Data volumes to mount from another container. This parameter maps to |
448
|
|
|
|
|
|
|
C<VolumesFrom> in the Create a container section of the Docker Remote |
449
|
|
|
|
|
|
|
API and the C<--volumes-from> option to docker run. |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
=head2 WorkingDirectory => Str |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
The working directory in which to run commands inside the container. |
455
|
|
|
|
|
|
|
This parameter maps to C<WorkingDir> in the Create a container section |
456
|
|
|
|
|
|
|
of the Docker Remote API and the C<--workdir> option to docker run. |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
=head1 SEE ALSO |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
This class forms part of L<Paws>, describing an object used in L<Paws::ECS> |
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
465
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
=cut |
471
|
|
|
|
|
|
|
|