File Coverage

blib/lib/Paws/DynamoDB/Scan.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


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