blib/lib/Paws/IoTEvents/DynamoDBAction.pm untested

filter: Statementstmt 0.0% 0 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 24 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 # Generated by default/object.tt
2 package Paws::IoTEvents::DynamoDBAction;
3 use Moose;
4 has HashKeyField => (is => 'ro', isa => 'Str', request_name => 'hashKeyField', traits => ['NameInRequest'], required => 1);
5 has HashKeyType => (is => 'ro', isa => 'Str', request_name => 'hashKeyType', traits => ['NameInRequest']);
6 has HashKeyValue => (is => 'ro', isa => 'Str', request_name => 'hashKeyValue', traits => ['NameInRequest'], required => 1);
7 has Operation => (is => 'ro', isa => 'Str', request_name => 'operation', traits => ['NameInRequest']);
8 has Payload => (is => 'ro', isa => 'Paws::IoTEvents::Payload', request_name => 'payload', traits => ['NameInRequest']);
9 has PayloadField => (is => 'ro', isa => 'Str', request_name => 'payloadField', traits => ['NameInRequest']);
10 has RangeKeyField => (is => 'ro', isa => 'Str', request_name => 'rangeKeyField', traits => ['NameInRequest']);
11 has RangeKeyType => (is => 'ro', isa => 'Str', request_name => 'rangeKeyType', traits => ['NameInRequest']);
12 has RangeKeyValue => (is => 'ro', isa => 'Str', request_name => 'rangeKeyValue', traits => ['NameInRequest']);
13 has TableName => (is => 'ro', isa => 'Str', request_name => 'tableName', traits => ['NameInRequest'], required => 1);
14  
15 1;
16  
17 ### main pod documentation begin ###
18  
19 =head1 NAME
20  
21 Paws::IoTEvents::DynamoDBAction
22  
23 =head1 USAGE
24  
25 This class represents one of two things:
26  
27 =head3 Arguments in a call to a service
28  
29 Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
30 Each attribute should be used as a named argument in the calls that expect this type of object.
31  
32 As an example, if Att1 is expected to be a Paws::IoTEvents::DynamoDBAction object:
33  
34 $service_obj->Method(Att1 => { HashKeyField => $value, ..., TableName => $value });
35  
36 =head3 Results returned from an API call
37  
38 Use accessors for each attribute. If Att1 is expected to be an Paws::IoTEvents::DynamoDBAction object:
39  
40 $result = $service_obj->Method(...);
41 $result->Att1->HashKeyField
42  
43 =head1 DESCRIPTION
44  
45 Defines an action to write to the Amazon DynamoDB table that you
46 created. The standard action payload contains all the information about
47 the detector model instance and the event that triggered the action.
48 You can customize the payload
49 (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html).
50 One column of the DynamoDB table receives all attribute-value pairs in
51 the payload that you specify.
52  
53 You must use expressions for all parameters in C<DynamoDBAction>. The
54 expressions accept literals, operators, functions, references, and
55 substitution templates.
56  
57 B<Examples>
58  
59 =over
60  
61 =item *
62  
63 For literal values, the expressions must contain single quotes. For
64 example, the value for the C<hashKeyType> parameter can be C<'STRING'>.
65  
66 =item *
67  
68 For references, you must specify either variables or input values. For
69 example, the value for the C<hashKeyField> parameter can be
70 C<$input.GreenhouseInput.name>.
71  
72 =item *
73  
74 For a substitution template, you must use C<${}>, and the template must
75 be in single quotes. A substitution template can also contain a
76 combination of literals, operators, functions, references, and
77 substitution templates.
78  
79 In the following example, the value for the C<hashKeyValue> parameter
80 uses a substitution template.
81  
82 C<'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'>
83  
84 =item *
85  
86 For a string concatenation, you must use C<+>. A string concatenation
87 can also contain a combination of literals, operators, functions,
88 references, and substitution templates.
89  
90 In the following example, the value for the C<tableName> parameter uses
91 a string concatenation.
92  
93 C<'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date>
94  
95 =back
96  
97 For more information, see Expressions
98 (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html)
99 in the I<AWS IoT Events Developer Guide>.
100  
101 If the defined payload type is a string, C<DynamoDBAction> writes
102 non-JSON data to the DynamoDB table as binary data. The DynamoDB
103 console displays the data as Base64-encoded text. The value for the
104 C<payloadField> parameter is C<E<lt>payload-fieldE<gt>_raw>.
105  
106 =head1 ATTRIBUTES
107  
108  
109 =head2 B<REQUIRED> HashKeyField => Str
110  
111 The name of the hash key (also called the partition key). The
112 C<hashKeyField> value must match the partition key of the target
113 DynamoDB table.
114  
115  
116 =head2 HashKeyType => Str
117  
118 The data type for the hash key (also called the partition key). You can
119 specify the following values:
120  
121 =over
122  
123 =item *
124  
125 C<'STRING'> - The hash key is a string.
126  
127 =item *
128  
129 C<'NUMBER'> - The hash key is a number.
130  
131 =back
132  
133 If you don't specify C<hashKeyType>, the default value is C<'STRING'>.
134  
135  
136 =head2 B<REQUIRED> HashKeyValue => Str
137  
138 The value of the hash key (also called the partition key).
139  
140  
141 =head2 Operation => Str
142  
143 The type of operation to perform. You can specify the following values:
144  
145 =over
146  
147 =item *
148  
149 C<'INSERT'> - Insert data as a new item into the DynamoDB table. This
150 item uses the specified hash key as a partition key. If you specified a
151 range key, the item uses the range key as a sort key.
152  
153 =item *
154  
155 C<'UPDATE'> - Update an existing item of the DynamoDB table with new
156 data. This item's partition key must match the specified hash key. If
157 you specified a range key, the range key must match the item's sort
158 key.
159  
160 =item *
161  
162 C<'DELETE'> - Delete an existing item of the DynamoDB table. This
163 item's partition key must match the specified hash key. If you
164 specified a range key, the range key must match the item's sort key.
165  
166 =back
167  
168 If you don't specify this parameter, AWS IoT Events triggers the
169 C<'INSERT'> operation.
170  
171  
172 =head2 Payload => L<Paws::IoTEvents::Payload>
173  
174  
175  
176  
177 =head2 PayloadField => Str
178  
179 The name of the DynamoDB column that receives the action payload.
180  
181 If you don't specify this parameter, the name of the DynamoDB column is
182 C<payload>.
183  
184  
185 =head2 RangeKeyField => Str
186  
187 The name of the range key (also called the sort key). The
188 C<rangeKeyField> value must match the sort key of the target DynamoDB
189 table.
190  
191  
192 =head2 RangeKeyType => Str
193  
194 The data type for the range key (also called the sort key), You can
195 specify the following values:
196  
197 =over
198  
199 =item *
200  
201 C<'STRING'> - The range key is a string.
202  
203 =item *
204  
205 C<'NUMBER'> - The range key is number.
206  
207 =back
208  
209 If you don't specify C<rangeKeyField>, the default value is
210 C<'STRING'>.
211  
212  
213 =head2 RangeKeyValue => Str
214  
215 The value of the range key (also called the sort key).
216  
217  
218 =head2 B<REQUIRED> TableName => Str
219  
220 The name of the DynamoDB table. The C<tableName> value must match the
221 table name of the target DynamoDB table.
222  
223  
224  
225 =head1 SEE ALSO
226  
227 This class forms part of L<Paws>, describing an object used in L<Paws::IoTEvents>
228  
229 =head1 BUGS and CONTRIBUTIONS
230  
231 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
232  
233 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
234  
235 =cut
236