File Coverage

blib/lib/Paws/ECS.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;
2 1     1   2514 use Moose;
  1         2  
  1         7  
3             sub service { 'ecs' }
4             sub version { '2014-11-13' }
5             sub target_prefix { 'AmazonEC2ContainerServiceV20141113' }
6             sub json_version { "1.1" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub CreateCluster {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::ECS::CreateCluster', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub CreateService {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::ECS::CreateService', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub DeleteAttributes {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::ECS::DeleteAttributes', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DeleteCluster {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::ECS::DeleteCluster', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub DeleteService {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::ECS::DeleteService', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub DeregisterContainerInstance {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::ECS::DeregisterContainerInstance', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub DeregisterTaskDefinition {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::ECS::DeregisterTaskDefinition', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52             sub DescribeClusters {
53             my $self = shift;
54             my $call_object = $self->new_with_coercions('Paws::ECS::DescribeClusters', @_);
55             return $self->caller->do_call($self, $call_object);
56             }
57             sub DescribeContainerInstances {
58             my $self = shift;
59             my $call_object = $self->new_with_coercions('Paws::ECS::DescribeContainerInstances', @_);
60             return $self->caller->do_call($self, $call_object);
61             }
62             sub DescribeServices {
63             my $self = shift;
64             my $call_object = $self->new_with_coercions('Paws::ECS::DescribeServices', @_);
65             return $self->caller->do_call($self, $call_object);
66             }
67             sub DescribeTaskDefinition {
68             my $self = shift;
69             my $call_object = $self->new_with_coercions('Paws::ECS::DescribeTaskDefinition', @_);
70             return $self->caller->do_call($self, $call_object);
71             }
72             sub DescribeTasks {
73             my $self = shift;
74             my $call_object = $self->new_with_coercions('Paws::ECS::DescribeTasks', @_);
75             return $self->caller->do_call($self, $call_object);
76             }
77             sub DiscoverPollEndpoint {
78             my $self = shift;
79             my $call_object = $self->new_with_coercions('Paws::ECS::DiscoverPollEndpoint', @_);
80             return $self->caller->do_call($self, $call_object);
81             }
82             sub ListAttributes {
83             my $self = shift;
84             my $call_object = $self->new_with_coercions('Paws::ECS::ListAttributes', @_);
85             return $self->caller->do_call($self, $call_object);
86             }
87             sub ListClusters {
88             my $self = shift;
89             my $call_object = $self->new_with_coercions('Paws::ECS::ListClusters', @_);
90             return $self->caller->do_call($self, $call_object);
91             }
92             sub ListContainerInstances {
93             my $self = shift;
94             my $call_object = $self->new_with_coercions('Paws::ECS::ListContainerInstances', @_);
95             return $self->caller->do_call($self, $call_object);
96             }
97             sub ListServices {
98             my $self = shift;
99             my $call_object = $self->new_with_coercions('Paws::ECS::ListServices', @_);
100             return $self->caller->do_call($self, $call_object);
101             }
102             sub ListTaskDefinitionFamilies {
103             my $self = shift;
104             my $call_object = $self->new_with_coercions('Paws::ECS::ListTaskDefinitionFamilies', @_);
105             return $self->caller->do_call($self, $call_object);
106             }
107             sub ListTaskDefinitions {
108             my $self = shift;
109             my $call_object = $self->new_with_coercions('Paws::ECS::ListTaskDefinitions', @_);
110             return $self->caller->do_call($self, $call_object);
111             }
112             sub ListTasks {
113             my $self = shift;
114             my $call_object = $self->new_with_coercions('Paws::ECS::ListTasks', @_);
115             return $self->caller->do_call($self, $call_object);
116             }
117             sub PutAttributes {
118             my $self = shift;
119             my $call_object = $self->new_with_coercions('Paws::ECS::PutAttributes', @_);
120             return $self->caller->do_call($self, $call_object);
121             }
122             sub RegisterContainerInstance {
123             my $self = shift;
124             my $call_object = $self->new_with_coercions('Paws::ECS::RegisterContainerInstance', @_);
125             return $self->caller->do_call($self, $call_object);
126             }
127             sub RegisterTaskDefinition {
128             my $self = shift;
129             my $call_object = $self->new_with_coercions('Paws::ECS::RegisterTaskDefinition', @_);
130             return $self->caller->do_call($self, $call_object);
131             }
132             sub RunTask {
133             my $self = shift;
134             my $call_object = $self->new_with_coercions('Paws::ECS::RunTask', @_);
135             return $self->caller->do_call($self, $call_object);
136             }
137             sub StartTask {
138             my $self = shift;
139             my $call_object = $self->new_with_coercions('Paws::ECS::StartTask', @_);
140             return $self->caller->do_call($self, $call_object);
141             }
142             sub StopTask {
143             my $self = shift;
144             my $call_object = $self->new_with_coercions('Paws::ECS::StopTask', @_);
145             return $self->caller->do_call($self, $call_object);
146             }
147             sub SubmitContainerStateChange {
148             my $self = shift;
149             my $call_object = $self->new_with_coercions('Paws::ECS::SubmitContainerStateChange', @_);
150             return $self->caller->do_call($self, $call_object);
151             }
152             sub SubmitTaskStateChange {
153             my $self = shift;
154             my $call_object = $self->new_with_coercions('Paws::ECS::SubmitTaskStateChange', @_);
155             return $self->caller->do_call($self, $call_object);
156             }
157             sub UpdateContainerAgent {
158             my $self = shift;
159             my $call_object = $self->new_with_coercions('Paws::ECS::UpdateContainerAgent', @_);
160             return $self->caller->do_call($self, $call_object);
161             }
162             sub UpdateContainerInstancesState {
163             my $self = shift;
164             my $call_object = $self->new_with_coercions('Paws::ECS::UpdateContainerInstancesState', @_);
165             return $self->caller->do_call($self, $call_object);
166             }
167             sub UpdateService {
168             my $self = shift;
169             my $call_object = $self->new_with_coercions('Paws::ECS::UpdateService', @_);
170             return $self->caller->do_call($self, $call_object);
171             }
172            
173             sub ListAllClusters {
174             my $self = shift;
175              
176             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
177             my $result = $self->ListClusters(@_);
178             my $next_result = $result;
179              
180             if (not defined $callback) {
181             while ($next_result->nextToken) {
182             $next_result = $self->ListClusters(@_, nextToken => $next_result->nextToken);
183             push @{ $result->clusterArns }, @{ $next_result->clusterArns };
184             }
185             return $result;
186             } else {
187             while ($result->nextToken) {
188             $callback->($_ => 'clusterArns') foreach (@{ $result->clusterArns });
189             $result = $self->ListClusters(@_, nextToken => $result->nextToken);
190             }
191             $callback->($_ => 'clusterArns') foreach (@{ $result->clusterArns });
192             }
193              
194             return undef
195             }
196             sub ListAllContainerInstances {
197             my $self = shift;
198              
199             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
200             my $result = $self->ListContainerInstances(@_);
201             my $next_result = $result;
202              
203             if (not defined $callback) {
204             while ($next_result->nextToken) {
205             $next_result = $self->ListContainerInstances(@_, nextToken => $next_result->nextToken);
206             push @{ $result->containerInstanceArns }, @{ $next_result->containerInstanceArns };
207             }
208             return $result;
209             } else {
210             while ($result->nextToken) {
211             $callback->($_ => 'containerInstanceArns') foreach (@{ $result->containerInstanceArns });
212             $result = $self->ListContainerInstances(@_, nextToken => $result->nextToken);
213             }
214             $callback->($_ => 'containerInstanceArns') foreach (@{ $result->containerInstanceArns });
215             }
216              
217             return undef
218             }
219             sub ListAllServices {
220             my $self = shift;
221              
222             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
223             my $result = $self->ListServices(@_);
224             my $next_result = $result;
225              
226             if (not defined $callback) {
227             while ($next_result->nextToken) {
228             $next_result = $self->ListServices(@_, nextToken => $next_result->nextToken);
229             push @{ $result->serviceArns }, @{ $next_result->serviceArns };
230             }
231             return $result;
232             } else {
233             while ($result->nextToken) {
234             $callback->($_ => 'serviceArns') foreach (@{ $result->serviceArns });
235             $result = $self->ListServices(@_, nextToken => $result->nextToken);
236             }
237             $callback->($_ => 'serviceArns') foreach (@{ $result->serviceArns });
238             }
239              
240             return undef
241             }
242             sub ListAllTaskDefinitionFamilies {
243             my $self = shift;
244              
245             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
246             my $result = $self->ListTaskDefinitionFamilies(@_);
247             my $next_result = $result;
248              
249             if (not defined $callback) {
250             while ($next_result->nextToken) {
251             $next_result = $self->ListTaskDefinitionFamilies(@_, nextToken => $next_result->nextToken);
252             push @{ $result->families }, @{ $next_result->families };
253             }
254             return $result;
255             } else {
256             while ($result->nextToken) {
257             $callback->($_ => 'families') foreach (@{ $result->families });
258             $result = $self->ListTaskDefinitionFamilies(@_, nextToken => $result->nextToken);
259             }
260             $callback->($_ => 'families') foreach (@{ $result->families });
261             }
262              
263             return undef
264             }
265             sub ListAllTaskDefinitions {
266             my $self = shift;
267              
268             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
269             my $result = $self->ListTaskDefinitions(@_);
270             my $next_result = $result;
271              
272             if (not defined $callback) {
273             while ($next_result->nextToken) {
274             $next_result = $self->ListTaskDefinitions(@_, nextToken => $next_result->nextToken);
275             push @{ $result->taskDefinitionArns }, @{ $next_result->taskDefinitionArns };
276             }
277             return $result;
278             } else {
279             while ($result->nextToken) {
280             $callback->($_ => 'taskDefinitionArns') foreach (@{ $result->taskDefinitionArns });
281             $result = $self->ListTaskDefinitions(@_, nextToken => $result->nextToken);
282             }
283             $callback->($_ => 'taskDefinitionArns') foreach (@{ $result->taskDefinitionArns });
284             }
285              
286             return undef
287             }
288             sub ListAllTasks {
289             my $self = shift;
290              
291             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
292             my $result = $self->ListTasks(@_);
293             my $next_result = $result;
294              
295             if (not defined $callback) {
296             while ($next_result->nextToken) {
297             $next_result = $self->ListTasks(@_, nextToken => $next_result->nextToken);
298             push @{ $result->taskArns }, @{ $next_result->taskArns };
299             }
300             return $result;
301             } else {
302             while ($result->nextToken) {
303             $callback->($_ => 'taskArns') foreach (@{ $result->taskArns });
304             $result = $self->ListTasks(@_, nextToken => $result->nextToken);
305             }
306             $callback->($_ => 'taskArns') foreach (@{ $result->taskArns });
307             }
308              
309             return undef
310             }
311              
312              
313             sub operations { qw/CreateCluster CreateService DeleteAttributes DeleteCluster DeleteService DeregisterContainerInstance DeregisterTaskDefinition DescribeClusters DescribeContainerInstances DescribeServices DescribeTaskDefinition DescribeTasks DiscoverPollEndpoint ListAttributes ListClusters ListContainerInstances ListServices ListTaskDefinitionFamilies ListTaskDefinitions ListTasks PutAttributes RegisterContainerInstance RegisterTaskDefinition RunTask StartTask StopTask SubmitContainerStateChange SubmitTaskStateChange UpdateContainerAgent UpdateContainerInstancesState UpdateService / }
314              
315             1;
316              
317             ### main pod documentation begin ###
318              
319             =head1 NAME
320              
321             Paws::ECS - Perl Interface to AWS Amazon EC2 Container Service
322              
323             =head1 SYNOPSIS
324              
325             use Paws;
326              
327             my $obj = Paws->service('ECS');
328             my $res = $obj->Method(
329             Arg1 => $val1,
330             Arg2 => [ 'V1', 'V2' ],
331             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
332             # of the arguments type
333             Arg3 => { Att1 => 'Val1' },
334             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
335             # the constructor of the arguments type
336             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
337             );
338              
339             =head1 DESCRIPTION
340              
341             Amazon EC2 Container Service (Amazon ECS) is a highly scalable, fast,
342             container management service that makes it easy to run, stop, and
343             manage Docker containers on a cluster of EC2 instances. Amazon ECS lets
344             you launch and stop container-enabled applications with simple API
345             calls, allows you to get the state of your cluster from a centralized
346             service, and gives you access to many familiar Amazon EC2 features like
347             security groups, Amazon EBS volumes, and IAM roles.
348              
349             You can use Amazon ECS to schedule the placement of containers across
350             your cluster based on your resource needs, isolation policies, and
351             availability requirements. Amazon EC2 Container Service eliminates the
352             need for you to operate your own cluster management and configuration
353             management systems or worry about scaling your management
354             infrastructure.
355              
356             =head1 METHODS
357              
358             =head2 CreateCluster([ClusterName => Str])
359              
360             Each argument is described in detail in: L<Paws::ECS::CreateCluster>
361              
362             Returns: a L<Paws::ECS::CreateClusterResponse> instance
363              
364             Creates a new Amazon ECS cluster. By default, your account receives a
365             C<default> cluster when you launch your first container instance.
366             However, you can create your own cluster with a unique name with the
367             C<CreateCluster> action.
368              
369              
370             =head2 CreateService(DesiredCount => Int, ServiceName => Str, TaskDefinition => Str, [ClientToken => Str, Cluster => Str, DeploymentConfiguration => L<Paws::ECS::DeploymentConfiguration>, LoadBalancers => ArrayRef[L<Paws::ECS::LoadBalancer>], PlacementConstraints => ArrayRef[L<Paws::ECS::PlacementConstraint>], PlacementStrategy => ArrayRef[L<Paws::ECS::PlacementStrategy>], Role => Str])
371              
372             Each argument is described in detail in: L<Paws::ECS::CreateService>
373              
374             Returns: a L<Paws::ECS::CreateServiceResponse> instance
375              
376             Runs and maintains a desired number of tasks from a specified task
377             definition. If the number of tasks running in a service drops below
378             C<desiredCount>, Amazon ECS spawns another copy of the task in the
379             specified cluster. To update an existing service, see UpdateService.
380              
381             In addition to maintaining the desired count of tasks in your service,
382             you can optionally run your service behind a load balancer. The load
383             balancer distributes traffic across the tasks that are associated with
384             the service. For more information, see Service Load Balancing in the
385             I<Amazon EC2 Container Service Developer Guide>.
386              
387             You can optionally specify a deployment configuration for your service.
388             During a deployment (which is triggered by changing the task definition
389             or the desired count of a service with an UpdateService operation), the
390             service scheduler uses the C<minimumHealthyPercent> and
391             C<maximumPercent> parameters to determine the deployment strategy.
392              
393             The C<minimumHealthyPercent> represents a lower limit on the number of
394             your service's tasks that must remain in the C<RUNNING> state during a
395             deployment, as a percentage of the C<desiredCount> (rounded up to the
396             nearest integer). This parameter enables you to deploy without using
397             additional cluster capacity. For example, if your service has a
398             C<desiredCount> of four tasks and a C<minimumHealthyPercent> of 50%,
399             the scheduler can stop two existing tasks to free up cluster capacity
400             before starting two new tasks. Tasks for services that I<do not> use a
401             load balancer are considered healthy if they are in the C<RUNNING>
402             state. Tasks for services that I<do> use a load balancer are considered
403             healthy if they are in the C<RUNNING> state and the container instance
404             they are hosted on is reported as healthy by the load balancer. The
405             default value for C<minimumHealthyPercent> is 50% in the console and
406             100% for the AWS CLI, the AWS SDKs, and the APIs.
407              
408             The C<maximumPercent> parameter represents an upper limit on the number
409             of your service's tasks that are allowed in the C<RUNNING> or
410             C<PENDING> state during a deployment, as a percentage of the
411             C<desiredCount> (rounded down to the nearest integer). This parameter
412             enables you to define the deployment batch size. For example, if your
413             service has a C<desiredCount> of four tasks and a C<maximumPercent>
414             value of 200%, the scheduler can start four new tasks before stopping
415             the four older tasks (provided that the cluster resources required to
416             do this are available). The default value for C<maximumPercent> is
417             200%.
418              
419             When the service scheduler launches new tasks, it determines task
420             placement in your cluster using the following logic:
421              
422             =over
423              
424             =item *
425              
426             Determine which of the container instances in your cluster can support
427             your service's task definition (for example, they have the required
428             CPU, memory, ports, and container instance attributes).
429              
430             =item *
431              
432             By default, the service scheduler attempts to balance tasks across
433             Availability Zones in this manner (although you can choose a different
434             placement strategy) with the C<placementStrategy> parameter):
435              
436             =over
437              
438             =item *
439              
440             Sort the valid container instances by the fewest number of running
441             tasks for this service in the same Availability Zone as the instance.
442             For example, if zone A has one running service task and zones B and C
443             each have zero, valid container instances in either zone B or C are
444             considered optimal for placement.
445              
446             =item *
447              
448             Place the new service task on a valid container instance in an optimal
449             Availability Zone (based on the previous steps), favoring container
450             instances with the fewest number of running tasks for this service.
451              
452             =back
453              
454             =back
455              
456              
457              
458             =head2 DeleteAttributes(Attributes => ArrayRef[L<Paws::ECS::Attribute>], [Cluster => Str])
459              
460             Each argument is described in detail in: L<Paws::ECS::DeleteAttributes>
461              
462             Returns: a L<Paws::ECS::DeleteAttributesResponse> instance
463              
464             Deletes one or more custom attributes from an Amazon ECS resource.
465              
466              
467             =head2 DeleteCluster(Cluster => Str)
468              
469             Each argument is described in detail in: L<Paws::ECS::DeleteCluster>
470              
471             Returns: a L<Paws::ECS::DeleteClusterResponse> instance
472              
473             Deletes the specified cluster. You must deregister all container
474             instances from this cluster before you may delete it. You can list the
475             container instances in a cluster with ListContainerInstances and
476             deregister them with DeregisterContainerInstance.
477              
478              
479             =head2 DeleteService(Service => Str, [Cluster => Str])
480              
481             Each argument is described in detail in: L<Paws::ECS::DeleteService>
482              
483             Returns: a L<Paws::ECS::DeleteServiceResponse> instance
484              
485             Deletes a specified service within a cluster. You can delete a service
486             if you have no running tasks in it and the desired task count is zero.
487             If the service is actively maintaining tasks, you cannot delete it, and
488             you must update the service to a desired task count of zero. For more
489             information, see UpdateService.
490              
491             When you delete a service, if there are still running tasks that
492             require cleanup, the service status moves from C<ACTIVE> to
493             C<DRAINING>, and the service is no longer visible in the console or in
494             ListServices API operations. After the tasks have stopped, then the
495             service status moves from C<DRAINING> to C<INACTIVE>. Services in the
496             C<DRAINING> or C<INACTIVE> status can still be viewed with
497             DescribeServices API operations; however, in the future, C<INACTIVE>
498             services may be cleaned up and purged from Amazon ECS record keeping,
499             and DescribeServices API operations on those services will return a
500             C<ServiceNotFoundException> error.
501              
502              
503             =head2 DeregisterContainerInstance(ContainerInstance => Str, [Cluster => Str, Force => Bool])
504              
505             Each argument is described in detail in: L<Paws::ECS::DeregisterContainerInstance>
506              
507             Returns: a L<Paws::ECS::DeregisterContainerInstanceResponse> instance
508              
509             Deregisters an Amazon ECS container instance from the specified
510             cluster. This instance is no longer available to run tasks.
511              
512             If you intend to use the container instance for some other purpose
513             after deregistration, you should stop all of the tasks running on the
514             container instance before deregistration to avoid any orphaned tasks
515             from consuming resources.
516              
517             Deregistering a container instance removes the instance from a cluster,
518             but it does not terminate the EC2 instance; if you are finished using
519             the instance, be sure to terminate it in the Amazon EC2 console to stop
520             billing.
521              
522             If you terminate a running container instance, Amazon ECS automatically
523             deregisters the instance from your cluster (stopped container instances
524             or instances with disconnected agents are not automatically
525             deregistered when terminated).
526              
527              
528             =head2 DeregisterTaskDefinition(TaskDefinition => Str)
529              
530             Each argument is described in detail in: L<Paws::ECS::DeregisterTaskDefinition>
531              
532             Returns: a L<Paws::ECS::DeregisterTaskDefinitionResponse> instance
533              
534             Deregisters the specified task definition by family and revision. Upon
535             deregistration, the task definition is marked as C<INACTIVE>. Existing
536             tasks and services that reference an C<INACTIVE> task definition
537             continue to run without disruption. Existing services that reference an
538             C<INACTIVE> task definition can still scale up or down by modifying the
539             service's desired count.
540              
541             You cannot use an C<INACTIVE> task definition to run new tasks or
542             create new services, and you cannot update an existing service to
543             reference an C<INACTIVE> task definition (although there may be up to a
544             10 minute window following deregistration where these restrictions have
545             not yet taken effect).
546              
547             At this time, C<INACTIVE> task definitions remain discoverable in your
548             account indefinitely; however, this behavior is subject to change in
549             the future, so you should not rely on C<INACTIVE> task definitions
550             persisting beyond the life cycle of any associated tasks and services.
551              
552              
553             =head2 DescribeClusters([Clusters => ArrayRef[Str|Undef]])
554              
555             Each argument is described in detail in: L<Paws::ECS::DescribeClusters>
556              
557             Returns: a L<Paws::ECS::DescribeClustersResponse> instance
558              
559             Describes one or more of your clusters.
560              
561              
562             =head2 DescribeContainerInstances(ContainerInstances => ArrayRef[Str|Undef], [Cluster => Str])
563              
564             Each argument is described in detail in: L<Paws::ECS::DescribeContainerInstances>
565              
566             Returns: a L<Paws::ECS::DescribeContainerInstancesResponse> instance
567              
568             Describes Amazon EC2 Container Service container instances. Returns
569             metadata about registered and remaining resources on each container
570             instance requested.
571              
572              
573             =head2 DescribeServices(Services => ArrayRef[Str|Undef], [Cluster => Str])
574              
575             Each argument is described in detail in: L<Paws::ECS::DescribeServices>
576              
577             Returns: a L<Paws::ECS::DescribeServicesResponse> instance
578              
579             Describes the specified services running in your cluster.
580              
581              
582             =head2 DescribeTaskDefinition(TaskDefinition => Str)
583              
584             Each argument is described in detail in: L<Paws::ECS::DescribeTaskDefinition>
585              
586             Returns: a L<Paws::ECS::DescribeTaskDefinitionResponse> instance
587              
588             Describes a task definition. You can specify a C<family> and
589             C<revision> to find information about a specific task definition, or
590             you can simply specify the family to find the latest C<ACTIVE> revision
591             in that family.
592              
593             You can only describe C<INACTIVE> task definitions while an active task
594             or service references them.
595              
596              
597             =head2 DescribeTasks(Tasks => ArrayRef[Str|Undef], [Cluster => Str])
598              
599             Each argument is described in detail in: L<Paws::ECS::DescribeTasks>
600              
601             Returns: a L<Paws::ECS::DescribeTasksResponse> instance
602              
603             Describes a specified task or tasks.
604              
605              
606             =head2 DiscoverPollEndpoint([Cluster => Str, ContainerInstance => Str])
607              
608             Each argument is described in detail in: L<Paws::ECS::DiscoverPollEndpoint>
609              
610             Returns: a L<Paws::ECS::DiscoverPollEndpointResponse> instance
611              
612             This action is only used by the Amazon EC2 Container Service agent, and
613             it is not intended for use outside of the agent.
614              
615             Returns an endpoint for the Amazon EC2 Container Service agent to poll
616             for updates.
617              
618              
619             =head2 ListAttributes(TargetType => Str, [AttributeName => Str, AttributeValue => Str, Cluster => Str, MaxResults => Int, NextToken => Str])
620              
621             Each argument is described in detail in: L<Paws::ECS::ListAttributes>
622              
623             Returns: a L<Paws::ECS::ListAttributesResponse> instance
624              
625             Lists the attributes for Amazon ECS resources within a specified target
626             type and cluster. When you specify a target type and cluster,
627             C<ListAttributes> returns a list of attribute objects, one for each
628             attribute on each resource. You can filter the list of results to a
629             single attribute name to only return results that have that name. You
630             can also filter the results by attribute name and value, for example,
631             to see which container instances in a cluster are running a Linux AMI
632             (C<ecs.os-type=linux>).
633              
634              
635             =head2 ListClusters([MaxResults => Int, NextToken => Str])
636              
637             Each argument is described in detail in: L<Paws::ECS::ListClusters>
638              
639             Returns: a L<Paws::ECS::ListClustersResponse> instance
640              
641             Returns a list of existing clusters.
642              
643              
644             =head2 ListContainerInstances([Cluster => Str, Filter => Str, MaxResults => Int, NextToken => Str, Status => Str])
645              
646             Each argument is described in detail in: L<Paws::ECS::ListContainerInstances>
647              
648             Returns: a L<Paws::ECS::ListContainerInstancesResponse> instance
649              
650             Returns a list of container instances in a specified cluster. You can
651             filter the results of a C<ListContainerInstances> operation with
652             cluster query language statements inside the C<filter> parameter. For
653             more information, see Cluster Query Language in the I<Amazon EC2
654             Container Service Developer Guide>.
655              
656              
657             =head2 ListServices([Cluster => Str, MaxResults => Int, NextToken => Str])
658              
659             Each argument is described in detail in: L<Paws::ECS::ListServices>
660              
661             Returns: a L<Paws::ECS::ListServicesResponse> instance
662              
663             Lists the services that are running in a specified cluster.
664              
665              
666             =head2 ListTaskDefinitionFamilies([FamilyPrefix => Str, MaxResults => Int, NextToken => Str, Status => Str])
667              
668             Each argument is described in detail in: L<Paws::ECS::ListTaskDefinitionFamilies>
669              
670             Returns: a L<Paws::ECS::ListTaskDefinitionFamiliesResponse> instance
671              
672             Returns a list of task definition families that are registered to your
673             account (which may include task definition families that no longer have
674             any C<ACTIVE> task definition revisions).
675              
676             You can filter out task definition families that do not contain any
677             C<ACTIVE> task definition revisions by setting the C<status> parameter
678             to C<ACTIVE>. You can also filter the results with the C<familyPrefix>
679             parameter.
680              
681              
682             =head2 ListTaskDefinitions([FamilyPrefix => Str, MaxResults => Int, NextToken => Str, Sort => Str, Status => Str])
683              
684             Each argument is described in detail in: L<Paws::ECS::ListTaskDefinitions>
685              
686             Returns: a L<Paws::ECS::ListTaskDefinitionsResponse> instance
687              
688             Returns a list of task definitions that are registered to your account.
689             You can filter the results by family name with the C<familyPrefix>
690             parameter or by status with the C<status> parameter.
691              
692              
693             =head2 ListTasks([Cluster => Str, ContainerInstance => Str, DesiredStatus => Str, Family => Str, MaxResults => Int, NextToken => Str, ServiceName => Str, StartedBy => Str])
694              
695             Each argument is described in detail in: L<Paws::ECS::ListTasks>
696              
697             Returns: a L<Paws::ECS::ListTasksResponse> instance
698              
699             Returns a list of tasks for a specified cluster. You can filter the
700             results by family name, by a particular container instance, or by the
701             desired status of the task with the C<family>, C<containerInstance>,
702             and C<desiredStatus> parameters.
703              
704             Recently-stopped tasks might appear in the returned results. Currently,
705             stopped tasks appear in the returned results for at least one hour.
706              
707              
708             =head2 PutAttributes(Attributes => ArrayRef[L<Paws::ECS::Attribute>], [Cluster => Str])
709              
710             Each argument is described in detail in: L<Paws::ECS::PutAttributes>
711              
712             Returns: a L<Paws::ECS::PutAttributesResponse> instance
713              
714             Create or update an attribute on an Amazon ECS resource. If the
715             attribute does not exist, it is created. If the attribute exists, its
716             value is replaced with the specified value. To delete an attribute, use
717             DeleteAttributes. For more information, see Attributes in the I<Amazon
718             EC2 Container Service Developer Guide>.
719              
720              
721             =head2 RegisterContainerInstance([Attributes => ArrayRef[L<Paws::ECS::Attribute>], Cluster => Str, ContainerInstanceArn => Str, InstanceIdentityDocument => Str, InstanceIdentityDocumentSignature => Str, TotalResources => ArrayRef[L<Paws::ECS::Resource>], VersionInfo => L<Paws::ECS::VersionInfo>])
722              
723             Each argument is described in detail in: L<Paws::ECS::RegisterContainerInstance>
724              
725             Returns: a L<Paws::ECS::RegisterContainerInstanceResponse> instance
726              
727             This action is only used by the Amazon EC2 Container Service agent, and
728             it is not intended for use outside of the agent.
729              
730             Registers an EC2 instance into the specified cluster. This instance
731             becomes available to place containers on.
732              
733              
734             =head2 RegisterTaskDefinition(ContainerDefinitions => ArrayRef[L<Paws::ECS::ContainerDefinition>], Family => Str, [NetworkMode => Str, PlacementConstraints => ArrayRef[L<Paws::ECS::TaskDefinitionPlacementConstraint>], TaskRoleArn => Str, Volumes => ArrayRef[L<Paws::ECS::Volume>]])
735              
736             Each argument is described in detail in: L<Paws::ECS::RegisterTaskDefinition>
737              
738             Returns: a L<Paws::ECS::RegisterTaskDefinitionResponse> instance
739              
740             Registers a new task definition from the supplied C<family> and
741             C<containerDefinitions>. Optionally, you can add data volumes to your
742             containers with the C<volumes> parameter. For more information about
743             task definition parameters and defaults, see Amazon ECS Task
744             Definitions in the I<Amazon EC2 Container Service Developer Guide>.
745              
746             You can specify an IAM role for your task with the C<taskRoleArn>
747             parameter. When you specify an IAM role for a task, its containers can
748             then use the latest versions of the AWS CLI or SDKs to make API
749             requests to the AWS services that are specified in the IAM policy
750             associated with the role. For more information, see IAM Roles for Tasks
751             in the I<Amazon EC2 Container Service Developer Guide>.
752              
753             You can specify a Docker networking mode for the containers in your
754             task definition with the C<networkMode> parameter. The available
755             network modes correspond to those described in Network settings in the
756             Docker run reference.
757              
758              
759             =head2 RunTask(TaskDefinition => Str, [Cluster => Str, Count => Int, Group => Str, Overrides => L<Paws::ECS::TaskOverride>, PlacementConstraints => ArrayRef[L<Paws::ECS::PlacementConstraint>], PlacementStrategy => ArrayRef[L<Paws::ECS::PlacementStrategy>], StartedBy => Str])
760              
761             Each argument is described in detail in: L<Paws::ECS::RunTask>
762              
763             Returns: a L<Paws::ECS::RunTaskResponse> instance
764              
765             Starts a new task using the specified task definition.
766              
767             You can allow Amazon ECS to place tasks for you, or you can customize
768             how Amazon ECS places tasks using placement constraints and placement
769             strategies. For more information, see Scheduling Tasks in the I<Amazon
770             EC2 Container Service Developer Guide>.
771              
772             Alternatively, you can use StartTask to use your own scheduler or place
773             tasks manually on specific container instances.
774              
775              
776             =head2 StartTask(ContainerInstances => ArrayRef[Str|Undef], TaskDefinition => Str, [Cluster => Str, Group => Str, Overrides => L<Paws::ECS::TaskOverride>, StartedBy => Str])
777              
778             Each argument is described in detail in: L<Paws::ECS::StartTask>
779              
780             Returns: a L<Paws::ECS::StartTaskResponse> instance
781              
782             Starts a new task from the specified task definition on the specified
783             container instance or instances.
784              
785             Alternatively, you can use RunTask to place tasks for you. For more
786             information, see Scheduling Tasks in the I<Amazon EC2 Container Service
787             Developer Guide>.
788              
789              
790             =head2 StopTask(Task => Str, [Cluster => Str, Reason => Str])
791              
792             Each argument is described in detail in: L<Paws::ECS::StopTask>
793              
794             Returns: a L<Paws::ECS::StopTaskResponse> instance
795              
796             Stops a running task.
797              
798             When StopTask is called on a task, the equivalent of C<docker stop> is
799             issued to the containers running in the task. This results in a
800             C<SIGTERM> and a default 30-second timeout, after which C<SIGKILL> is
801             sent and the containers are forcibly stopped. If the container handles
802             the C<SIGTERM> gracefully and exits within 30 seconds from receiving
803             it, no C<SIGKILL> is sent.
804              
805             The default 30-second timeout can be configured on the Amazon ECS
806             container agent with the C<ECS_CONTAINER_STOP_TIMEOUT> variable. For
807             more information, see Amazon ECS Container Agent Configuration in the
808             I<Amazon EC2 Container Service Developer Guide>.
809              
810              
811             =head2 SubmitContainerStateChange([Cluster => Str, ContainerName => Str, ExitCode => Int, NetworkBindings => ArrayRef[L<Paws::ECS::NetworkBinding>], Reason => Str, Status => Str, Task => Str])
812              
813             Each argument is described in detail in: L<Paws::ECS::SubmitContainerStateChange>
814              
815             Returns: a L<Paws::ECS::SubmitContainerStateChangeResponse> instance
816              
817             This action is only used by the Amazon EC2 Container Service agent, and
818             it is not intended for use outside of the agent.
819              
820             Sent to acknowledge that a container changed states.
821              
822              
823             =head2 SubmitTaskStateChange([Cluster => Str, Reason => Str, Status => Str, Task => Str])
824              
825             Each argument is described in detail in: L<Paws::ECS::SubmitTaskStateChange>
826              
827             Returns: a L<Paws::ECS::SubmitTaskStateChangeResponse> instance
828              
829             This action is only used by the Amazon EC2 Container Service agent, and
830             it is not intended for use outside of the agent.
831              
832             Sent to acknowledge that a task changed states.
833              
834              
835             =head2 UpdateContainerAgent(ContainerInstance => Str, [Cluster => Str])
836              
837             Each argument is described in detail in: L<Paws::ECS::UpdateContainerAgent>
838              
839             Returns: a L<Paws::ECS::UpdateContainerAgentResponse> instance
840              
841             Updates the Amazon ECS container agent on a specified container
842             instance. Updating the Amazon ECS container agent does not interrupt
843             running tasks or services on the container instance. The process for
844             updating the agent differs depending on whether your container instance
845             was launched with the Amazon ECS-optimized AMI or another operating
846             system.
847              
848             C<UpdateContainerAgent> requires the Amazon ECS-optimized AMI or Amazon
849             Linux with the C<ecs-init> service installed and running. For help
850             updating the Amazon ECS container agent on other operating systems, see
851             Manually Updating the Amazon ECS Container Agent in the I<Amazon EC2
852             Container Service Developer Guide>.
853              
854              
855             =head2 UpdateContainerInstancesState(ContainerInstances => ArrayRef[Str|Undef], Status => Str, [Cluster => Str])
856              
857             Each argument is described in detail in: L<Paws::ECS::UpdateContainerInstancesState>
858              
859             Returns: a L<Paws::ECS::UpdateContainerInstancesStateResponse> instance
860              
861             Modifies the status of an Amazon ECS container instance.
862              
863             You can change the status of a container instance to C<DRAINING> to
864             manually remove an instance from a cluster, for example to perform
865             system updates, update the Docker daemon, or scale down the cluster
866             size.
867              
868             When you set a container instance to C<DRAINING>, Amazon ECS prevents
869             new tasks from being scheduled for placement on the container instance
870             and replacement service tasks are started on other container instances
871             in the cluster if the resources are available. Service tasks on the
872             container instance that are in the C<PENDING> state are stopped
873             immediately.
874              
875             Service tasks on the container instance that are in the C<RUNNING>
876             state are stopped and replaced according the service's deployment
877             configuration parameters, C<minimumHealthyPercent> and
878             C<maximumPercent>. Note that you can change the deployment
879             configuration of your service using UpdateService.
880              
881             =over
882              
883             =item *
884              
885             If C<minimumHealthyPercent> is below 100%, the scheduler can ignore
886             C<desiredCount> temporarily during task replacement. For example,
887             C<desiredCount> is four tasks, a minimum of 50% allows the scheduler to
888             stop two existing tasks before starting two new tasks. If the minimum
889             is 100%, the service scheduler can't remove existing tasks until the
890             replacement tasks are considered healthy. Tasks for services that do
891             not use a load balancer are considered healthy if they are in the
892             C<RUNNING> state. Tasks for services that use a load balancer are
893             considered healthy if they are in the C<RUNNING> state and the
894             container instance they are hosted on is reported as healthy by the
895             load balancer.
896              
897             =item *
898              
899             The C<maximumPercent> parameter represents an upper limit on the number
900             of running tasks during task replacement, which enables you to define
901             the replacement batch size. For example, if C<desiredCount> of four
902             tasks, a maximum of 200% starts four new tasks before stopping the four
903             tasks to be drained (provided that the cluster resources required to do
904             this are available). If the maximum is 100%, then replacement tasks
905             can't start until the draining tasks have stopped.
906              
907             =back
908              
909             Any C<PENDING> or C<RUNNING> tasks that do not belong to a service are
910             not affected; you must wait for them to finish or stop them manually.
911              
912             A container instance has completed draining when it has no more
913             C<RUNNING> tasks. You can verify this using ListTasks.
914              
915             When you set a container instance to C<ACTIVE>, the Amazon ECS
916             scheduler can begin scheduling tasks on the instance again.
917              
918              
919             =head2 UpdateService(Service => Str, [Cluster => Str, DeploymentConfiguration => L<Paws::ECS::DeploymentConfiguration>, DesiredCount => Int, TaskDefinition => Str])
920              
921             Each argument is described in detail in: L<Paws::ECS::UpdateService>
922              
923             Returns: a L<Paws::ECS::UpdateServiceResponse> instance
924              
925             Modifies the desired count, deployment configuration, or task
926             definition used in a service.
927              
928             You can add to or subtract from the number of instantiations of a task
929             definition in a service by specifying the cluster that the service is
930             running in and a new C<desiredCount> parameter.
931              
932             You can use UpdateService to modify your task definition and deploy a
933             new version of your service.
934              
935             You can also update the deployment configuration of a service. When a
936             deployment is triggered by updating the task definition of a service,
937             the service scheduler uses the deployment configuration parameters,
938             C<minimumHealthyPercent> and C<maximumPercent>, to determine the
939             deployment strategy.
940              
941             =over
942              
943             =item *
944              
945             If C<minimumHealthyPercent> is below 100%, the scheduler can ignore
946             C<desiredCount> temporarily during a deployment. For example, if
947             C<desiredCount> is four tasks, a minimum of 50% allows the scheduler to
948             stop two existing tasks before starting two new tasks. Tasks for
949             services that do not use a load balancer are considered healthy if they
950             are in the C<RUNNING> state. Tasks for services that use a load
951             balancer are considered healthy if they are in the C<RUNNING> state and
952             the container instance they are hosted on is reported as healthy by the
953             load balancer.
954              
955             =item *
956              
957             The C<maximumPercent> parameter represents an upper limit on the number
958             of running tasks during a deployment, which enables you to define the
959             deployment batch size. For example, if C<desiredCount> is four tasks, a
960             maximum of 200% starts four new tasks before stopping the four older
961             tasks (provided that the cluster resources required to do this are
962             available).
963              
964             =back
965              
966             When UpdateService stops a task during a deployment, the equivalent of
967             C<docker stop> is issued to the containers running in the task. This
968             results in a C<SIGTERM> and a 30-second timeout, after which C<SIGKILL>
969             is sent and the containers are forcibly stopped. If the container
970             handles the C<SIGTERM> gracefully and exits within 30 seconds from
971             receiving it, no C<SIGKILL> is sent.
972              
973             When the service scheduler launches new tasks, it determines task
974             placement in your cluster with the following logic:
975              
976             =over
977              
978             =item *
979              
980             Determine which of the container instances in your cluster can support
981             your service's task definition (for example, they have the required
982             CPU, memory, ports, and container instance attributes).
983              
984             =item *
985              
986             By default, the service scheduler attempts to balance tasks across
987             Availability Zones in this manner (although you can choose a different
988             placement strategy):
989              
990             =over
991              
992             =item *
993              
994             Sort the valid container instances by the fewest number of running
995             tasks for this service in the same Availability Zone as the instance.
996             For example, if zone A has one running service task and zones B and C
997             each have zero, valid container instances in either zone B or C are
998             considered optimal for placement.
999              
1000             =item *
1001              
1002             Place the new service task on a valid container instance in an optimal
1003             Availability Zone (based on the previous steps), favoring container
1004             instances with the fewest number of running tasks for this service.
1005              
1006             =back
1007              
1008             =back
1009              
1010             When the service scheduler stops running tasks, it attempts to maintain
1011             balance across the Availability Zones in your cluster using the
1012             following logic:
1013              
1014             =over
1015              
1016             =item *
1017              
1018             Sort the container instances by the largest number of running tasks for
1019             this service in the same Availability Zone as the instance. For
1020             example, if zone A has one running service task and zones B and C each
1021             have two, container instances in either zone B or C are considered
1022             optimal for termination.
1023              
1024             =item *
1025              
1026             Stop the task on a container instance in an optimal Availability Zone
1027             (based on the previous steps), favoring container instances with the
1028             largest number of running tasks for this service.
1029              
1030             =back
1031              
1032              
1033              
1034              
1035              
1036             =head1 PAGINATORS
1037              
1038             Paginator methods are helpers that repetively call methods that return partial results
1039              
1040             =head2 ListAllClusters(sub { },[MaxResults => Int, NextToken => Str])
1041              
1042             =head2 ListAllClusters([MaxResults => Int, NextToken => Str])
1043              
1044              
1045             If passed a sub as first parameter, it will call the sub for each element found in :
1046              
1047             - clusterArns, passing the object as the first parameter, and the string 'clusterArns' as the second parameter
1048              
1049             If not, it will return a a L<Paws::ECS::ListClustersResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
1050              
1051              
1052             =head2 ListAllContainerInstances(sub { },[Cluster => Str, Filter => Str, MaxResults => Int, NextToken => Str, Status => Str])
1053              
1054             =head2 ListAllContainerInstances([Cluster => Str, Filter => Str, MaxResults => Int, NextToken => Str, Status => Str])
1055              
1056              
1057             If passed a sub as first parameter, it will call the sub for each element found in :
1058              
1059             - containerInstanceArns, passing the object as the first parameter, and the string 'containerInstanceArns' as the second parameter
1060              
1061             If not, it will return a a L<Paws::ECS::ListContainerInstancesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
1062              
1063              
1064             =head2 ListAllServices(sub { },[Cluster => Str, MaxResults => Int, NextToken => Str])
1065              
1066             =head2 ListAllServices([Cluster => Str, MaxResults => Int, NextToken => Str])
1067              
1068              
1069             If passed a sub as first parameter, it will call the sub for each element found in :
1070              
1071             - serviceArns, passing the object as the first parameter, and the string 'serviceArns' as the second parameter
1072              
1073             If not, it will return a a L<Paws::ECS::ListServicesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
1074              
1075              
1076             =head2 ListAllTaskDefinitionFamilies(sub { },[FamilyPrefix => Str, MaxResults => Int, NextToken => Str, Status => Str])
1077              
1078             =head2 ListAllTaskDefinitionFamilies([FamilyPrefix => Str, MaxResults => Int, NextToken => Str, Status => Str])
1079              
1080              
1081             If passed a sub as first parameter, it will call the sub for each element found in :
1082              
1083             - families, passing the object as the first parameter, and the string 'families' as the second parameter
1084              
1085             If not, it will return a a L<Paws::ECS::ListTaskDefinitionFamiliesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
1086              
1087              
1088             =head2 ListAllTaskDefinitions(sub { },[FamilyPrefix => Str, MaxResults => Int, NextToken => Str, Sort => Str, Status => Str])
1089              
1090             =head2 ListAllTaskDefinitions([FamilyPrefix => Str, MaxResults => Int, NextToken => Str, Sort => Str, Status => Str])
1091              
1092              
1093             If passed a sub as first parameter, it will call the sub for each element found in :
1094              
1095             - taskDefinitionArns, passing the object as the first parameter, and the string 'taskDefinitionArns' as the second parameter
1096              
1097             If not, it will return a a L<Paws::ECS::ListTaskDefinitionsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
1098              
1099              
1100             =head2 ListAllTasks(sub { },[Cluster => Str, ContainerInstance => Str, DesiredStatus => Str, Family => Str, MaxResults => Int, NextToken => Str, ServiceName => Str, StartedBy => Str])
1101              
1102             =head2 ListAllTasks([Cluster => Str, ContainerInstance => Str, DesiredStatus => Str, Family => Str, MaxResults => Int, NextToken => Str, ServiceName => Str, StartedBy => Str])
1103              
1104              
1105             If passed a sub as first parameter, it will call the sub for each element found in :
1106              
1107             - taskArns, passing the object as the first parameter, and the string 'taskArns' as the second parameter
1108              
1109             If not, it will return a a L<Paws::ECS::ListTasksResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
1110              
1111              
1112              
1113              
1114              
1115             =head1 SEE ALSO
1116              
1117             This service class forms part of L<Paws>
1118              
1119             =head1 BUGS and CONTRIBUTIONS
1120              
1121             The source code is located here: https://github.com/pplu/aws-sdk-perl
1122              
1123             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
1124              
1125             =cut
1126