blib/lib/Paws/DynamoDB/Scan.pm

filter: Statementstmt 100% 26 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 28 / 28 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/DynamoDB/SSEDescription.pm ↑ Summary blib/lib/Paws/DynamoDB/ScanOutput.pm »
1  
2 package Paws::DynamoDB::Scan;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has AttributesToGet => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
5 1 has ConditionalOperator => (is => 'ro', isa => 'Str');
6 1 has ConsistentRead => (is => 'ro', isa => 'Bool');
7 1 has ExclusiveStartKey => (is => 'ro', isa => 'Paws::DynamoDB::Key');
8 1 has ExpressionAttributeNames => (is => 'ro', isa => 'Paws::DynamoDB::ExpressionAttributeNameMap');
9 1 has ExpressionAttributeValues => (is => 'ro', isa => 'Paws::DynamoDB::ExpressionAttributeValueMap');
10 1 has FilterExpression => (is => 'ro', isa => 'Str');
11 1 has IndexName => (is => 'ro', isa => 'Str');
12 1 has Limit => (is => 'ro', isa => 'Int');
13 1 has ProjectionExpression => (is => 'ro', isa => 'Str');
14 1 has ReturnConsumedCapacity => (is => 'ro', isa => 'Str');
15 1 has ScanFilter => (is => 'ro', isa => 'Paws::DynamoDB::FilterConditionMap');
16 1 has Segment => (is => 'ro', isa => 'Int');
17 1 has Select => (is => 'ro', isa => 'Str');
18 1 has TableName => (is => 'ro', isa => 'Str', required => 1);
19 1 has TotalSegments => (is => 'ro', isa => 'Int');
20  
21 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'Scan');
24 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DynamoDB::ScanOutput');
25 1 class_has _result_key => (isa => 'Str', is => 'ro');
26 1 1;
27  
28 ### main pod documentation begin ###
29  
30 =head1 NAME
31  
32 Paws::DynamoDB::Scan - Arguments for method Scan on L<Paws::DynamoDB>
33  
34 =head1 DESCRIPTION
35  
36 This class represents the parameters used for calling the method Scan on the
37 L<Amazon DynamoDB|Paws::DynamoDB> service. Use the attributes of this class
38 as arguments to method Scan.
39  
40 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Scan.
41  
42 =head1 SYNOPSIS
43  
44 my $dynamodb = Paws->service('DynamoDB');
45 # To scan a table
46 # This example scans the entire Music table, and then narrows the results to
47 # songs by the artist "No One You Know". For each item, only the album title and
48 # song title are returned.
49 my $ScanOutput = $dynamodb->Scan(
50 'ExpressionAttributeNames' => {
51 '#AT' => 'AlbumTitle',
52 '#ST' => 'SongTitle'
53 },
54 'ExpressionAttributeValues' => {
55 ':a' => {
56 'S' => 'No One You Know'
57 }
58 },
59 'FilterExpression' => 'Artist = :a',
60 'ProjectionExpression' => '#ST, #AT',
61 'TableName' => 'Music'
62 );
63  
64 # Results:
65 my $ConsumedCapacity = $ScanOutput->ConsumedCapacity;
66 my $Count = $ScanOutput->Count;
67 my $Items = $ScanOutput->Items;
68 my $ScannedCount = $ScanOutput->ScannedCount;
69  
70 # Returns a L<Paws::DynamoDB::ScanOutput> object.
71  
72 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.
73 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/dynamodb/Scan>
74  
75 =head1 ATTRIBUTES
76  
77  
78 =head2 AttributesToGet => ArrayRef[Str|Undef]
79  
80 This is a legacy parameter. Use C<ProjectionExpression> instead. For
81 more information, see AttributesToGet
82 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html)
83 in the I<Amazon DynamoDB Developer Guide>.
84  
85  
86  
87 =head2 ConditionalOperator => Str
88  
89 This is a legacy parameter. Use C<FilterExpression> instead. For more
90 information, see ConditionalOperator
91 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html)
92 in the I<Amazon DynamoDB Developer Guide>.
93  
94 Valid values are: C<"AND">, C<"OR">
95  
96 =head2 ConsistentRead => Bool
97  
98 A Boolean value that determines the read consistency model during the
99 scan:
100  
101 =over
102  
103 =item *
104  
105 If C<ConsistentRead> is C<false>, then the data returned from C<Scan>
106 might not contain the results from other recently completed write
107 operations (C<PutItem>, C<UpdateItem>, or C<DeleteItem>).
108  
109 =item *
110  
111 If C<ConsistentRead> is C<true>, then all of the write operations that
112 completed before the C<Scan> began are guaranteed to be contained in
113 the C<Scan> response.
114  
115 =back
116  
117 The default setting for C<ConsistentRead> is C<false>.
118  
119 The C<ConsistentRead> parameter is not supported on global secondary
120 indexes. If you scan a global secondary index with C<ConsistentRead>
121 set to true, you will receive a C<ValidationException>.
122  
123  
124  
125 =head2 ExclusiveStartKey => L<Paws::DynamoDB::Key>
126  
127 The primary key of the first item that this operation will evaluate.
128 Use the value that was returned for C<LastEvaluatedKey> in the previous
129 operation.
130  
131 The data type for C<ExclusiveStartKey> must be String, Number or
132 Binary. No set data types are allowed.
133  
134 In a parallel scan, a C<Scan> request that includes
135 C<ExclusiveStartKey> must specify the same segment whose previous
136 C<Scan> returned the corresponding value of C<LastEvaluatedKey>.
137  
138  
139  
140 =head2 ExpressionAttributeNames => L<Paws::DynamoDB::ExpressionAttributeNameMap>
141  
142 One or more substitution tokens for attribute names in an expression.
143 The following are some use cases for using C<ExpressionAttributeNames>:
144  
145 =over
146  
147 =item *
148  
149 To access an attribute whose name conflicts with a DynamoDB reserved
150 word.
151  
152 =item *
153  
154 To create a placeholder for repeating occurrences of an attribute name
155 in an expression.
156  
157 =item *
158  
159 To prevent special characters in an attribute name from being
160 misinterpreted in an expression.
161  
162 =back
163  
164 Use the B<#> character in an expression to dereference an attribute
165 name. For example, consider the following attribute name:
166  
167 =over
168  
169 =item *
170  
171 C<Percentile>
172  
173 =back
174  
175 The name of this attribute conflicts with a reserved word, so it cannot
176 be used directly in an expression. (For the complete list of reserved
177 words, see Reserved Words
178 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html)
179 in the I<Amazon DynamoDB Developer Guide>). To work around this, you
180 could specify the following for C<ExpressionAttributeNames>:
181  
182 =over
183  
184 =item *
185  
186 C<{"#P":"Percentile"}>
187  
188 =back
189  
190 You could then use this substitution in an expression, as in this
191 example:
192  
193 =over
194  
195 =item *
196  
197 C<#P = :val>
198  
199 =back
200  
201 Tokens that begin with the B<:> character are I<expression attribute
202 values>, which are placeholders for the actual value at runtime.
203  
204 For more information on expression attribute names, see Specifying Item
205 Attributes
206 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
207 in the I<Amazon DynamoDB Developer Guide>.
208  
209  
210  
211 =head2 ExpressionAttributeValues => L<Paws::DynamoDB::ExpressionAttributeValueMap>
212  
213 One or more values that can be substituted in an expression.
214  
215 Use the B<:> (colon) character in an expression to dereference an
216 attribute value. For example, suppose that you wanted to check whether
217 the value of the C<ProductStatus> attribute was one of the following:
218  
219 C<Available | Backordered | Discontinued>
220  
221 You would first need to specify C<ExpressionAttributeValues> as
222 follows:
223  
224 C<{ ":avail":{"S":"Available"}, ":back":{"S":"Backordered"},
225 ":disc":{"S":"Discontinued"} }>
226  
227 You could then use these values in an expression, such as this:
228  
229 C<ProductStatus IN (:avail, :back, :disc)>
230  
231 For more information on expression attribute values, see Condition
232 Expressions
233 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html)
234 in the I<Amazon DynamoDB Developer Guide>.
235  
236  
237  
238 =head2 FilterExpression => Str
239  
240 A string that contains conditions that DynamoDB applies after the
241 C<Scan> operation, but before the data is returned to you. Items that
242 do not satisfy the C<FilterExpression> criteria are not returned.
243  
244 A C<FilterExpression> is applied after the items have already been
245 read; the process of filtering does not consume any additional read
246 capacity units.
247  
248 For more information, see Filter Expressions
249 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults)
250 in the I<Amazon DynamoDB Developer Guide>.
251  
252  
253  
254 =head2 IndexName => Str
255  
256 The name of a secondary index to scan. This index can be any local
257 secondary index or global secondary index. Note that if you use the
258 C<IndexName> parameter, you must also provide C<TableName>.
259  
260  
261  
262 =head2 Limit => Int
263  
264 The maximum number of items to evaluate (not necessarily the number of
265 matching items). If DynamoDB processes the number of items up to the
266 limit while processing the results, it stops the operation and returns
267 the matching values up to that point, and a key in C<LastEvaluatedKey>
268 to apply in a subsequent operation, so that you can pick up where you
269 left off. Also, if the processed dataset size exceeds 1 MB before
270 DynamoDB reaches this limit, it stops the operation and returns the
271 matching values up to the limit, and a key in C<LastEvaluatedKey> to
272 apply in a subsequent operation to continue the operation. For more
273 information, see Working with Queries
274 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html)
275 in the I<Amazon DynamoDB Developer Guide>.
276  
277  
278  
279 =head2 ProjectionExpression => Str
280  
281 A string that identifies one or more attributes to retrieve from the
282 specified table or index. These attributes can include scalars, sets,
283 or elements of a JSON document. The attributes in the expression must
284 be separated by commas.
285  
286 If no attribute names are specified, then all attributes will be
287 returned. If any of the requested attributes are not found, they will
288 not appear in the result.
289  
290 For more information, see Specifying Item Attributes
291 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html)
292 in the I<Amazon DynamoDB Developer Guide>.
293  
294  
295  
296 =head2 ReturnConsumedCapacity => Str
297  
298  
299  
300 Valid values are: C<"INDEXES">, C<"TOTAL">, C<"NONE">
301  
302 =head2 ScanFilter => L<Paws::DynamoDB::FilterConditionMap>
303  
304 This is a legacy parameter. Use C<FilterExpression> instead. For more
305 information, see ScanFilter
306 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ScanFilter.html)
307 in the I<Amazon DynamoDB Developer Guide>.
308  
309  
310  
311 =head2 Segment => Int
312  
313 For a parallel C<Scan> request, C<Segment> identifies an individual
314 segment to be scanned by an application worker.
315  
316 Segment IDs are zero-based, so the first segment is always 0. For
317 example, if you want to use four application threads to scan a table or
318 an index, then the first thread specifies a C<Segment> value of 0, the
319 second thread specifies 1, and so on.
320  
321 The value of C<LastEvaluatedKey> returned from a parallel C<Scan>
322 request must be used as C<ExclusiveStartKey> with the same segment ID
323 in a subsequent C<Scan> operation.
324  
325 The value for C<Segment> must be greater than or equal to 0, and less
326 than the value provided for C<TotalSegments>.
327  
328 If you provide C<Segment>, you must also provide C<TotalSegments>.
329  
330  
331  
332 =head2 Select => Str
333  
334 The attributes to be returned in the result. You can retrieve all item
335 attributes, specific item attributes, the count of matching items, or
336 in the case of an index, some or all of the attributes projected into
337 the index.
338  
339 =over
340  
341 =item *
342  
343 C<ALL_ATTRIBUTES> - Returns all of the item attributes from the
344 specified table or index. If you query a local secondary index, then
345 for each matching item in the index, DynamoDB fetches the entire item
346 from the parent table. If the index is configured to project all item
347 attributes, then all of the data can be obtained from the local
348 secondary index, and no fetching is required.
349  
350 =item *
351  
352 C<ALL_PROJECTED_ATTRIBUTES> - Allowed only when querying an index.
353 Retrieves all attributes that have been projected into the index. If
354 the index is configured to project all attributes, this return value is
355 equivalent to specifying C<ALL_ATTRIBUTES>.
356  
357 =item *
358  
359 C<COUNT> - Returns the number of matching items, rather than the
360 matching items themselves.
361  
362 =item *
363  
364 C<SPECIFIC_ATTRIBUTES> - Returns only the attributes listed in
365 C<AttributesToGet>. This return value is equivalent to specifying
366 C<AttributesToGet> without specifying any value for C<Select>.
367  
368 If you query or scan a local secondary index and request only
369 attributes that are projected into that index, the operation reads only
370 the index and not the table. If any of the requested attributes are not
371 projected into the local secondary index, DynamoDB fetches each of
372 these attributes from the parent table. This extra fetching incurs
373 additional throughput cost and latency.
374  
375 If you query or scan a global secondary index, you can only request
376 attributes that are projected into the index. Global secondary index
377 queries cannot fetch attributes from the parent table.
378  
379 =back
380  
381 If neither C<Select> nor C<AttributesToGet> are specified, DynamoDB
382 defaults to C<ALL_ATTRIBUTES> when accessing a table, and
383 C<ALL_PROJECTED_ATTRIBUTES> when accessing an index. You cannot use
384 both C<Select> and C<AttributesToGet> together in a single request,
385 unless the value for C<Select> is C<SPECIFIC_ATTRIBUTES>. (This usage
386 is equivalent to specifying C<AttributesToGet> without any value for
387 C<Select>.)
388  
389 If you use the C<ProjectionExpression> parameter, then the value for
390 C<Select> can only be C<SPECIFIC_ATTRIBUTES>. Any other value for
391 C<Select> will return an error.
392  
393 Valid values are: C<"ALL_ATTRIBUTES">, C<"ALL_PROJECTED_ATTRIBUTES">, C<"SPECIFIC_ATTRIBUTES">, C<"COUNT">
394  
395 =head2 B<REQUIRED> TableName => Str
396  
397 The name of the table containing the requested items; or, if you
398 provide C<IndexName>, the name of the table to which that index
399 belongs.
400  
401  
402  
403 =head2 TotalSegments => Int
404  
405 For a parallel C<Scan> request, C<TotalSegments> represents the total
406 number of segments into which the C<Scan> operation will be divided.
407 The value of C<TotalSegments> corresponds to the number of application
408 workers that will perform the parallel scan. For example, if you want
409 to use four application threads to scan a table or an index, specify a
410 C<TotalSegments> value of 4.
411  
412 The value for C<TotalSegments> must be greater than or equal to 1, and
413 less than or equal to 1000000. If you specify a C<TotalSegments> value
414 of 1, the C<Scan> operation will be sequential rather than parallel.
415  
416 If you specify C<TotalSegments>, you must also specify C<Segment>.
417  
418  
419  
420  
421 =head1 SEE ALSO
422  
423 This class forms part of L<Paws>, documenting arguments for method Scan in L<Paws::DynamoDB>
424  
425 =head1 BUGS and CONTRIBUTIONS
426  
427 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
428  
429 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
430  
431 =cut
432  
« blib/lib/Paws/DynamoDB/SSEDescription.pm ↑ Summary blib/lib/Paws/DynamoDB/ScanOutput.pm »