blib/lib/Paws/DynamoDB/DeleteItem.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 21 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::DynamoDB::DeleteItem;
3 use Moose;
4 has ConditionalOperator => (is => 'ro', isa => 'Str');
5 has ConditionExpression => (is => 'ro', isa => 'Str');
6 has Expected => (is => 'ro', isa => 'Paws::DynamoDB::ExpectedAttributeMap');
7 has ExpressionAttributeNames => (is => 'ro', isa => 'Paws::DynamoDB::ExpressionAttributeNameMap');
8 has ExpressionAttributeValues => (is => 'ro', isa => 'Paws::DynamoDB::ExpressionAttributeValueMap');
9 has Key => (is => 'ro', isa => 'Paws::DynamoDB::Key', required => 1);
10 has ReturnConsumedCapacity => (is => 'ro', isa => 'Str');
11 has ReturnItemCollectionMetrics => (is => 'ro', isa => 'Str');
12 has ReturnValues => (is => 'ro', isa => 'Str');
13 has TableName => (is => 'ro', isa => 'Str', required => 1);
14  
15 use MooseX::ClassAttribute;
16  
17 class_has _api_call => (isa => 'Str', is => 'ro', default => 'DeleteItem');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DynamoDB::DeleteItemOutput');
19 class_has _result_key => (isa => 'Str', is => 'ro');
20 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::DynamoDB::DeleteItem - Arguments for method DeleteItem on L<Paws::DynamoDB>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method DeleteItem on the
31 L<Amazon DynamoDB|Paws::DynamoDB> service. Use the attributes of this class
32 as arguments to method DeleteItem.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DeleteItem.
35  
36 =head1 SYNOPSIS
37  
38 my $dynamodb = Paws->service('DynamoDB');
39 # To delete an item
40 # This example deletes an item from the Music table.
41 my $DeleteItemOutput = $dynamodb->DeleteItem(
42 'Key' => {
43 'Artist' => {
44 'S' => 'No One You Know'
45 },
46 'SongTitle' => {
47 'S' => 'Scared of My Shadow'
48 }
49 },
50 'TableName' => 'Music'
51 );
52  
53 # Results:
54 my $ConsumedCapacity = $DeleteItemOutput->ConsumedCapacity;
55  
56 # Returns a L<Paws::DynamoDB::DeleteItemOutput> object.
57  
58 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.
59 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/dynamodb/DeleteItem>
60  
61 =head1 ATTRIBUTES
62  
63  
64 =head2 ConditionalOperator => Str
65  
66 This is a legacy parameter. Use C<ConditionExpression> instead. For
67 more information, see ConditionalOperator
68 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
69 in the I<Amazon DynamoDB Developer Guide>.
70  
71 Valid values are: C<"AND">, C<"OR">
72  
73 =head2 ConditionExpression => Str
74  
75 A condition that must be satisfied in order for a conditional
76 C<DeleteItem> to succeed.
77  
78 An expression can contain any of the following:
79  
80 =over
81  
82 =item *
83  
84 Functions: C<attribute_exists | attribute_not_exists | attribute_type |
85 contains | begins_with | size>
86  
87 These function names are case-sensitive.
88  
89 =item *
90  
91 Comparison operators: C<= | E<lt>E<gt> | E<lt> | E<gt> | E<lt>= |
92 E<gt>= | BETWEEN | IN>
93  
94 =item *
95  
96 Logical operators: C<AND | OR | NOT>
97  
98 =back
99  
100 For more information about condition expressions, see Condition
101 Expressions
102 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
103 in the I<Amazon DynamoDB Developer Guide>.
104  
105  
106  
107 =head2 Expected => L<Paws::DynamoDB::ExpectedAttributeMap>
108  
109 This is a legacy parameter. Use C<ConditionExpression> instead. For
110 more information, see Expected
111 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html)
112 in the I<Amazon DynamoDB Developer Guide>.
113  
114  
115  
116 =head2 ExpressionAttributeNames => L<Paws::DynamoDB::ExpressionAttributeNameMap>
117  
118 One or more substitution tokens for attribute names in an expression.
119 The following are some use cases for using C<ExpressionAttributeNames>:
120  
121 =over
122  
123 =item *
124  
125 To access an attribute whose name conflicts with a DynamoDB reserved
126 word.
127  
128 =item *
129  
130 To create a placeholder for repeating occurrences of an attribute name
131 in an expression.
132  
133 =item *
134  
135 To prevent special characters in an attribute name from being
136 misinterpreted in an expression.
137  
138 =back
139  
140 Use the B<#> character in an expression to dereference an attribute
141 name. For example, consider the following attribute name:
142  
143 =over
144  
145 =item *
146  
147 C<Percentile>
148  
149 =back
150  
151 The name of this attribute conflicts with a reserved word, so it cannot
152 be used directly in an expression. (For the complete list of reserved
153 words, see Reserved Words
154 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
155 in the I<Amazon DynamoDB Developer Guide>). To work around this, you
156 could specify the following for C<ExpressionAttributeNames>:
157  
158 =over
159  
160 =item *
161  
162 C<{"#P":"Percentile"}>
163  
164 =back
165  
166 You could then use this substitution in an expression, as in this
167 example:
168  
169 =over
170  
171 =item *
172  
173 C<#P = :val>
174  
175 =back
176  
177 Tokens that begin with the B<:> character are I<expression attribute
178 values>, which are placeholders for the actual value at runtime.
179  
180 For more information on expression attribute names, see Specifying Item
181 Attributes
182 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
183 in the I<Amazon DynamoDB Developer Guide>.
184  
185  
186  
187 =head2 ExpressionAttributeValues => L<Paws::DynamoDB::ExpressionAttributeValueMap>
188  
189 One or more values that can be substituted in an expression.
190  
191 Use the B<:> (colon) character in an expression to dereference an
192 attribute value. For example, suppose that you wanted to check whether
193 the value of the I<ProductStatus> attribute was one of the following:
194  
195 C<Available | Backordered | Discontinued>
196  
197 You would first need to specify C<ExpressionAttributeValues> as
198 follows:
199  
200 C<{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},
201 ":disc":{"S":"Discontinued"} }>
202  
203 You could then use these values in an expression, such as this:
204  
205 C<ProductStatus IN (:avail, :back, :disc)>
206  
207 For more information on expression attribute values, see Condition
208 Expressions
209 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
210 in the I<Amazon DynamoDB Developer Guide>.
211  
212  
213  
214 =head2 B<REQUIRED> Key => L<Paws::DynamoDB::Key>
215  
216 A map of attribute names to C<AttributeValue> objects, representing the
217 primary key of the item to delete.
218  
219 For the primary key, you must provide all of the attributes. For
220 example, with a simple primary key, you only need to provide a value
221 for the partition key. For a composite primary key, you must provide
222 values for both the partition key and the sort key.
223  
224  
225  
226 =head2 ReturnConsumedCapacity => Str
227  
228  
229  
230 Valid values are: C<"INDEXES">, C<"TOTAL">, C<"NONE">
231  
232 =head2 ReturnItemCollectionMetrics => Str
233  
234 Determines whether item collection metrics are returned. If set to
235 C<SIZE>, the response includes statistics about item collections, if
236 any, that were modified during the operation are returned in the
237 response. If set to C<NONE> (the default), no statistics are returned.
238  
239 Valid values are: C<"SIZE">, C<"NONE">
240  
241 =head2 ReturnValues => Str
242  
243 Use C<ReturnValues> if you want to get the item attributes as they
244 appeared before they were deleted. For C<DeleteItem>, the valid values
245 are:
246  
247 =over
248  
249 =item *
250  
251 C<NONE> - If C<ReturnValues> is not specified, or if its value is
252 C<NONE>, then nothing is returned. (This setting is the default for
253 C<ReturnValues>.)
254  
255 =item *
256  
257 C<ALL_OLD> - The content of the old item is returned.
258  
259 =back
260  
261 The C<ReturnValues> parameter is used by several DynamoDB operations;
262 however, C<DeleteItem> does not recognize any values other than C<NONE>
263 or C<ALL_OLD>.
264  
265 Valid values are: C<"NONE">, C<"ALL_OLD">, C<"UPDATED_OLD">, C<"ALL_NEW">, C<"UPDATED_NEW">
266  
267 =head2 B<REQUIRED> TableName => Str
268  
269 The name of the table from which to delete the item.
270  
271  
272  
273  
274 =head1 SEE ALSO
275  
276 This class forms part of L<Paws>, documenting arguments for method DeleteItem in L<Paws::DynamoDB>
277  
278 =head1 BUGS and CONTRIBUTIONS
279  
280 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
281  
282 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
283  
284 =cut
285