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

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::IoT::CreateTopicRule;
3 use Moose;
4 has RuleName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'ruleName', required => 1);
5 has Tags => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'x-amz-tagging');
6 has TopicRulePayload => (is => 'ro', isa => 'Paws::IoT::TopicRulePayload', traits => ['NameInRequest'], request_name => 'topicRulePayload', required => 1);
7  
8 use MooseX::ClassAttribute;
9 class_has _stream_param => (is => 'ro', default => 'TopicRulePayload');
10 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateTopicRule');
11 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/rules/{ruleName}');
12 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
13 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
14 1;
15  
16 ### main pod documentation begin ###
17  
18 =head1 NAME
19  
20 Paws::IoT::CreateTopicRule - Arguments for method CreateTopicRule on L<Paws::IoT>
21  
22 =head1 DESCRIPTION
23  
24 This class represents the parameters used for calling the method CreateTopicRule on the
25 L<AWS IoT|Paws::IoT> service. Use the attributes of this class
26 as arguments to method CreateTopicRule.
27  
28 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateTopicRule.
29  
30 =head1 SYNOPSIS
31  
32 my $iot = Paws->service('IoT');
33 $iot->CreateTopicRule(
34 RuleName => 'MyRuleName',
35 TopicRulePayload => {
36 Actions => [
37 {
38 CloudwatchAlarm => {
39 AlarmName => 'MyAlarmName',
40 RoleArn => 'MyAwsArn',
41 StateReason => 'MyStateReason',
42 StateValue => 'MyStateValue',
43  
44 }, # OPTIONAL
45 CloudwatchLogs => {
46 LogGroupName => 'MyLogGroupName',
47 RoleArn => 'MyAwsArn',
48  
49 }, # OPTIONAL
50 CloudwatchMetric => {
51 MetricName => 'MyString',
52 MetricNamespace => 'MyString',
53 MetricUnit => 'MyString',
54 MetricValue => 'MyString',
55 RoleArn => 'MyAwsArn',
56 MetricTimestamp => 'MyString',
57 }, # OPTIONAL
58 DynamoDB => {
59 HashKeyField => 'MyHashKeyField',
60 HashKeyValue => 'MyHashKeyValue',
61 RoleArn => 'MyAwsArn',
62 TableName => 'MyTableName',
63 HashKeyType => 'STRING', # values: STRING, NUMBER; OPTIONAL
64 Operation => 'MyDynamoOperation', # OPTIONAL
65 PayloadField => 'MyPayloadField', # OPTIONAL
66 RangeKeyField => 'MyRangeKeyField', # OPTIONAL
67 RangeKeyType => 'STRING', # values: STRING, NUMBER; OPTIONAL
68 RangeKeyValue => 'MyRangeKeyValue', # OPTIONAL
69 }, # OPTIONAL
70 DynamoDBv2 => {
71 PutItem => {
72 TableName => 'MyTableName',
73  
74 },
75 RoleArn => 'MyAwsArn',
76  
77 }, # OPTIONAL
78 Elasticsearch => {
79 Endpoint => 'MyElasticsearchEndpoint',
80 Id => 'MyElasticsearchId',
81 Index => 'MyElasticsearchIndex',
82 RoleArn => 'MyAwsArn',
83 Type => 'MyElasticsearchType',
84  
85 }, # OPTIONAL
86 Firehose => {
87 DeliveryStreamName => 'MyDeliveryStreamName',
88 RoleArn => 'MyAwsArn',
89 BatchMode => 1, # OPTIONAL
90 Separator => 'MyFirehoseSeparator', # OPTIONAL
91 }, # OPTIONAL
92 Http => {
93 Url => 'MyUrl', # max: 2000
94 Auth => {
95 Sigv4 => {
96 RoleArn => 'MyAwsArn',
97 ServiceName => 'MyServiceName',
98 SigningRegion => 'MySigningRegion',
99  
100 }, # OPTIONAL
101 }, # OPTIONAL
102 ConfirmationUrl => 'MyUrl', # max: 2000
103 Headers => [
104 {
105 Key => 'MyHeaderKey', # min: 1, max: 256
106 Value => 'MyHeaderValue',
107  
108 },
109 ...
110 ], # max: 100; OPTIONAL
111 }, # OPTIONAL
112 IotAnalytics => {
113 BatchMode => 1, # OPTIONAL
114 ChannelArn => 'MyAwsArn',
115 ChannelName => 'MyChannelName', # OPTIONAL
116 RoleArn => 'MyAwsArn',
117 }, # OPTIONAL
118 IotEvents => {
119 InputName => 'MyInputName', # min: 1, max: 128
120 RoleArn => 'MyAwsArn',
121 BatchMode => 1, # OPTIONAL
122 MessageId => 'MyMessageId', # max: 128; OPTIONAL
123 }, # OPTIONAL
124 IotSiteWise => {
125 PutAssetPropertyValueEntries => [
126 {
127 PropertyValues => [
128 {
129 Timestamp => {
130 TimeInSeconds => 'MyAssetPropertyTimeInSeconds',
131 OffsetInNanos =>
132 'MyAssetPropertyOffsetInNanos', # OPTIONAL
133 },
134 Value => {
135 BooleanValue =>
136 'MyAssetPropertyBooleanValue', # OPTIONAL
137 DoubleValue => 'MyAssetPropertyDoubleValue', # OPTIONAL
138 IntegerValue =>
139 'MyAssetPropertyIntegerValue', # OPTIONAL
140 StringValue => 'MyAssetPropertyStringValue'
141 , # min: 1, max: 1024; OPTIONAL
142 },
143 Quality => 'MyAssetPropertyQuality', # OPTIONAL
144 },
145 ...
146 ], # min: 1
147 AssetId => 'MyAssetId', # OPTIONAL
148 EntryId => 'MyAssetPropertyEntryId', # OPTIONAL
149 PropertyAlias => 'MyAssetPropertyAlias', # min: 1; OPTIONAL
150 PropertyId => 'MyAssetPropertyId', # OPTIONAL
151 },
152 ...
153 ], # min: 1
154 RoleArn => 'MyAwsArn',
155  
156 }, # OPTIONAL
157 Kafka => {
158 ClientProperties => { 'MyString' => 'MyString', },
159 DestinationArn => 'MyAwsArn',
160 Topic => 'MyString',
161 Key => 'MyString',
162 Partition => 'MyString',
163 }, # OPTIONAL
164 Kinesis => {
165 RoleArn => 'MyAwsArn',
166 StreamName => 'MyStreamName',
167 PartitionKey => 'MyPartitionKey', # OPTIONAL
168 }, # OPTIONAL
169 Lambda => {
170 FunctionArn => 'MyFunctionArn',
171  
172 }, # OPTIONAL
173 Republish => {
174 RoleArn => 'MyAwsArn',
175 Topic => 'MyTopicPattern',
176 Qos => 1, # max: 1; OPTIONAL
177 }, # OPTIONAL
178 S3 => {
179 BucketName => 'MyBucketName',
180 Key => 'MyKey',
181 RoleArn => 'MyAwsArn',
182 CannedAcl => 'private'
183 , # values: private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write; OPTIONAL
184 }, # OPTIONAL
185 Salesforce => {
186 Token => 'MySalesforceToken', # min: 40
187 Url => 'MySalesforceEndpoint', # max: 2000
188  
189 }, # OPTIONAL
190 Sns => {
191 RoleArn => 'MyAwsArn',
192 TargetArn => 'MyAwsArn',
193 MessageFormat => 'RAW', # values: RAW, JSON; OPTIONAL
194 }, # OPTIONAL
195 Sqs => {
196 QueueUrl => 'MyQueueUrl',
197 RoleArn => 'MyAwsArn',
198 UseBase64 => 1, # OPTIONAL
199 }, # OPTIONAL
200 StepFunctions => {
201 RoleArn => 'MyAwsArn',
202 StateMachineName => 'MyStateMachineName',
203 ExecutionNamePrefix => 'MyExecutionNamePrefix', # OPTIONAL
204 }, # OPTIONAL
205 Timestream => {
206 DatabaseName => 'MyTimestreamDatabaseName',
207 Dimensions => [
208 {
209 Name => 'MyTimestreamDimensionName',
210 Value => 'MyTimestreamDimensionValue',
211  
212 },
213 ...
214 ], # min: 1, max: 128
215 RoleArn => 'MyAwsArn',
216 TableName => 'MyTimestreamTableName',
217 Timestamp => {
218 Unit => 'MyTimestreamTimestampUnit',
219 Value => 'MyTimestreamTimestampValue',
220  
221 }, # OPTIONAL
222 }, # OPTIONAL
223 },
224 ...
225 ], # max: 10
226 Sql => 'MySQL',
227 AwsIotSqlVersion => 'MyAwsIotSqlVersion', # OPTIONAL
228 Description => 'MyDescription', # OPTIONAL
229 ErrorAction => {
230 CloudwatchAlarm => {
231 AlarmName => 'MyAlarmName',
232 RoleArn => 'MyAwsArn',
233 StateReason => 'MyStateReason',
234 StateValue => 'MyStateValue',
235  
236 }, # OPTIONAL
237 CloudwatchLogs => {
238 LogGroupName => 'MyLogGroupName',
239 RoleArn => 'MyAwsArn',
240  
241 }, # OPTIONAL
242 CloudwatchMetric => {
243 MetricName => 'MyString',
244 MetricNamespace => 'MyString',
245 MetricUnit => 'MyString',
246 MetricValue => 'MyString',
247 RoleArn => 'MyAwsArn',
248 MetricTimestamp => 'MyString',
249 }, # OPTIONAL
250 DynamoDB => {
251 HashKeyField => 'MyHashKeyField',
252 HashKeyValue => 'MyHashKeyValue',
253 RoleArn => 'MyAwsArn',
254 TableName => 'MyTableName',
255 HashKeyType => 'STRING', # values: STRING, NUMBER; OPTIONAL
256 Operation => 'MyDynamoOperation', # OPTIONAL
257 PayloadField => 'MyPayloadField', # OPTIONAL
258 RangeKeyField => 'MyRangeKeyField', # OPTIONAL
259 RangeKeyType => 'STRING', # values: STRING, NUMBER; OPTIONAL
260 RangeKeyValue => 'MyRangeKeyValue', # OPTIONAL
261 }, # OPTIONAL
262 DynamoDBv2 => {
263 PutItem => {
264 TableName => 'MyTableName',
265  
266 },
267 RoleArn => 'MyAwsArn',
268  
269 }, # OPTIONAL
270 Elasticsearch => {
271 Endpoint => 'MyElasticsearchEndpoint',
272 Id => 'MyElasticsearchId',
273 Index => 'MyElasticsearchIndex',
274 RoleArn => 'MyAwsArn',
275 Type => 'MyElasticsearchType',
276  
277 }, # OPTIONAL
278 Firehose => {
279 DeliveryStreamName => 'MyDeliveryStreamName',
280 RoleArn => 'MyAwsArn',
281 BatchMode => 1, # OPTIONAL
282 Separator => 'MyFirehoseSeparator', # OPTIONAL
283 }, # OPTIONAL
284 Http => {
285 Url => 'MyUrl', # max: 2000
286 Auth => {
287 Sigv4 => {
288 RoleArn => 'MyAwsArn',
289 ServiceName => 'MyServiceName',
290 SigningRegion => 'MySigningRegion',
291  
292 }, # OPTIONAL
293 }, # OPTIONAL
294 ConfirmationUrl => 'MyUrl', # max: 2000
295 Headers => [
296 {
297 Key => 'MyHeaderKey', # min: 1, max: 256
298 Value => 'MyHeaderValue',
299  
300 },
301 ...
302 ], # max: 100; OPTIONAL
303 }, # OPTIONAL
304 IotAnalytics => {
305 BatchMode => 1, # OPTIONAL
306 ChannelArn => 'MyAwsArn',
307 ChannelName => 'MyChannelName', # OPTIONAL
308 RoleArn => 'MyAwsArn',
309 }, # OPTIONAL
310 IotEvents => {
311 InputName => 'MyInputName', # min: 1, max: 128
312 RoleArn => 'MyAwsArn',
313 BatchMode => 1, # OPTIONAL
314 MessageId => 'MyMessageId', # max: 128; OPTIONAL
315 }, # OPTIONAL
316 IotSiteWise => {
317 PutAssetPropertyValueEntries => [
318 {
319 PropertyValues => [
320 {
321 Timestamp => {
322 TimeInSeconds => 'MyAssetPropertyTimeInSeconds',
323 OffsetInNanos =>
324 'MyAssetPropertyOffsetInNanos', # OPTIONAL
325 },
326 Value => {
327 BooleanValue => 'MyAssetPropertyBooleanValue', # OPTIONAL
328 DoubleValue => 'MyAssetPropertyDoubleValue', # OPTIONAL
329 IntegerValue => 'MyAssetPropertyIntegerValue', # OPTIONAL
330 StringValue => 'MyAssetPropertyStringValue'
331 , # min: 1, max: 1024; OPTIONAL
332 },
333 Quality => 'MyAssetPropertyQuality', # OPTIONAL
334 },
335 ...
336 ], # min: 1
337 AssetId => 'MyAssetId', # OPTIONAL
338 EntryId => 'MyAssetPropertyEntryId', # OPTIONAL
339 PropertyAlias => 'MyAssetPropertyAlias', # min: 1; OPTIONAL
340 PropertyId => 'MyAssetPropertyId', # OPTIONAL
341 },
342 ...
343 ], # min: 1
344 RoleArn => 'MyAwsArn',
345  
346 }, # OPTIONAL
347 Kafka => {
348 ClientProperties => { 'MyString' => 'MyString', },
349 DestinationArn => 'MyAwsArn',
350 Topic => 'MyString',
351 Key => 'MyString',
352 Partition => 'MyString',
353 }, # OPTIONAL
354 Kinesis => {
355 RoleArn => 'MyAwsArn',
356 StreamName => 'MyStreamName',
357 PartitionKey => 'MyPartitionKey', # OPTIONAL
358 }, # OPTIONAL
359 Lambda => {
360 FunctionArn => 'MyFunctionArn',
361  
362 }, # OPTIONAL
363 Republish => {
364 RoleArn => 'MyAwsArn',
365 Topic => 'MyTopicPattern',
366 Qos => 1, # max: 1; OPTIONAL
367 }, # OPTIONAL
368 S3 => {
369 BucketName => 'MyBucketName',
370 Key => 'MyKey',
371 RoleArn => 'MyAwsArn',
372 CannedAcl => 'private'
373 , # values: private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control, log-delivery-write; OPTIONAL
374 }, # OPTIONAL
375 Salesforce => {
376 Token => 'MySalesforceToken', # min: 40
377 Url => 'MySalesforceEndpoint', # max: 2000
378  
379 }, # OPTIONAL
380 Sns => {
381 RoleArn => 'MyAwsArn',
382 TargetArn => 'MyAwsArn',
383 MessageFormat => 'RAW', # values: RAW, JSON; OPTIONAL
384 }, # OPTIONAL
385 Sqs => {
386 QueueUrl => 'MyQueueUrl',
387 RoleArn => 'MyAwsArn',
388 UseBase64 => 1, # OPTIONAL
389 }, # OPTIONAL
390 StepFunctions => {
391 RoleArn => 'MyAwsArn',
392 StateMachineName => 'MyStateMachineName',
393 ExecutionNamePrefix => 'MyExecutionNamePrefix', # OPTIONAL
394 }, # OPTIONAL
395 Timestream => {
396 DatabaseName => 'MyTimestreamDatabaseName',
397 Dimensions => [
398 {
399 Name => 'MyTimestreamDimensionName',
400 Value => 'MyTimestreamDimensionValue',
401  
402 },
403 ...
404 ], # min: 1, max: 128
405 RoleArn => 'MyAwsArn',
406 TableName => 'MyTimestreamTableName',
407 Timestamp => {
408 Unit => 'MyTimestreamTimestampUnit',
409 Value => 'MyTimestreamTimestampValue',
410  
411 }, # OPTIONAL
412 }, # OPTIONAL
413 },
414 RuleDisabled => 1, # OPTIONAL
415 },
416 Tags => 'MyString', # OPTIONAL
417 );
418  
419 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.
420 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iot/CreateTopicRule>
421  
422 =head1 ATTRIBUTES
423  
424  
425 =head2 B<REQUIRED> RuleName => Str
426  
427 The name of the rule.
428  
429  
430  
431 =head2 Tags => Str
432  
433 Metadata which can be used to manage the topic rule.
434  
435 For URI Request parameters use format: ...key1=value1&key2=value2...
436  
437 For the CLI command-line parameter use format: --tags
438 "key1=value1&key2=value2..."
439  
440 For the cli-input-json file use format: "tags":
441 "key1=value1&key2=value2..."
442  
443  
444  
445 =head2 B<REQUIRED> TopicRulePayload => L<Paws::IoT::TopicRulePayload>
446  
447 The rule payload.
448  
449  
450  
451  
452 =head1 SEE ALSO
453  
454 This class forms part of L<Paws>, documenting arguments for method CreateTopicRule in L<Paws::IoT>
455  
456 =head1 BUGS and CONTRIBUTIONS
457  
458 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
459  
460 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
461  
462 =cut
463