blib/lib/Paws/Batch/RegisterJobDefinition.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 32 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Batch::RegisterJobDefinition;
3 use Moose;
4 has ContainerProperties => (is => 'ro', isa => 'Paws::Batch::ContainerProperties', traits => ['NameInRequest'], request_name => 'containerProperties');
5 has JobDefinitionName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'jobDefinitionName', required => 1);
6 has NodeProperties => (is => 'ro', isa => 'Paws::Batch::NodeProperties', traits => ['NameInRequest'], request_name => 'nodeProperties');
7 has Parameters => (is => 'ro', isa => 'Paws::Batch::ParametersMap', traits => ['NameInRequest'], request_name => 'parameters');
8 has PlatformCapabilities => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'platformCapabilities');
9 has PropagateTags => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'propagateTags');
10 has RetryStrategy => (is => 'ro', isa => 'Paws::Batch::RetryStrategy', traits => ['NameInRequest'], request_name => 'retryStrategy');
11 has Tags => (is => 'ro', isa => 'Paws::Batch::TagrisTagsMap', traits => ['NameInRequest'], request_name => 'tags');
12 has Timeout => (is => 'ro', isa => 'Paws::Batch::JobTimeout', traits => ['NameInRequest'], request_name => 'timeout');
13 has Type => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'type', required => 1);
14  
15 use MooseX::ClassAttribute;
16  
17 class_has _api_call => (isa => 'Str', is => 'ro', default => 'RegisterJobDefinition');
18 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v1/registerjobdefinition');
19 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
20 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Batch::RegisterJobDefinitionResponse');
21 1;
22  
23 ### main pod documentation begin ###
24  
25 =head1 NAME
26  
27 Paws::Batch::RegisterJobDefinition - Arguments for method RegisterJobDefinition on L<Paws::Batch>
28  
29 =head1 DESCRIPTION
30  
31 This class represents the parameters used for calling the method RegisterJobDefinition on the
32 L<AWS Batch|Paws::Batch> service. Use the attributes of this class
33 as arguments to method RegisterJobDefinition.
34  
35 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to RegisterJobDefinition.
36  
37 =head1 SYNOPSIS
38  
39 my $batch = Paws->service('Batch');
40 # To register a job definition
41 # This example registers a job definition for a simple container job.
42 my $RegisterJobDefinitionResponse = $batch->RegisterJobDefinition(
43 'ContainerProperties' => {
44 'Command' => [ 'sleep', 10 ],
45 'Image' => 'busybox',
46 'Memory' => 128,
47 'Vcpus' => 1
48 },
49 'JobDefinitionName' => 'sleep10',
50 'Type' => 'container'
51 );
52  
53 # Results:
54 my $jobDefinitionArn = $RegisterJobDefinitionResponse->jobDefinitionArn;
55 my $jobDefinitionName = $RegisterJobDefinitionResponse->jobDefinitionName;
56 my $revision = $RegisterJobDefinitionResponse->revision;
57  
58 # Returns a L<Paws::Batch::RegisterJobDefinitionResponse> object.
59  
60 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.
61 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/batch/RegisterJobDefinition>
62  
63 =head1 ATTRIBUTES
64  
65  
66 =head2 ContainerProperties => L<Paws::Batch::ContainerProperties>
67  
68 An object with various properties specific to single-node
69 container-based jobs. If the job definition's C<type> parameter is
70 C<container>, then you must specify either C<containerProperties> or
71 C<nodeProperties>.
72  
73 If the job runs on Fargate resources, then you must not specify
74 C<nodeProperties>; use only C<containerProperties>.
75  
76  
77  
78 =head2 B<REQUIRED> JobDefinitionName => Str
79  
80 The name of the job definition to register. Up to 128 letters
81 (uppercase and lowercase), numbers, hyphens, and underscores are
82 allowed.
83  
84  
85  
86 =head2 NodeProperties => L<Paws::Batch::NodeProperties>
87  
88 An object with various properties specific to multi-node parallel jobs.
89 If you specify node properties for a job, it becomes a multi-node
90 parallel job. For more information, see Multi-node Parallel Jobs
91 (https://docs.aws.amazon.com/batch/latest/userguide/multi-node-parallel-jobs.html)
92 in the I<AWS Batch User Guide>. If the job definition's C<type>
93 parameter is C<container>, then you must specify either
94 C<containerProperties> or C<nodeProperties>.
95  
96 If the job runs on Fargate resources, then you must not specify
97 C<nodeProperties>; use C<containerProperties> instead.
98  
99  
100  
101 =head2 Parameters => L<Paws::Batch::ParametersMap>
102  
103 Default parameter substitution placeholders to set in the job
104 definition. Parameters are specified as a key-value pair mapping.
105 Parameters in a C<SubmitJob> request override any corresponding
106 parameter defaults from the job definition.
107  
108  
109  
110 =head2 PlatformCapabilities => ArrayRef[Str|Undef]
111  
112 The platform capabilities required by the job definition. If no value
113 is specified, it defaults to C<EC2>. To run the job on Fargate
114 resources, specify C<FARGATE>.
115  
116  
117  
118 =head2 PropagateTags => Bool
119  
120 Specifies whether to propagate the tags from the job or job definition
121 to the corresponding Amazon ECS task. If no value is specified, the
122 tags are not propagated. Tags can only be propagated to the tasks
123 during task creation. For tags with the same name, job tags are given
124 priority over job definitions tags. If the total number of combined
125 tags from the job and job definition is over 50, the job is moved to
126 the C<FAILED> state.
127  
128  
129  
130 =head2 RetryStrategy => L<Paws::Batch::RetryStrategy>
131  
132 The retry strategy to use for failed jobs that are submitted with this
133 job definition. Any retry strategy that's specified during a SubmitJob
134 operation overrides the retry strategy defined here. If a job is
135 terminated due to a timeout, it isn't retried.
136  
137  
138  
139 =head2 Tags => L<Paws::Batch::TagrisTagsMap>
140  
141 The tags that you apply to the job definition to help you categorize
142 and organize your resources. Each tag consists of a key and an optional
143 value. For more information, see Tagging AWS Resources
144 (https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html) in
145 I<AWS Batch User Guide>.
146  
147  
148  
149 =head2 Timeout => L<Paws::Batch::JobTimeout>
150  
151 The timeout configuration for jobs that are submitted with this job
152 definition, after which AWS Batch terminates your jobs if they have not
153 finished. If a job is terminated due to a timeout, it isn't retried.
154 The minimum value for the timeout is 60 seconds. Any timeout
155 configuration that's specified during a SubmitJob operation overrides
156 the timeout configuration defined here. For more information, see Job
157 Timeouts
158 (https://docs.aws.amazon.com/batch/latest/userguide/job_timeouts.html)
159 in the I<AWS Batch User Guide>.
160  
161  
162  
163 =head2 B<REQUIRED> Type => Str
164  
165 The type of job definition. For more information about multi-node
166 parallel jobs, see Creating a multi-node parallel job definition
167 (https://docs.aws.amazon.com/batch/latest/userguide/multi-node-job-def.html)
168 in the I<AWS Batch User Guide>.
169  
170 If the job is run on Fargate resources, then C<multinode> isn't
171 supported.
172  
173 Valid values are: C<"container">, C<"multinode">
174  
175  
176 =head1 SEE ALSO
177  
178 This class forms part of L<Paws>, documenting arguments for method RegisterJobDefinition in L<Paws::Batch>
179  
180 =head1 BUGS and CONTRIBUTIONS
181  
182 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
183  
184 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
185  
186 =cut
187