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

filter: Statementstmt 0.0% 0 / 43 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 45 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::ECS::RunTask;
3 use Moose;
4 has CapacityProviderStrategy => (is => 'ro', isa => 'ArrayRef[Paws::ECS::CapacityProviderStrategyItem]', traits => ['NameInRequest'], request_name => 'capacityProviderStrategy' );
5 has Cluster => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'cluster' );
6 has Count => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'count' );
7 has EnableECSManagedTags => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'enableECSManagedTags' );
8 has EnableExecuteCommand => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'enableExecuteCommand' );
9 has Group => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'group' );
10 has LaunchType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'launchType' );
11 has NetworkConfiguration => (is => 'ro', isa => 'Paws::ECS::NetworkConfiguration', traits => ['NameInRequest'], request_name => 'networkConfiguration' );
12 has Overrides => (is => 'ro', isa => 'Paws::ECS::TaskOverride', traits => ['NameInRequest'], request_name => 'overrides' );
13 has PlacementConstraints => (is => 'ro', isa => 'ArrayRef[Paws::ECS::PlacementConstraint]', traits => ['NameInRequest'], request_name => 'placementConstraints' );
14 has PlacementStrategy => (is => 'ro', isa => 'ArrayRef[Paws::ECS::PlacementStrategy]', traits => ['NameInRequest'], request_name => 'placementStrategy' );
15 has PlatformVersion => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'platformVersion' );
16 has PropagateTags => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'propagateTags' );
17 has ReferenceId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'referenceId' );
18 has StartedBy => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'startedBy' );
19 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::ECS::Tag]', traits => ['NameInRequest'], request_name => 'tags' );
20 has TaskDefinition => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'taskDefinition' , required => 1);
21  
22 use MooseX::ClassAttribute;
23  
24 class_has _api_call => (isa => 'Str', is => 'ro', default => 'RunTask');
25 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ECS::RunTaskResponse');
26 class_has _result_key => (isa => 'Str', is => 'ro');
27 1;
28  
29 ### main pod documentation begin ###
30  
31 =head1 NAME
32  
33 Paws::ECS::RunTask - Arguments for method RunTask on L<Paws::ECS>
34  
35 =head1 DESCRIPTION
36  
37 This class represents the parameters used for calling the method RunTask on the
38 L<Amazon EC2 Container Service|Paws::ECS> service. Use the attributes of this class
39 as arguments to method RunTask.
40  
41 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to RunTask.
42  
43 =head1 SYNOPSIS
44  
45 my $ecs = Paws->service('ECS');
46 # To run a task on your default cluster
47 # This example runs the specified task definition on your default cluster.
48 my $RunTaskResponse = $ecs->RunTask(
49 'Cluster' => 'default',
50 'TaskDefinition' => 'sleep360:1'
51 );
52  
53 # Results:
54 my $tasks = $RunTaskResponse->tasks;
55  
56 # Returns a L<Paws::ECS::RunTaskResponse> object.
57  
58 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
59 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ecs/RunTask>
60  
61 =head1 ATTRIBUTES
62  
63  
64 =head2 CapacityProviderStrategy => ArrayRef[L<Paws::ECS::CapacityProviderStrategyItem>]
65  
66 The capacity provider strategy to use for the task.
67  
68 If a C<capacityProviderStrategy> is specified, the C<launchType>
69 parameter must be omitted. If no C<capacityProviderStrategy> or
70 C<launchType> is specified, the C<defaultCapacityProviderStrategy> for
71 the cluster is used.
72  
73  
74  
75 =head2 Cluster => Str
76  
77 The short name or full Amazon Resource Name (ARN) of the cluster on
78 which to run your task. If you do not specify a cluster, the default
79 cluster is assumed.
80  
81  
82  
83 =head2 Count => Int
84  
85 The number of instantiations of the specified task to place on your
86 cluster. You can specify up to 10 tasks per call.
87  
88  
89  
90 =head2 EnableECSManagedTags => Bool
91  
92 Specifies whether to enable Amazon ECS managed tags for the task. For
93 more information, see Tagging Your Amazon ECS Resources
94 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html)
95 in the I<Amazon Elastic Container Service Developer Guide>.
96  
97  
98  
99 =head2 EnableExecuteCommand => Bool
100  
101 Whether or not to enable the execute command functionality for the
102 containers in this task. If C<true>, this enables execute command
103 functionality on all containers in the task.
104  
105  
106  
107 =head2 Group => Str
108  
109 The name of the task group to associate with the task. The default
110 value is the family name of the task definition (for example,
111 family:my-family-name).
112  
113  
114  
115 =head2 LaunchType => Str
116  
117 The infrastructure on which to run your standalone task. For more
118 information, see Amazon ECS launch types
119 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html)
120 in the I<Amazon Elastic Container Service Developer Guide>.
121  
122 The C<FARGATE> launch type runs your tasks on AWS Fargate On-Demand
123 infrastructure.
124  
125 Fargate Spot infrastructure is available for use but a capacity
126 provider strategy must be used. For more information, see AWS Fargate
127 capacity providers
128 (https://docs.aws.amazon.com/AmazonECS/latest/userguide/fargate-capacity-providers.html)
129 in the I<Amazon ECS User Guide for AWS Fargate>.
130  
131 The C<EC2> launch type runs your tasks on Amazon EC2 instances
132 registered to your cluster.
133  
134 The C<EXTERNAL> launch type runs your tasks on your on-premise server
135 or virtual machine (VM) capacity registered to your cluster.
136  
137 A task can use either a launch type or a capacity provider strategy. If
138 a C<launchType> is specified, the C<capacityProviderStrategy> parameter
139 must be omitted.
140  
141 Valid values are: C<"EC2">, C<"FARGATE">, C<"EXTERNAL">
142  
143 =head2 NetworkConfiguration => L<Paws::ECS::NetworkConfiguration>
144  
145 The network configuration for the task. This parameter is required for
146 task definitions that use the C<awsvpc> network mode to receive their
147 own elastic network interface, and it is not supported for other
148 network modes. For more information, see Task Networking
149 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html)
150 in the I<Amazon Elastic Container Service Developer Guide>.
151  
152  
153  
154 =head2 Overrides => L<Paws::ECS::TaskOverride>
155  
156 A list of container overrides in JSON format that specify the name of a
157 container in the specified task definition and the overrides it should
158 receive. You can override the default command for a container (that is
159 specified in the task definition or Docker image) with a C<command>
160 override. You can also override existing environment variables (that
161 are specified in the task definition or Docker image) on a container or
162 add new environment variables to it with an C<environment> override.
163  
164 A total of 8192 characters are allowed for overrides. This limit
165 includes the JSON formatting characters of the override structure.
166  
167  
168  
169 =head2 PlacementConstraints => ArrayRef[L<Paws::ECS::PlacementConstraint>]
170  
171 An array of placement constraint objects to use for the task. You can
172 specify up to 10 constraints per task (including constraints in the
173 task definition and those specified at runtime).
174  
175  
176  
177 =head2 PlacementStrategy => ArrayRef[L<Paws::ECS::PlacementStrategy>]
178  
179 The placement strategy objects to use for the task. You can specify a
180 maximum of five strategy rules per task.
181  
182  
183  
184 =head2 PlatformVersion => Str
185  
186 The platform version the task should run. A platform version is only
187 specified for tasks using the Fargate launch type. If one is not
188 specified, the C<LATEST> platform version is used by default. For more
189 information, see AWS Fargate Platform Versions
190 (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html)
191 in the I<Amazon Elastic Container Service Developer Guide>.
192  
193  
194  
195 =head2 PropagateTags => Str
196  
197 Specifies whether to propagate the tags from the task definition to the
198 task. If no value is specified, the tags are not propagated. Tags can
199 only be propagated to the task during task creation. To add tags to a
200 task after task creation, use the TagResource API action.
201  
202 An error will be received if you specify the C<SERVICE> option when
203 running a task.
204  
205 Valid values are: C<"TASK_DEFINITION">, C<"SERVICE">
206  
207 =head2 ReferenceId => Str
208  
209 The reference ID to use for the task.
210  
211  
212  
213 =head2 StartedBy => Str
214  
215 An optional tag specified when a task is started. For example, if you
216 automatically trigger a task to run a batch process job, you could
217 apply a unique identifier for that job to your task with the
218 C<startedBy> parameter. You can then identify which tasks belong to
219 that job by filtering the results of a ListTasks call with the
220 C<startedBy> value. Up to 36 letters (uppercase and lowercase),
221 numbers, hyphens, and underscores are allowed.
222  
223 If a task is started by an Amazon ECS service, then the C<startedBy>
224 parameter contains the deployment ID of the service that starts it.
225  
226  
227  
228 =head2 Tags => ArrayRef[L<Paws::ECS::Tag>]
229  
230 The metadata that you apply to the task to help you categorize and
231 organize them. Each tag consists of a key and an optional value, both
232 of which you define.
233  
234 The following basic restrictions apply to tags:
235  
236 =over
237  
238 =item *
239  
240 Maximum number of tags per resource - 50
241  
242 =item *
243  
244 For each resource, each tag key must be unique, and each tag key can
245 have only one value.
246  
247 =item *
248  
249 Maximum key length - 128 Unicode characters in UTF-8
250  
251 =item *
252  
253 Maximum value length - 256 Unicode characters in UTF-8
254  
255 =item *
256  
257 If your tagging schema is used across multiple services and resources,
258 remember that other services may have restrictions on allowed
259 characters. Generally allowed characters are: letters, numbers, and
260 spaces representable in UTF-8, and the following characters: + - = . _
261 : / @.
262  
263 =item *
264  
265 Tag keys and values are case-sensitive.
266  
267 =item *
268  
269 Do not use C<aws:>, C<AWS:>, or any upper or lowercase combination of
270 such as a prefix for either keys or values as it is reserved for AWS
271 use. You cannot edit or delete tag keys or values with this prefix.
272 Tags with this prefix do not count against your tags per resource
273 limit.
274  
275 =back
276  
277  
278  
279  
280 =head2 B<REQUIRED> TaskDefinition => Str
281  
282 The C<family> and C<revision> (C<family:revision>) or full ARN of the
283 task definition to run. If a C<revision> is not specified, the latest
284 C<ACTIVE> revision is used.
285  
286  
287  
288  
289 =head1 SEE ALSO
290  
291 This class forms part of L<Paws>, documenting arguments for method RunTask in L<Paws::ECS>
292  
293 =head1 BUGS and CONTRIBUTIONS
294  
295 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
296  
297 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
298  
299 =cut
300