class Aws::DynamoDB::Types::ScanInput


@see docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ScanInput AWS API Documentation
@return [Boolean]
set to true, you will receive a ‘ValidationException`.
indexes. If you scan a global secondary index with `ConsistentRead`
The `ConsistentRead` parameter is not supported on global secondary
The default setting for `ConsistentRead` is `false`.
contained in the `Scan` response.
that completed before the `Scan` began are guaranteed to be
* If `ConsistentRead` is `true`, then all of the write operations
operations (PutItem, UpdateItem or DeleteItem).
might not contain the results from other recently completed write
* If `ConsistentRead` is `false`, then the data returned from `Scan`
the scan:
A Boolean value that determines the read consistency model during
@!attribute [rw] consistent_read
@return [Hash<String,Types::AttributeValue>]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html<br><br><br><br>Conditions][1] in the *Amazon DynamoDB Developer Guide*.
For more information on expression attribute values, see [Specifying
`ProductStatus IN (:avail, :back, :disc)`
You could then use these values in an expression, such as this:
“:disc”:{“S”:“Discontinued”} }`
`{ “:avail”:{“S”:“Available”}, “:back”:{“S”:“Backordered”},
follows:
You would first need to specify `ExpressionAttributeValues` as
`Available | Backordered | Discontinued`
following:
whether the value of the ProductStatus attribute was one of the
attribute value. For example, suppose that you wanted to check
Use the : (colon) character in an expression to dereference an
One or more values that can be substituted in an expression.
@!attribute [rw] expression_attribute_values
@return [Hash<String,String>]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html<br>[1]: docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html<br><br><br><br>Item Attributes] in the *Amazon DynamoDB Developer Guide*.
For more information on expression attribute names, see [Accessing
</note>
runtime.
attribute values*, which are placeholders for the actual value at
<note markdown=“1”> Tokens that begin with the : character are *expression
^
* `#P = :val`
example:
You could then use this substitution in an expression, as in this
^
* `{“#P”:“Percentile”}`
following for `ExpressionAttributeNames`:
Developer Guide*). To work around this, you could specify the
reserved words, see [Reserved Words] in the *Amazon DynamoDB
cannot be used directly in an expression. (For the complete list of
The name of this attribute conflicts with a reserved word, so it
^
* `Percentile`
name. For example, consider the following attribute name:
Use the **#** character in an expression to dereference an attribute
misinterpreted in an expression.
* To prevent special characters in an attribute name from being
name in an expression.
* To create a placeholder for repeating occurrences of an attribute
reserved word.
* To access an attribute whose name conflicts with a DynamoDB
`ExpressionAttributeNames`:
expression. The following are some use cases for using
One or more substitution tokens for attribute names in an
@!attribute [rw] expression_attribute_names
@return [String]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults<br><br><br><br>DynamoDB Developer Guide*.
For more information, see [Filter Expressions] in the *Amazon
</note>
capacity units.
read; the process of filtering does not consume any additional read
<note markdown=“1”> A `FilterExpression` is applied after the items have already been
do not satisfy the `FilterExpression` criteria are not returned.
`Scan` operation, but before the data is returned to you. Items that
A string that contains conditions that DynamoDB applies after the
@!attribute [rw] filter_expression
@return [String]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html<br><br><br><br>*Amazon DynamoDB Developer Guide*.
For more information, see [Accessing Item Attributes] in the
will not appear in the result.
returned. If any of the requested attributes are not found, they
If no attribute names are specified, then all attributes will be
expression must be separated by commas.
sets, or elements of a JSON document. The attributes in the
specified table or index. These attributes can include scalars,
A string that identifies one or more attributes to retrieve from the
@!attribute [rw] projection_expression
@return [Integer]
If you provide `Segment`, you must also provide `TotalSegments`.
than the value provided for `TotalSegments`.
The value for `Segment` must be greater than or equal to 0, and less
in a subsequent `Scan` operation.
request must be used as `ExclusiveStartKey` with the same segment ID
The value of `LastEvaluatedKey` returned from a parallel `Scan`
the second thread specifies 1, and so on.
or an index, then the first thread specifies a `Segment` value of 0,
example, if you want to use four application threads to scan a table
Segment IDs are zero-based, so the first segment is always 0. For
segment to be scanned by an application worker.
For a parallel `Scan` request, `Segment` identifies an individual
@!attribute [rw] segment
@return [Integer]
If you specify `TotalSegments`, you must also specify `Segment`.
parallel.
value of 1, the `Scan` operation will be sequential rather than
and less than or equal to 1000000. If you specify a `TotalSegments`
The value for `TotalSegments` must be greater than or equal to 1,
or an index, specify a `TotalSegments` value of 4.
example, if you want to use four application threads to scan a table
application workers that will perform the parallel scan. For
The value of `TotalSegments` corresponds to the number of
number of segments into which the `Scan` operation will be divided.
For a parallel `Scan` request, `TotalSegments` represents the total
@!attribute [rw] total_segments
@return [String]
response.
* `NONE` - No `ConsumedCapacity` details are included in the
`ConsumedCapacity` for the operation.
* `TOTAL` - The response includes only the aggregate
table(s).
`INDEXES` will only return `ConsumedCapacity` information for
do not access any indexes at all. In these cases, specifying
Note that some operations, such as `GetItem` and `BatchGetItem`,
and secondary index that was accessed.
for the operation, together with `ConsumedCapacity` for each table
* `INDEXES` - The response includes the aggregate `ConsumedCapacity`
consumption that is returned in the response:
Determines the level of detail about provisioned throughput
@!attribute [rw] return_consumed_capacity
@return [Hash<String,Types::AttributeValue>]
`Scan` returned the corresponding value of `LastEvaluatedKey`.
`ExclusiveStartKey` must specify the same segment whose previous
In a parallel scan, a `Scan` request that includes
Binary. No set data types are allowed.
The data type for `ExclusiveStartKey` must be String, Number or
previous operation.
Use the value that was returned for `LastEvaluatedKey` in the
The primary key of the first item that this operation will evaluate.
@!attribute [rw] exclusive_start_key
@return [String]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ConditionalOperator.html<br><br><br><br>Developer Guide*.
information, see [ConditionalOperator] in the *Amazon DynamoDB
This is a legacy parameter. Use `FilterExpression` instead. For more
@!attribute [rw] conditional_operator
@return [Hash<String,Types::Condition>]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.ScanFilter.html<br><br><br><br>Guide*.
information, see [ScanFilter] in the *Amazon DynamoDB Developer
This is a legacy parameter. Use `FilterExpression` instead. For more
@!attribute [rw] scan_filter
@return [String]
</note>
`Select` will return an error.
`Select` can only be `SPECIFIC_ATTRIBUTES`. Any other value for
<note markdown=“1”> If you use the `ProjectionExpression` parameter, then the value for
`Select`.)
is equivalent to specifying `AttributesToGet` without any value for
unless the value for `Select` is `SPECIFIC_ATTRIBUTES`. (This usage
both `Select` and `AttributesToGet` together in a single request,
`ALL_PROJECTED_ATTRIBUTES` when accessing an index. You cannot use
defaults to `ALL_ATTRIBUTES` when accessing a table, and
If neither `Select` nor `AttributesToGet` are specified, DynamoDB
table.
secondary index queries cannot fetch attributes from the parent
request attributes that are projected into the index. Global
If you query or scan a global secondary index, you can only
latency.
table. This extra fetching incurs additional throughput cost and
DynamoDB will fetch each of these attributes from the parent
attributes are not projected into the local secondary index,
read only the index and not the table. If any of the requested
attributes that are projected into that index, the operation will
If you query or scan a local secondary index and request only
`AttributesToGet` without specifying any value for `Select`.
`AttributesToGet`. This return value is equivalent to specifying
* `SPECIFIC_ATTRIBUTES` - Returns only the attributes listed in
matching items themselves.
* `COUNT` - Returns the number of matching items, rather than the
value is equivalent to specifying `ALL_ATTRIBUTES`.
If the index is configured to project all attributes, this return
Retrieves all attributes that have been projected into the index.
* `ALL_PROJECTED_ATTRIBUTES` - Allowed only when querying an index.
from the local secondary index, and no fetching is required.
project all item attributes, then all of the data can be obtained
entire item from the parent table. If the index is configured to
then for each matching item in the index DynamoDB will fetch the
specified table or index. If you query a local secondary index,
* `ALL_ATTRIBUTES` - Returns all of the item attributes from the
projected into the index.
items, or in the case of an index, some or all of the attributes
item attributes, specific item attributes, the count of matching
The attributes to be returned in the result. You can retrieve all
@!attribute [rw] select
@return [Integer]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html<br><br><br><br>*Amazon DynamoDB Developer Guide*.
the operation. For more information, see [Query and Scan] in the
in `LastEvaluatedKey` to apply in a subsequent operation to continue
operation and returns the matching values up to the limit, and a key
exceeds 1 MB before DynamoDB reaches this limit, it stops the
can pick up where you left off. Also, if the processed data set size
`LastEvaluatedKey` to apply in a subsequent operation, so that you
returns the matching values up to that point, and a key in
the limit while processing the results, it stops the operation and
of matching items). If DynamoDB processes the number of items up to
The maximum number of items to evaluate (not necessarily the number
@!attribute [rw] limit
@return [Array<String>]<br>: docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html<br><br><br><br>Developer Guide*.
more information, see [AttributesToGet] in the *Amazon DynamoDB
This is a legacy parameter. Use `ProjectionExpression` instead. For
@!attribute [rw] attributes_to_get
@return [String]
`IndexName` parameter, you must also provide `TableName`.
secondary index or global secondary index. Note that if you use the
The name of a secondary index to scan. This index can be any local
@!attribute [rw] index_name
@return [String]
belongs.
provide `IndexName`, the name of the table to which that index
The name of the table containing the requested items; or, if you
@!attribute [rw] table_name
}
consistent_read: false,
},
“ExpressionAttributeValueVariable” => “value”, # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
expression_attribute_values: {
},
“ExpressionAttributeNameVariable” => “AttributeName”,
expression_attribute_names: {
filter_expression: “ConditionExpression”,
projection_expression: “ProjectionExpression”,
segment: 1,
total_segments: 1,
return_consumed_capacity: “INDEXES”, # accepts INDEXES, TOTAL, NONE
},
“AttributeName” => “value”, # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
exclusive_start_key: {
conditional_operator: “AND”, # accepts AND, OR
},
},
comparison_operator: “EQ”, # required, accepts EQ, NE, IN, LE, LT, GE, GT, BETWEEN, NOT_NULL, NULL, CONTAINS, NOT_CONTAINS, BEGINS_WITH
attribute_value_list: [“value”], # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
“AttributeName” => {
scan_filter: {
select: “ALL_ATTRIBUTES”, # accepts ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT
limit: 1,
attributes_to_get: [“AttributeName”],
index_name: “IndexName”,
table_name: “TableName”, # required
{
data as a hash:
@note When making an API call, you may pass ScanInput
Represents the input of a `Scan` operation.