blib/lib/Paws/ECS/TaskDefinition.pm untested

filter: Statementstmt 0.0% 0 / 49 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 50 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::ECS::TaskDefinition;
3 use Moose;
4 has Compatibilities => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'compatibilities', traits => ['NameInRequest']);
5 has ContainerDefinitions => (is => 'ro', isa => 'ArrayRef[Paws::ECS::ContainerDefinition]', request_name => 'containerDefinitions', traits => ['NameInRequest']);
6 has Cpu => (is => 'ro', isa => 'Str', request_name => 'cpu', traits => ['NameInRequest']);
7 has DeregisteredAt => (is => 'ro', isa => 'Str', request_name => 'deregisteredAt', traits => ['NameInRequest']);
8 has EphemeralStorage => (is => 'ro', isa => 'Paws::ECS::EphemeralStorage', request_name => 'ephemeralStorage', traits => ['NameInRequest']);
9 has ExecutionRoleArn => (is => 'ro', isa => 'Str', request_name => 'executionRoleArn', traits => ['NameInRequest']);
10 has Family => (is => 'ro', isa => 'Str', request_name => 'family', traits => ['NameInRequest']);
11 has InferenceAccelerators => (is => 'ro', isa => 'ArrayRef[Paws::ECS::InferenceAccelerator]', request_name => 'inferenceAccelerators', traits => ['NameInRequest']);
12 has IpcMode => (is => 'ro', isa => 'Str', request_name => 'ipcMode', traits => ['NameInRequest']);
13 has Memory => (is => 'ro', isa => 'Str', request_name => 'memory', traits => ['NameInRequest']);
14 has NetworkMode => (is => 'ro', isa => 'Str', request_name => 'networkMode', traits => ['NameInRequest']);
15 has PidMode => (is => 'ro', isa => 'Str', request_name => 'pidMode', traits => ['NameInRequest']);
16 has PlacementConstraints => (is => 'ro', isa => 'ArrayRef[Paws::ECS::TaskDefinitionPlacementConstraint]', request_name => 'placementConstraints', traits => ['NameInRequest']);
17 has ProxyConfiguration => (is => 'ro', isa => 'Paws::ECS::ProxyConfiguration', request_name => 'proxyConfiguration', traits => ['NameInRequest']);
18 has RegisteredAt => (is => 'ro', isa => 'Str', request_name => 'registeredAt', traits => ['NameInRequest']);
19 has RegisteredBy => (is => 'ro', isa => 'Str', request_name => 'registeredBy', traits => ['NameInRequest']);
20 has RequiresAttributes => (is => 'ro', isa => 'ArrayRef[Paws::ECS::Attribute]', request_name => 'requiresAttributes', traits => ['NameInRequest']);
21 has RequiresCompatibilities => (is => 'ro', isa => 'ArrayRef[Str|Undef]', request_name => 'requiresCompatibilities', traits => ['NameInRequest']);
22 has Revision => (is => 'ro', isa => 'Int', request_name => 'revision', traits => ['NameInRequest']);
23 has Status => (is => 'ro', isa => 'Str', request_name => 'status', traits => ['NameInRequest']);
24 has TaskDefinitionArn => (is => 'ro', isa => 'Str', request_name => 'taskDefinitionArn', traits => ['NameInRequest']);
25 has TaskRoleArn => (is => 'ro', isa => 'Str', request_name => 'taskRoleArn', traits => ['NameInRequest']);
26 has Volumes => (is => 'ro', isa => 'ArrayRef[Paws::ECS::Volume]', request_name => 'volumes', traits => ['NameInRequest']);
27  
28 1;
29  
30 ### main pod documentation begin ###
31  
32 =head1 NAME
33  
34 Paws::ECS::TaskDefinition
35  
36 =head1 USAGE
37  
38 This class represents one of two things:
39  
40 =head3 Arguments in a call to a service
41  
42 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
43 Each attribute should be used as a named argument in the calls that expect this type of object.
44  
45 As an example, if Att1 is expected to be a Paws::ECS::TaskDefinition object:
46  
47 $service_obj->Method(Att1 => { Compatibilities => $value, ..., Volumes => $value });
48  
49 =head3 Results returned from an API call
50  
51 Use accessors for each attribute. If Att1 is expected to be an Paws::ECS::TaskDefinition object:
52  
53 $result = $service_obj->Method(...);
54 $result->Att1->Compatibilities
55  
56 =head1 DESCRIPTION
57  
58 The details of a task definition which describes the container and
59 volume definitions of an Amazon Elastic Container Service task. You can
60 specify which Docker images to use, the required resources, and other
61 configurations related to launching the task definition through an
62 Amazon ECS service or task.
63  
64 =head1 ATTRIBUTES
65  
66  
67 =head2 Compatibilities => ArrayRef[Str|Undef]
68  
69 The task launch types the task definition validated against during task
70 definition registration. For more information, see Amazon ECS launch
71 types
72 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
73 in the I<Amazon Elastic Container Service Developer Guide>.
74  
75  
76 =head2 ContainerDefinitions => ArrayRef[L<Paws::ECS::ContainerDefinition>]
77  
78 A list of container definitions in JSON format that describe the
79 different containers that make up your task. For more information about
80 container definition parameters and defaults, see Amazon ECS Task
81 Definitions
82 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html)
83 in the I<Amazon Elastic Container Service Developer Guide>.
84  
85  
86 =head2 Cpu => Str
87  
88 The number of C<cpu> units used by the task. If you are using the EC2
89 launch type, this field is optional and any value can be used. If you
90 are using the Fargate launch type, this field is required and you must
91 use one of the following values, which determines your range of valid
92 values for the C<memory> parameter:
93  
94 =over
95  
96 =item *
97  
98 256 (.25 vCPU) - Available C<memory> values: 512 (0.5 GB), 1024 (1 GB),
99 2048 (2 GB)
100  
101 =item *
102  
103 512 (.5 vCPU) - Available C<memory> values: 1024 (1 GB), 2048 (2 GB),
104 3072 (3 GB), 4096 (4 GB)
105  
106 =item *
107  
108 1024 (1 vCPU) - Available C<memory> values: 2048 (2 GB), 3072 (3 GB),
109 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)
110  
111 =item *
112  
113 2048 (2 vCPU) - Available C<memory> values: Between 4096 (4 GB) and
114 16384 (16 GB) in increments of 1024 (1 GB)
115  
116 =item *
117  
118 4096 (4 vCPU) - Available C<memory> values: Between 8192 (8 GB) and
119 30720 (30 GB) in increments of 1024 (1 GB)
120  
121 =back
122  
123  
124  
125 =head2 DeregisteredAt => Str
126  
127 The Unix timestamp for when the task definition was deregistered.
128  
129  
130 =head2 EphemeralStorage => L<Paws::ECS::EphemeralStorage>
131  
132 The ephemeral storage settings to use for tasks run with the task
133 definition.
134  
135  
136 =head2 ExecutionRoleArn => Str
137  
138 The Amazon Resource Name (ARN) of the task execution role that grants
139 the Amazon ECS container agent permission to make AWS API calls on your
140 behalf. The task execution IAM role is required depending on the
141 requirements of your task. For more information, see Amazon ECS task
142 execution IAM role
143 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html)
144 in the I<Amazon Elastic Container Service Developer Guide>.
145  
146  
147 =head2 Family => Str
148  
149 The name of a family that this task definition is registered to. Up to
150 255 letters (uppercase and lowercase), numbers, hyphens, and
151 underscores are allowed.
152  
153 A family groups multiple versions of a task definition. Amazon ECS
154 gives the first task definition that you registered to a family a
155 revision number of 1. Amazon ECS gives sequential revision numbers to
156 each task definition that you add.
157  
158  
159 =head2 InferenceAccelerators => ArrayRef[L<Paws::ECS::InferenceAccelerator>]
160  
161 The Elastic Inference accelerator associated with the task.
162  
163  
164 =head2 IpcMode => Str
165  
166 The IPC resource namespace to use for the containers in the task. The
167 valid values are C<host>, C<task>, or C<none>. If C<host> is specified,
168 then all containers within the tasks that specified the C<host> IPC
169 mode on the same container instance share the same IPC resources with
170 the host Amazon EC2 instance. If C<task> is specified, all containers
171 within the specified task share the same IPC resources. If C<none> is
172 specified, then IPC resources within the containers of a task are
173 private and not shared with other containers in a task or on the
174 container instance. If no value is specified, then the IPC resource
175 namespace sharing depends on the Docker daemon setting on the container
176 instance. For more information, see IPC settings
177 (https://docs.docker.com/engine/reference/run/#ipc-settings---ipc) in
178 the I<Docker run reference>.
179  
180 If the C<host> IPC mode is used, be aware that there is a heightened
181 risk of undesired IPC namespace expose. For more information, see
182 Docker security (https://docs.docker.com/engine/security/security/).
183  
184 If you are setting namespaced kernel parameters using C<systemControls>
185 for the containers in the task, the following will apply to your IPC
186 resource namespace. For more information, see System Controls
187 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html)
188 in the I<Amazon Elastic Container Service Developer Guide>.
189  
190 =over
191  
192 =item *
193  
194 For tasks that use the C<host> IPC mode, IPC namespace related
195 C<systemControls> are not supported.
196  
197 =item *
198  
199 For tasks that use the C<task> IPC mode, IPC namespace related
200 C<systemControls> will apply to all containers within a task.
201  
202 =back
203  
204 This parameter is not supported for Windows containers or tasks run on
205 AWS Fargate.
206  
207  
208 =head2 Memory => Str
209  
210 The amount (in MiB) of memory used by the task.
211  
212 If your tasks will be run on Amazon EC2 instances, you must specify
213 either a task-level memory value or a container-level memory value.
214 This field is optional and any value can be used. If a task-level
215 memory value is specified then the container-level memory value is
216 optional. For more information regarding container-level memory and
217 memory reservation, see ContainerDefinition
218 (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html).
219  
220 If your tasks will be run on AWS Fargate, this field is required and
221 you must use one of the following values, which determines your range
222 of valid values for the C<cpu> parameter:
223  
224 =over
225  
226 =item *
227  
228 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available C<cpu> values: 256
229 (.25 vCPU)
230  
231 =item *
232  
233 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available C<cpu>
234 values: 512 (.5 vCPU)
235  
236 =item *
237  
238 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168
239 (7 GB), 8192 (8 GB) - Available C<cpu> values: 1024 (1 vCPU)
240  
241 =item *
242  
243 Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) -
244 Available C<cpu> values: 2048 (2 vCPU)
245  
246 =item *
247  
248 Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) -
249 Available C<cpu> values: 4096 (4 vCPU)
250  
251 =back
252  
253  
254  
255 =head2 NetworkMode => Str
256  
257 The Docker networking mode to use for the containers in the task. The
258 valid values are C<none>, C<bridge>, C<awsvpc>, and C<host>. If no
259 network mode is specified, the default is C<bridge>.
260  
261 For Amazon ECS tasks on Fargate, the C<awsvpc> network mode is
262 required. For Amazon ECS tasks on Amazon EC2 instances, any network
263 mode can be used. If the network mode is set to C<none>, you cannot
264 specify port mappings in your container definitions, and the tasks
265 containers do not have external connectivity. The C<host> and C<awsvpc>
266 network modes offer the highest networking performance for containers
267 because they use the EC2 network stack instead of the virtualized
268 network stack provided by the C<bridge> mode.
269  
270 With the C<host> and C<awsvpc> network modes, exposed container ports
271 are mapped directly to the corresponding host port (for the C<host>
272 network mode) or the attached elastic network interface port (for the
273 C<awsvpc> network mode), so you cannot take advantage of dynamic host
274 port mappings.
275  
276 When using the C<host> network mode, you should not run containers
277 using the root user (UID 0). It is considered best practice to use a
278 non-root user.
279  
280 If the network mode is C<awsvpc>, the task is allocated an elastic
281 network interface, and you must specify a NetworkConfiguration value
282 when you create a service or run a task with the task definition. For
283 more information, see Task Networking
284 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
285 in the I<Amazon Elastic Container Service Developer Guide>.
286  
287 Currently, only Amazon ECS-optimized AMIs, other Amazon Linux variants
288 with the C<ecs-init> package, or AWS Fargate infrastructure support the
289 C<awsvpc> network mode.
290  
291 If the network mode is C<host>, you cannot run multiple instantiations
292 of the same task on a single container instance when port mappings are
293 used.
294  
295 Docker for Windows uses different network modes than Docker for Linux.
296 When you register a task definition with Windows containers, you must
297 not specify a network mode. If you use the console to register a task
298 definition with Windows containers, you must choose the
299 C<E<lt>defaultE<gt>> network mode object.
300  
301 For more information, see Network settings
302 (https://docs.docker.com/engine/reference/run/#network-settings) in the
303 I<Docker run reference>.
304  
305  
306 =head2 PidMode => Str
307  
308 The process namespace to use for the containers in the task. The valid
309 values are C<host> or C<task>. If C<host> is specified, then all
310 containers within the tasks that specified the C<host> PID mode on the
311 same container instance share the same process namespace with the host
312 Amazon EC2 instance. If C<task> is specified, all containers within the
313 specified task share the same process namespace. If no value is
314 specified, the default is a private namespace. For more information,
315 see PID settings
316 (https://docs.docker.com/engine/reference/run/#pid-settings---pid) in
317 the I<Docker run reference>.
318  
319 If the C<host> PID mode is used, be aware that there is a heightened
320 risk of undesired process namespace expose. For more information, see
321 Docker security (https://docs.docker.com/engine/security/security/).
322  
323 This parameter is not supported for Windows containers or tasks run on
324 AWS Fargate.
325  
326  
327 =head2 PlacementConstraints => ArrayRef[L<Paws::ECS::TaskDefinitionPlacementConstraint>]
328  
329 An array of placement constraint objects to use for tasks.
330  
331 This parameter is not supported for tasks run on AWS Fargate.
332  
333  
334 =head2 ProxyConfiguration => L<Paws::ECS::ProxyConfiguration>
335  
336 The configuration details for the App Mesh proxy.
337  
338 Your Amazon ECS container instances require at least version 1.26.0 of
339 the container agent and at least version 1.26.0-1 of the C<ecs-init>
340 package to enable a proxy configuration. If your container instances
341 are launched from the Amazon ECS-optimized AMI version C<20190301> or
342 later, then they contain the required versions of the container agent
343 and C<ecs-init>. For more information, see Amazon ECS-optimized Linux
344 AMI
345 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html)
346 in the I<Amazon Elastic Container Service Developer Guide>.
347  
348  
349 =head2 RegisteredAt => Str
350  
351 The Unix timestamp for when the task definition was registered.
352  
353  
354 =head2 RegisteredBy => Str
355  
356 The principal that registered the task definition.
357  
358  
359 =head2 RequiresAttributes => ArrayRef[L<Paws::ECS::Attribute>]
360  
361 The container instance attributes required by your task. When an Amazon
362 EC2 instance is registered to your cluster, the Amazon ECS container
363 agent assigns some standard attributes to the instance. You can apply
364 custom attributes, specified as key-value pairs using the Amazon ECS
365 console or the PutAttributes API. These attributes are used when
366 considering task placement for tasks hosted on Amazon EC2 instances.
367 For more information, see Attributes
368 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html#attributes)
369 in the I<Amazon Elastic Container Service Developer Guide>.
370  
371 This parameter is not supported for tasks run on AWS Fargate.
372  
373  
374 =head2 RequiresCompatibilities => ArrayRef[Str|Undef]
375  
376 The task launch types the task definition was validated against. To
377 determine which task launch types the task definition is validated for,
378 see the TaskDefinition$compatibilities parameter.
379  
380  
381 =head2 Revision => Int
382  
383 The revision of the task in a particular family. The revision is a
384 version number of a task definition in a family. When you register a
385 task definition for the first time, the revision is C<1>. Each time
386 that you register a new revision of a task definition in the same
387 family, the revision value always increases by one, even if you have
388 deregistered previous revisions in this family.
389  
390  
391 =head2 Status => Str
392  
393 The status of the task definition.
394  
395  
396 =head2 TaskDefinitionArn => Str
397  
398 The full Amazon Resource Name (ARN) of the task definition.
399  
400  
401 =head2 TaskRoleArn => Str
402  
403 The short name or full Amazon Resource Name (ARN) of the AWS Identity
404 and Access Management (IAM) role that grants containers in the task
405 permission to call AWS APIs on your behalf. For more information, see
406 Amazon ECS Task Role
407 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html)
408 in the I<Amazon Elastic Container Service Developer Guide>.
409  
410 IAM roles for tasks on Windows require that the C<-EnableTaskIAMRole>
411 option is set when you launch the Amazon ECS-optimized Windows AMI.
412 Your containers must also run some configuration code in order to take
413 advantage of the feature. For more information, see Windows IAM roles
414 for tasks
415 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html)
416 in the I<Amazon Elastic Container Service Developer Guide>.
417  
418  
419 =head2 Volumes => ArrayRef[L<Paws::ECS::Volume>]
420  
421 The list of data volume definitions for the task. For more information,
422 see Using data volumes in tasks
423 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html)
424 in the I<Amazon Elastic Container Service Developer Guide>.
425  
426 The C<host> and C<sourcePath> parameters are not supported for tasks
427 run on AWS Fargate.
428  
429  
430  
431 =head1 SEE ALSO
432  
433 This class forms part of L<Paws>, describing an object used in L<Paws::ECS>
434  
435 =head1 BUGS and CONTRIBUTIONS
436  
437 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
438  
439 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
440  
441 =cut
442