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

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