blib/lib/Paws/IoT/CreateOTAUpdate.pm untested

filter: Statementstmt 0.0% 0 / 36 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 38 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IoT::CreateOTAUpdate;
3 use Moose;
4 has AdditionalParameters => (is => 'ro', isa => 'Paws::IoT::AdditionalParameterMap', traits => ['NameInRequest'], request_name => 'additionalParameters');
5 has AwsJobAbortConfig => (is => 'ro', isa => 'Paws::IoT::AwsJobAbortConfig', traits => ['NameInRequest'], request_name => 'awsJobAbortConfig');
6 has AwsJobExecutionsRolloutConfig => (is => 'ro', isa => 'Paws::IoT::AwsJobExecutionsRolloutConfig', traits => ['NameInRequest'], request_name => 'awsJobExecutionsRolloutConfig');
7 has AwsJobPresignedUrlConfig => (is => 'ro', isa => 'Paws::IoT::AwsJobPresignedUrlConfig', traits => ['NameInRequest'], request_name => 'awsJobPresignedUrlConfig');
8 has AwsJobTimeoutConfig => (is => 'ro', isa => 'Paws::IoT::AwsJobTimeoutConfig', traits => ['NameInRequest'], request_name => 'awsJobTimeoutConfig');
9 has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description');
10 has Files => (is => 'ro', isa => 'ArrayRef[Paws::IoT::OTAUpdateFile]', traits => ['NameInRequest'], request_name => 'files', required => 1);
11 has OtaUpdateId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'otaUpdateId', required => 1);
12 has Protocols => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'protocols');
13 has RoleArn => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'roleArn', required => 1);
14 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::IoT::Tag]', traits => ['NameInRequest'], request_name => 'tags');
15 has Targets => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'targets', required => 1);
16 has TargetSelection => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'targetSelection');
17  
18 use MooseX::ClassAttribute;
19  
20 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateOTAUpdate');
21 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/otaUpdates/{otaUpdateId}');
22 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
23 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IoT::CreateOTAUpdateResponse');
24 1;
25  
26 ### main pod documentation begin ###
27  
28 =head1 NAME
29  
30 Paws::IoT::CreateOTAUpdate - Arguments for method CreateOTAUpdate on L<Paws::IoT>
31  
32 =head1 DESCRIPTION
33  
34 This class represents the parameters used for calling the method CreateOTAUpdate on the
35 L<AWS IoT|Paws::IoT> service. Use the attributes of this class
36 as arguments to method CreateOTAUpdate.
37  
38 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateOTAUpdate.
39  
40 =head1 SYNOPSIS
41  
42 my $iot = Paws->service('IoT');
43 my $CreateOTAUpdateResponse = $iot->CreateOTAUpdate(
44 Files => [
45 {
46 Attributes => { 'MyAttributeKey' => 'MyValue', }, # OPTIONAL
47 CodeSigning => {
48 AwsSignerJobId => 'MySigningJobId', # OPTIONAL
49 CustomCodeSigning => {
50 CertificateChain => {
51 CertificateName => 'MyCertificateName', # OPTIONAL
52 InlineDocument => 'MyInlineDocument', # OPTIONAL
53 }, # OPTIONAL
54 HashAlgorithm => 'MyHashAlgorithm', # OPTIONAL
55 Signature => {
56 InlineDocument => 'BlobSignature', # OPTIONAL
57 }, # OPTIONAL
58 SignatureAlgorithm => 'MySignatureAlgorithm', # OPTIONAL
59 }, # OPTIONAL
60 StartSigningJobParameter => {
61 Destination => {
62 S3Destination => {
63 Bucket => 'MyS3Bucket', # min: 1; OPTIONAL
64 Prefix => 'MyPrefix', # OPTIONAL
65 }, # OPTIONAL
66 }, # OPTIONAL
67 SigningProfileName => 'MySigningProfileName', # OPTIONAL
68 SigningProfileParameter => {
69 CertificateArn => 'MyCertificateArn', # OPTIONAL
70 CertificatePathOnDevice =>
71 'MyCertificatePathOnDevice', # OPTIONAL
72 Platform => 'MyPlatform', # OPTIONAL
73 }, # OPTIONAL
74 }, # OPTIONAL
75 }, # OPTIONAL
76 FileLocation => {
77 S3Location => {
78 Bucket => 'MyS3Bucket', # min: 1; OPTIONAL
79 Key => 'MyS3Key', # min: 1; OPTIONAL
80 Version => 'MyS3Version', # OPTIONAL
81 }, # OPTIONAL
82 Stream => {
83 FileId => 1, # max: 255; OPTIONAL
84 StreamId => 'MyStreamId', # min: 1, max: 128; OPTIONAL
85 }, # OPTIONAL
86 }, # OPTIONAL
87 FileName => 'MyFileName', # OPTIONAL
88 FileType => 1, # max: 255; OPTIONAL
89 FileVersion => 'MyOTAUpdateFileVersion', # OPTIONAL
90 },
91 ...
92 ],
93 OtaUpdateId => 'MyOTAUpdateId',
94 RoleArn => 'MyRoleArn',
95 Targets => [ 'MyTarget', ... ],
96 AdditionalParameters => { 'MyAttributeKey' => 'MyValue', }, # OPTIONAL
97 AwsJobAbortConfig => {
98 AbortCriteriaList => [
99 {
100 Action => 'CANCEL', # values: CANCEL
101 FailureType => 'FAILED', # values: FAILED, REJECTED, TIMED_OUT, ALL
102 MinNumberOfExecutedThings => 1, # min: 1
103 ThresholdPercentage => 1, # max: 100
104  
105 },
106 ...
107 ], # min: 1
108  
109 }, # OPTIONAL
110 AwsJobExecutionsRolloutConfig => {
111 ExponentialRate => {
112 BaseRatePerMinute => 1, # min: 1, max: 1000
113 IncrementFactor => 1,
114 RateIncreaseCriteria => {
115 NumberOfNotifiedThings => 1, # min: 1; OPTIONAL
116 NumberOfSucceededThings => 1, # min: 1; OPTIONAL
117 },
118  
119 }, # OPTIONAL
120 MaximumPerMinute => 1, # min: 1, max: 1000; OPTIONAL
121 }, # OPTIONAL
122 AwsJobPresignedUrlConfig => {
123 ExpiresInSec => 1, # OPTIONAL
124 }, # OPTIONAL
125 AwsJobTimeoutConfig => {
126 InProgressTimeoutInMinutes => 1, # OPTIONAL
127 }, # OPTIONAL
128 Description => 'MyOTAUpdateDescription', # OPTIONAL
129 Protocols => [
130 'MQTT', ... # values: MQTT, HTTP
131 ], # OPTIONAL
132 Tags => [
133 {
134 Key => 'MyTagKey', # min: 1, max: 128
135 Value => 'MyTagValue', # min: 1, max: 256; OPTIONAL
136 },
137 ...
138 ], # OPTIONAL
139 TargetSelection => 'CONTINUOUS', # OPTIONAL
140 );
141  
142 # Results:
143 my $AwsIotJobArn = $CreateOTAUpdateResponse->AwsIotJobArn;
144 my $AwsIotJobId = $CreateOTAUpdateResponse->AwsIotJobId;
145 my $OtaUpdateArn = $CreateOTAUpdateResponse->OtaUpdateArn;
146 my $OtaUpdateId = $CreateOTAUpdateResponse->OtaUpdateId;
147 my $OtaUpdateStatus = $CreateOTAUpdateResponse->OtaUpdateStatus;
148  
149 # Returns a L<Paws::IoT::CreateOTAUpdateResponse> object.
150  
151 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.
152 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iot/CreateOTAUpdate>
153  
154 =head1 ATTRIBUTES
155  
156  
157 =head2 AdditionalParameters => L<Paws::IoT::AdditionalParameterMap>
158  
159 A list of additional OTA update parameters which are name-value pairs.
160  
161  
162  
163 =head2 AwsJobAbortConfig => L<Paws::IoT::AwsJobAbortConfig>
164  
165 The criteria that determine when and how a job abort takes place.
166  
167  
168  
169 =head2 AwsJobExecutionsRolloutConfig => L<Paws::IoT::AwsJobExecutionsRolloutConfig>
170  
171 Configuration for the rollout of OTA updates.
172  
173  
174  
175 =head2 AwsJobPresignedUrlConfig => L<Paws::IoT::AwsJobPresignedUrlConfig>
176  
177 Configuration information for pre-signed URLs.
178  
179  
180  
181 =head2 AwsJobTimeoutConfig => L<Paws::IoT::AwsJobTimeoutConfig>
182  
183 Specifies the amount of time each device has to finish its execution of
184 the job. A timer is started when the job execution status is set to
185 C<IN_PROGRESS>. If the job execution status is not set to another
186 terminal state before the timer expires, it will be automatically set
187 to C<TIMED_OUT>.
188  
189  
190  
191 =head2 Description => Str
192  
193 The description of the OTA update.
194  
195  
196  
197 =head2 B<REQUIRED> Files => ArrayRef[L<Paws::IoT::OTAUpdateFile>]
198  
199 The files to be streamed by the OTA update.
200  
201  
202  
203 =head2 B<REQUIRED> OtaUpdateId => Str
204  
205 The ID of the OTA update to be created.
206  
207  
208  
209 =head2 Protocols => ArrayRef[Str|Undef]
210  
211 The protocol used to transfer the OTA update image. Valid values are
212 [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified,
213 the target device can choose the protocol.
214  
215  
216  
217 =head2 B<REQUIRED> RoleArn => Str
218  
219 The IAM role that grants AWS IoT access to the Amazon S3, AWS IoT jobs
220 and AWS Code Signing resources to create an OTA update job.
221  
222  
223  
224 =head2 Tags => ArrayRef[L<Paws::IoT::Tag>]
225  
226 Metadata which can be used to manage updates.
227  
228  
229  
230 =head2 B<REQUIRED> Targets => ArrayRef[Str|Undef]
231  
232 The devices targeted to receive OTA updates.
233  
234  
235  
236 =head2 TargetSelection => Str
237  
238 Specifies whether the update will continue to run (CONTINUOUS), or will
239 be complete after all the things specified as targets have completed
240 the update (SNAPSHOT). If continuous, the update may also be run on a
241 thing when a change is detected in a target. For example, an update
242 will run on a thing when the thing is added to a target group, even
243 after the update was completed by all things originally in the group.
244 Valid values: CONTINUOUS | SNAPSHOT.
245  
246 Valid values are: C<"CONTINUOUS">, C<"SNAPSHOT">
247  
248  
249 =head1 SEE ALSO
250  
251 This class forms part of L<Paws>, documenting arguments for method CreateOTAUpdate in L<Paws::IoT>
252  
253 =head1 BUGS and CONTRIBUTIONS
254  
255 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
256  
257 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
258  
259 =cut
260