Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- Service Configuration
- Errors
- Waiters
- Operations
- Types
- AttributeAction
- ComparisonOperator
- ConditionalOperator
- IndexStatus
- KeyType
- ProjectionType
- ReturnConsumedCapacity
- ReturnItemCollectionMetrics
- ReturnValue
- ScalarAttributeType
- Select
- StreamViewType
- TableStatus
- AttributeDefinition
- AttributeValue
- AttributeValueUpdate
- Capacity
- Condition
- ConsumedCapacity
- CreateGlobalSecondaryIndexAction
- DeleteGlobalSecondaryIndexAction
- DeleteRequest
- ExpectedAttributeValue
- GlobalSecondaryIndex
- GlobalSecondaryIndexDescription
- GlobalSecondaryIndexUpdate
- ItemCollectionMetrics
- KeySchemaElement
- KeysAndAttributes
- LocalSecondaryIndex
- LocalSecondaryIndexDescription
- Projection
- ProvisionedThroughput
- ProvisionedThroughputDescription
- PutRequest
- StreamSpecification
- TableDescription
- UpdateGlobalSecondaryIndexAction
- WriteRequest
Amazon DynamoDB
Overview
This is the Amazon DynamoDB API Reference. This guide provides descriptions and samples of the low-level DynamoDB API. For information about DynamoDB application development, see the Amazon DynamoDB Developer Guide.
Instead of making the requests to the low-level DynamoDB API directly from your application, we recommend that you use the AWS Software Development Kits (SDKs). The easy-to-use libraries in the AWS SDKs make it unnecessary to call the low-level DynamoDB API directly from your application. The libraries take care of request authentication, serialization, and connection management. For more information, see Using the AWS SDKs with DynamoDB in the Amazon DynamoDB Developer Guide.
If you decide to code against the low-level DynamoDB API directly, you will need to write the necessary code to authenticate your requests. For more information on signing your requests, see Using the DynamoDB API in the Amazon DynamoDB Developer Guide.
The following are short descriptions of each low-level API action, organized by function.
Managing Tables
- CreateTable - Creates a table with user-specified provisioned throughput settings. You must designate one attribute as the hash primary key for the table; you can optionally designate a second attribute as the range primary key. DynamoDB creates indexes on these key attributes for fast data access. Optionally, you can create one or more secondary indexes, which provide fast data access using non-key attributes.
- DescribeTable - Returns metadata for a table, such as table size, status, and index information.
- UpdateTable - Modifies the provisioned throughput settings for a table. Optionally, you can modify the provisioned throughput settings for global secondary indexes on the table.
- ListTables - Returns a list of all tables associated with the current AWS account and endpoint.
- DeleteTable - Deletes a table and all of its indexes.
For conceptual information about managing tables, see Working with Tables in the Amazon DynamoDB Developer Guide.
Reading Data
- GetItem - Returns a set of attributes for the item that has a given primary key. By default, GetItem performs an eventually consistent read; however, applications can request a strongly consistent read instead.
- BatchGetItem - Performs multiple GetItem requests for data items using their primary keys, from one table or multiple tables. The response from BatchGetItem has a size limit of 16 MB and returns a maximum of 100 items. Both eventually consistent and strongly consistent reads can be used.
- Query - Returns one or more items from a table or a secondary index. You must provide a specific hash key value. You can narrow the scope of the query using comparison operators against a range key value, or on the index key. Query supports either eventual or strong consistency. A single response has a size limit of 1 MB.
- Scan - Reads every item in a table; the result set is eventually consistent. You can limit the number of items returned by filtering the data attributes, using conditional expressions. Scan can be used to enable ad-hoc querying of a table against non-key attributes; however, since this is a full table scan without using an index, Scan should not be used for any application query use case that requires predictable performance.
For conceptual information about reading data, see Working with Items and Query and Scan Operations in the Amazon DynamoDB Developer Guide.
Modifying Data
- PutItem - Creates a new item, or replaces an existing item with a new item (including all the attributes). By default, if an item in the table already exists with the same primary key, the new item completely replaces the existing item. You can use conditional operators to replace an item only if its attribute values match certain conditions, or to insert a new item only if that item doesn't already exist.
- UpdateItem - Modifies the attributes of an existing item. You can also use conditional operators to perform an update only if the item's attribute values match certain conditions.
- DeleteItem - Deletes an item in a table by primary key. You can use conditional operators to perform a delete an item only if the item's attribute values match certain conditions.
- BatchWriteItem - Performs multiple PutItem and DeleteItem requests across multiple tables in a single request. A failure of any request(s) in the batch will not cause the entire BatchWriteItem operation to fail. Supports batches of up to 25 items to put or delete, with a maximum total request size of 16 MB.
For conceptual information about modifying data, see Working with Items and Query and Scan Operations in the Amazon DynamoDB Developer Guide.
See: AWS API Reference
- dynamoDB :: Service
- _ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _ConditionalCheckFailedException :: AsError a => Getting (First ServiceError) a ServiceError
- _ItemCollectionSizeLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- _LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError
- tableNotExists :: Wait DescribeTable
- tableExists :: Wait DescribeTable
- module Network.AWS.DynamoDB.PutItem
- module Network.AWS.DynamoDB.DeleteItem
- module Network.AWS.DynamoDB.UpdateItem
- module Network.AWS.DynamoDB.DeleteTable
- module Network.AWS.DynamoDB.UpdateTable
- module Network.AWS.DynamoDB.BatchGetItem
- module Network.AWS.DynamoDB.DescribeTable
- module Network.AWS.DynamoDB.GetItem
- module Network.AWS.DynamoDB.BatchWriteItem
- module Network.AWS.DynamoDB.ListTables
- module Network.AWS.DynamoDB.Scan
- module Network.AWS.DynamoDB.Query
- module Network.AWS.DynamoDB.CreateTable
- data AttributeAction
- data ComparisonOperator
- data ConditionalOperator
- data IndexStatus
- data KeyType
- data ProjectionType
- data ReturnConsumedCapacity
- data ReturnItemCollectionMetrics
- data ReturnValue
- = AllNew
- | AllOld
- | None
- | UpdatedNew
- | UpdatedOld
- data ScalarAttributeType
- data Select
- data StreamViewType
- data TableStatus
- data AttributeDefinition
- attributeDefinition :: Text -> ScalarAttributeType -> AttributeDefinition
- adAttributeName :: Lens' AttributeDefinition Text
- adAttributeType :: Lens' AttributeDefinition ScalarAttributeType
- data AttributeValue
- attributeValue :: AttributeValue
- avL :: Lens' AttributeValue [AttributeValue]
- avNS :: Lens' AttributeValue [Text]
- avM :: Lens' AttributeValue (HashMap Text AttributeValue)
- avNULL :: Lens' AttributeValue (Maybe Bool)
- avN :: Lens' AttributeValue (Maybe Text)
- avBS :: Lens' AttributeValue [ByteString]
- avB :: Lens' AttributeValue (Maybe ByteString)
- avSS :: Lens' AttributeValue [Text]
- avS :: Lens' AttributeValue (Maybe Text)
- avBOOL :: Lens' AttributeValue (Maybe Bool)
- data AttributeValueUpdate
- attributeValueUpdate :: AttributeValueUpdate
- avuValue :: Lens' AttributeValueUpdate (Maybe AttributeValue)
- avuAction :: Lens' AttributeValueUpdate (Maybe AttributeAction)
- data Capacity
- capacity :: Capacity
- cCapacityUnits :: Lens' Capacity (Maybe Double)
- data Condition
- condition :: ComparisonOperator -> Condition
- cAttributeValueList :: Lens' Condition [AttributeValue]
- cComparisonOperator :: Lens' Condition ComparisonOperator
- data ConsumedCapacity
- consumedCapacity :: ConsumedCapacity
- ccGlobalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity)
- ccCapacityUnits :: Lens' ConsumedCapacity (Maybe Double)
- ccLocalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity)
- ccTable :: Lens' ConsumedCapacity (Maybe Capacity)
- ccTableName :: Lens' ConsumedCapacity (Maybe Text)
- data CreateGlobalSecondaryIndexAction
- createGlobalSecondaryIndexAction :: Text -> NonEmpty KeySchemaElement -> Projection -> ProvisionedThroughput -> CreateGlobalSecondaryIndexAction
- cgsiaIndexName :: Lens' CreateGlobalSecondaryIndexAction Text
- cgsiaKeySchema :: Lens' CreateGlobalSecondaryIndexAction (NonEmpty KeySchemaElement)
- cgsiaProjection :: Lens' CreateGlobalSecondaryIndexAction Projection
- cgsiaProvisionedThroughput :: Lens' CreateGlobalSecondaryIndexAction ProvisionedThroughput
- data DeleteGlobalSecondaryIndexAction
- deleteGlobalSecondaryIndexAction :: Text -> DeleteGlobalSecondaryIndexAction
- dgsiaIndexName :: Lens' DeleteGlobalSecondaryIndexAction Text
- data DeleteRequest
- deleteRequest :: DeleteRequest
- drKey :: Lens' DeleteRequest (HashMap Text AttributeValue)
- data ExpectedAttributeValue
- expectedAttributeValue :: ExpectedAttributeValue
- eavAttributeValueList :: Lens' ExpectedAttributeValue [AttributeValue]
- eavExists :: Lens' ExpectedAttributeValue (Maybe Bool)
- eavValue :: Lens' ExpectedAttributeValue (Maybe AttributeValue)
- eavComparisonOperator :: Lens' ExpectedAttributeValue (Maybe ComparisonOperator)
- data GlobalSecondaryIndex
- globalSecondaryIndex :: Text -> NonEmpty KeySchemaElement -> Projection -> ProvisionedThroughput -> GlobalSecondaryIndex
- gsiIndexName :: Lens' GlobalSecondaryIndex Text
- gsiKeySchema :: Lens' GlobalSecondaryIndex (NonEmpty KeySchemaElement)
- gsiProjection :: Lens' GlobalSecondaryIndex Projection
- gsiProvisionedThroughput :: Lens' GlobalSecondaryIndex ProvisionedThroughput
- data GlobalSecondaryIndexDescription
- globalSecondaryIndexDescription :: GlobalSecondaryIndexDescription
- gsidBackfilling :: Lens' GlobalSecondaryIndexDescription (Maybe Bool)
- gsidIndexSizeBytes :: Lens' GlobalSecondaryIndexDescription (Maybe Integer)
- gsidIndexStatus :: Lens' GlobalSecondaryIndexDescription (Maybe IndexStatus)
- gsidProvisionedThroughput :: Lens' GlobalSecondaryIndexDescription (Maybe ProvisionedThroughputDescription)
- gsidIndexARN :: Lens' GlobalSecondaryIndexDescription (Maybe Text)
- gsidKeySchema :: Lens' GlobalSecondaryIndexDescription (Maybe (NonEmpty KeySchemaElement))
- gsidProjection :: Lens' GlobalSecondaryIndexDescription (Maybe Projection)
- gsidItemCount :: Lens' GlobalSecondaryIndexDescription (Maybe Integer)
- gsidIndexName :: Lens' GlobalSecondaryIndexDescription (Maybe Text)
- data GlobalSecondaryIndexUpdate
- globalSecondaryIndexUpdate :: GlobalSecondaryIndexUpdate
- gsiuCreate :: Lens' GlobalSecondaryIndexUpdate (Maybe CreateGlobalSecondaryIndexAction)
- gsiuDelete :: Lens' GlobalSecondaryIndexUpdate (Maybe DeleteGlobalSecondaryIndexAction)
- gsiuUpdate :: Lens' GlobalSecondaryIndexUpdate (Maybe UpdateGlobalSecondaryIndexAction)
- data ItemCollectionMetrics
- itemCollectionMetrics :: ItemCollectionMetrics
- icmItemCollectionKey :: Lens' ItemCollectionMetrics (HashMap Text AttributeValue)
- icmSizeEstimateRangeGB :: Lens' ItemCollectionMetrics [Double]
- data KeySchemaElement
- keySchemaElement :: Text -> KeyType -> KeySchemaElement
- kseAttributeName :: Lens' KeySchemaElement Text
- kseKeyType :: Lens' KeySchemaElement KeyType
- data KeysAndAttributes
- keysAndAttributes :: NonEmpty (HashMap Text AttributeValue) -> KeysAndAttributes
- kaaProjectionExpression :: Lens' KeysAndAttributes (Maybe Text)
- kaaAttributesToGet :: Lens' KeysAndAttributes (Maybe (NonEmpty Text))
- kaaExpressionAttributeNames :: Lens' KeysAndAttributes (HashMap Text Text)
- kaaConsistentRead :: Lens' KeysAndAttributes (Maybe Bool)
- kaaKeys :: Lens' KeysAndAttributes (NonEmpty (HashMap Text AttributeValue))
- data LocalSecondaryIndex
- localSecondaryIndex :: Text -> NonEmpty KeySchemaElement -> Projection -> LocalSecondaryIndex
- lsiIndexName :: Lens' LocalSecondaryIndex Text
- lsiKeySchema :: Lens' LocalSecondaryIndex (NonEmpty KeySchemaElement)
- lsiProjection :: Lens' LocalSecondaryIndex Projection
- data LocalSecondaryIndexDescription
- localSecondaryIndexDescription :: LocalSecondaryIndexDescription
- lsidIndexSizeBytes :: Lens' LocalSecondaryIndexDescription (Maybe Integer)
- lsidIndexARN :: Lens' LocalSecondaryIndexDescription (Maybe Text)
- lsidKeySchema :: Lens' LocalSecondaryIndexDescription (Maybe (NonEmpty KeySchemaElement))
- lsidProjection :: Lens' LocalSecondaryIndexDescription (Maybe Projection)
- lsidItemCount :: Lens' LocalSecondaryIndexDescription (Maybe Integer)
- lsidIndexName :: Lens' LocalSecondaryIndexDescription (Maybe Text)
- data Projection
- projection :: Projection
- pProjectionType :: Lens' Projection (Maybe ProjectionType)
- pNonKeyAttributes :: Lens' Projection (Maybe (NonEmpty Text))
- data ProvisionedThroughput
- provisionedThroughput :: Natural -> Natural -> ProvisionedThroughput
- ptReadCapacityUnits :: Lens' ProvisionedThroughput Natural
- ptWriteCapacityUnits :: Lens' ProvisionedThroughput Natural
- data ProvisionedThroughputDescription
- provisionedThroughputDescription :: ProvisionedThroughputDescription
- ptdReadCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural)
- ptdLastDecreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime)
- ptdWriteCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural)
- ptdNumberOfDecreasesToday :: Lens' ProvisionedThroughputDescription (Maybe Natural)
- ptdLastIncreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime)
- data PutRequest
- putRequest :: PutRequest
- prItem :: Lens' PutRequest (HashMap Text AttributeValue)
- data StreamSpecification
- streamSpecification :: StreamSpecification
- ssStreamViewType :: Lens' StreamSpecification (Maybe StreamViewType)
- ssStreamEnabled :: Lens' StreamSpecification (Maybe Bool)
- data TableDescription
- tableDescription :: TableDescription
- tdTableSizeBytes :: Lens' TableDescription (Maybe Integer)
- tdAttributeDefinitions :: Lens' TableDescription [AttributeDefinition]
- tdLatestStreamARN :: Lens' TableDescription (Maybe Text)
- tdProvisionedThroughput :: Lens' TableDescription (Maybe ProvisionedThroughputDescription)
- tdTableStatus :: Lens' TableDescription (Maybe TableStatus)
- tdTableARN :: Lens' TableDescription (Maybe Text)
- tdKeySchema :: Lens' TableDescription (Maybe (NonEmpty KeySchemaElement))
- tdGlobalSecondaryIndexes :: Lens' TableDescription [GlobalSecondaryIndexDescription]
- tdLatestStreamLabel :: Lens' TableDescription (Maybe Text)
- tdLocalSecondaryIndexes :: Lens' TableDescription [LocalSecondaryIndexDescription]
- tdCreationDateTime :: Lens' TableDescription (Maybe UTCTime)
- tdItemCount :: Lens' TableDescription (Maybe Integer)
- tdTableName :: Lens' TableDescription (Maybe Text)
- tdStreamSpecification :: Lens' TableDescription (Maybe StreamSpecification)
- data UpdateGlobalSecondaryIndexAction
- updateGlobalSecondaryIndexAction :: Text -> ProvisionedThroughput -> UpdateGlobalSecondaryIndexAction
- ugsiaIndexName :: Lens' UpdateGlobalSecondaryIndexAction Text
- ugsiaProvisionedThroughput :: Lens' UpdateGlobalSecondaryIndexAction ProvisionedThroughput
- data WriteRequest
- writeRequest :: WriteRequest
- wrDeleteRequest :: Lens' WriteRequest (Maybe DeleteRequest)
- wrPutRequest :: Lens' WriteRequest (Maybe PutRequest)
Service Configuration
Errors
Error matchers are designed for use with the functions provided by
Control.Exception.Lens.
This allows catching (and rethrowing) service specific errors returned
by DynamoDB
.
ProvisionedThroughputExceededException
_ProvisionedThroughputExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to Error Retries and Exponential Backoff in the Amazon DynamoDB Developer Guide.
ConditionalCheckFailedException
_ConditionalCheckFailedException :: AsError a => Getting (First ServiceError) a ServiceError Source #
A condition specified in the operation could not be evaluated.
ItemCollectionSizeLimitExceededException
_ItemCollectionSizeLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.
InternalServerError
_InternalServerError :: AsError a => Getting (First ServiceError) a ServiceError Source #
An error occurred on the server side.
ResourceNotFoundException
_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The operation tried to access a nonexistent table or index. The resource
might not be specified correctly, or its status might not be ACTIVE
.
LimitExceededException
_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The number of concurrent table requests (cumulative number of tables in
the CREATING
, DELETING
or UPDATING
state) exceeds the maximum
allowed of 10.
Also, for tables with secondary indexes, only one of those tables can be
in the CREATING
state at any point in time. Do not attempt to create
more than one such table simultaneously.
The total limit of tables in the ACTIVE
state is 250.
ResourceInUseException
_ResourceInUseException :: AsError a => Getting (First ServiceError) a ServiceError Source #
The operation conflicts with the resource's availability. For example,
you attempted to recreate an existing table, or tried to delete a table
currently in the CREATING
state.
Waiters
Waiters poll by repeatedly sending a request until some remote success condition
configured by the Wait
specification is fulfilled. The Wait
specification
determines how many attempts should be made, in addition to delay and retry strategies.
TableNotExists
tableNotExists :: Wait DescribeTable Source #
Polls DescribeTable
every 20 seconds until a
successful state is reached. An error is returned after 25 failed checks.
TableExists
tableExists :: Wait DescribeTable Source #
Polls DescribeTable
every 20 seconds until a
successful state is reached. An error is returned after 25 failed checks.
Operations
Some AWS operations return results that are incomplete and require subsequent
requests in order to obtain the entire result set. The process of sending
subsequent requests to continue where a previous request left off is called
pagination. For example, the ListObjects
operation of Amazon S3 returns up to
1000 objects at a time, and you must send subsequent requests with the
appropriate Marker in order to retrieve the next page of results.
Operations that have an AWSPager
instance can transparently perform subsequent
requests, correctly setting Markers and other request facets to iterate through
the entire result set of a truncated API operation. Operations which support
this have an additional note in the documentation.
Many operations have the ability to filter results on the server side. See the individual operation parameters for details.
PutItem
module Network.AWS.DynamoDB.PutItem
DeleteItem
UpdateItem
DeleteTable
UpdateTable
BatchGetItem
DescribeTable
GetItem
module Network.AWS.DynamoDB.GetItem
BatchWriteItem
ListTables (Paginated)
Scan (Paginated)
module Network.AWS.DynamoDB.Scan
Query (Paginated)
module Network.AWS.DynamoDB.Query
CreateTable
Types
AttributeAction
data AttributeAction Source #
ComparisonOperator
data ComparisonOperator Source #
ConditionalOperator
data ConditionalOperator Source #
IndexStatus
data IndexStatus Source #
KeyType
ProjectionType
data ProjectionType Source #
ReturnConsumedCapacity
data ReturnConsumedCapacity Source #
Determines the level of detail about provisioned throughput consumption that is returned in the response:
INDEXES - The response includes the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity for each table and secondary index that was accessed.
Note that some operations, such as GetItem and BatchGetItem, do not access any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity information for table(s).
- TOTAL - The response includes only the aggregate ConsumedCapacity for the operation.
- NONE - No ConsumedCapacity details are included in the response.
ReturnItemCollectionMetrics
data ReturnItemCollectionMetrics Source #
ReturnValue
data ReturnValue Source #
ScalarAttributeType
data ScalarAttributeType Source #
Select
StreamViewType
data StreamViewType Source #
TableStatus
data TableStatus Source #
AttributeDefinition
data AttributeDefinition Source #
Represents an attribute for describing the key schema for the table and indexes.
See: attributeDefinition
smart constructor.
Creates a value of AttributeDefinition
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
adAttributeName :: Lens' AttributeDefinition Text Source #
A name for the attribute.
adAttributeType :: Lens' AttributeDefinition ScalarAttributeType Source #
The data type for the attribute.
AttributeValue
data AttributeValue Source #
Represents the data for an attribute. You can set one, and only one, of the elements.
Each attribute in an item is a name-value pair. An attribute can be single-valued or multi-valued set. For example, a book item can have title and authors attributes. Each book has one title but can have many authors. The multi-valued attribute is a set; duplicate values are not allowed.
See: attributeValue
smart constructor.
avL :: Lens' AttributeValue [AttributeValue] Source #
A List of attribute values.
avM :: Lens' AttributeValue (HashMap Text AttributeValue) Source #
A Map of attribute values.
avBS :: Lens' AttributeValue [ByteString] Source #
A Binary Set data type.
avB :: Lens' AttributeValue (Maybe ByteString) Source #
A Binary data type.
Note: This Lens
automatically encodes and decodes Base64 data,
despite what the AWS documentation might say.
The underlying isomorphism will encode to Base64 representation during
serialisation, and decode from Base64 representation during deserialisation.
This Lens
accepts and returns only raw unencoded data.
AttributeValueUpdate
data AttributeValueUpdate Source #
For the UpdateItem operation, represents the attributes to be modified, the action to perform on each, and the new value for each.
You cannot use UpdateItem to update any primary key attributes. Instead, you will need to delete the item, and then use PutItem to create a new item with new attributes.
Attribute values cannot be null; string and binary type attributes must have lengths greater than zero; and set type attributes must not be empty. Requests with empty values will be rejected with a ValidationException exception.
See: attributeValueUpdate
smart constructor.
attributeValueUpdate :: AttributeValueUpdate Source #
Creates a value of AttributeValueUpdate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
avuValue :: Lens' AttributeValueUpdate (Maybe AttributeValue) Source #
Undocumented member.
avuAction :: Lens' AttributeValueUpdate (Maybe AttributeAction) Source #
Specifies how to perform the update. Valid values are PUT
(default),
DELETE
, and ADD
. The behavior depends on whether the specified
primary key already exists in the table.
If an item with the specified Key is found in the table:
PUT
- Adds the specified attribute to the item. If the attribute already exists, it is replaced by the new value.DELETE
- If no value is specified, the attribute and its value are removed from the item. The data type of the specified value must match the existing value's data type.If a set of values is specified, then those values are subtracted from the old set. For example, if the attribute value was the set '[a,b,c]' and the DELETE action specified '[a,c]', then the final attribute value would be '[b]'. Specifying an empty set is an error.
ADD
- If the attribute does not already exist, then the attribute and its values are added to the item. If the attribute does exist, then the behavior ofADD
depends on the data type of the attribute:If the existing attribute is a number, and if Value is also a number, then the Value is mathematically added to the existing attribute. If Value is a negative number, then it is subtracted from the existing attribute.
If you use
ADD
to increment or decrement a number value for an item that doesn't exist before the update, DynamoDB uses 0 as the initial value.In addition, if you use
ADD
to update an existing item, and intend to increment or decrement an attribute value which does not yet exist, DynamoDB uses '0' as the initial value. For example, suppose that the item you want to update does not yet have an attribute named itemcount, but you decide toADD
the number '3' to this attribute anyway, even though it currently does not exist. DynamoDB will create the itemcount attribute, set its initial value to '0', and finally add '3' to it. The result will be a new itemcount attribute in the item, with a value of '3'.If the existing data type is a set, and if the Value is also a set, then the Value is added to the existing set. (This is a set operation, not mathematical addition.) For example, if the attribute value was the set '[1,2]', and the
ADD
action specified '[3]', then the final attribute value would be '[1,2,3]'. An error occurs if an Add action is specified for a set attribute and the attribute type specified does not match the existing set type.Both sets must have the same primitive data type. For example, if the existing data type is a set of strings, the Value must also be a set of strings. The same holds true for number sets and binary sets.
This action is only valid for an existing attribute whose data type is number or is a set. Do not use
ADD
for any other data types.
If no item with the specified Key is found:
PUT
- DynamoDB creates a new item with the specified primary key, and then adds the attribute.DELETE
- Nothing happens; there is no attribute to delete.ADD
- DynamoDB creates an item with the supplied primary key and number (or set of numbers) for the attribute value. The only data types allowed are number and number set; no other data types can be specified.
Capacity
Represents the amount of provisioned throughput capacity consumed on a table or an index.
See: capacity
smart constructor.
Creates a value of Capacity
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cCapacityUnits :: Lens' Capacity (Maybe Double) Source #
The total number of capacity units consumed on a table or an index.
Condition
Represents the selection criteria for a Query or Scan operation:
For a Query operation, Condition is used for specifying the KeyConditions to use when querying a table or an index. For KeyConditions, only the following comparison operators are supported:
'EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN'
Condition is also used in a QueryFilter, which evaluates the query results and returns only the desired values.
- For a Scan operation, Condition is used in a ScanFilter, which evaluates the scan results and returns only the desired values.
See: condition
smart constructor.
Creates a value of Condition
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cAttributeValueList :: Lens' Condition [AttributeValue] Source #
One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ComparisonOperator being used.
For type Number, value comparisons are numeric.
String value comparisons for greater than, equals, or less than are
based on ASCII character code values. For example, a
is greater than
A
, and a
is greater than B
. For a list of code values, see
http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values.
cComparisonOperator :: Lens' Condition ComparisonOperator Source #
A comparator for evaluating attributes. For example, equals, greater than, less than, etc.
The following comparison operators are available:
'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
The following are descriptions of each comparison operator.
EQ
: Equal.EQ
is supported for all datatypes, including lists and maps.AttributeValueList can contain only one AttributeValue element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
NE
: Not equal.NE
is supported for all datatypes, including lists and maps.AttributeValueList can contain only one AttributeValue of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
LE
: Less than or equal.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
LT
: Less than.AttributeValueList can contain only one AttributeValue of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
GE
: Greater than or equal.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
GT
: Greater than.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
NOT_NULL
: The attribute exists.NOT_NULL
is supported for all datatypes, including lists and maps.This operator tests for the existence of an attribute, not its data type. If the data type of attribute "
a
" is null, and you evaluate it usingNOT_NULL
, the result is a Boolean true. This result is because the attribute "a
" exists; its data type is not relevant to theNOT_NULL
comparison operator.NULL
: The attribute does not exist.NULL
is supported for all datatypes, including lists and maps.This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute "
a
" is null, and you evaluate it usingNULL
, the result is a Boolean false. This is because the attribute "a
" exists; its data type is not relevant to theNULL
comparison operator.CONTAINS
: Checks for a subsequence, or value in a set.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("
SS
", "NS
", or "BS
"), then the operator evaluates to true if it finds an exact match with any member of the set.CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "
a
" can be a list; however, "b
" cannot be a set, a map, or a list.NOT_CONTAINS
: Checks for absence of a subsequence, or absence of a value in a set.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("
SS
", "NS
", or "BS
"), then the operator evaluates to true if it does not find an exact match with any member of the set.NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "
a
" can be a list; however, "b
" cannot be a set, a map, or a list.BEGINS_WITH
: Checks for a prefix.AttributeValueList can contain only one AttributeValue of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type).
IN
: Checks for matching elements within two sets.AttributeValueList can contain one or more AttributeValue elements of type String, Number, or Binary (not a set type). These attributes are compared against an existing set type attribute of an item. If any elements of the input set are present in the item attribute, the expression evaluates to true.
BETWEEN
: Greater than or equal to the first value, and less than or equal to the second value.AttributeValueList must contain two AttributeValue elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
For usage examples of AttributeValueList and ComparisonOperator, see Legacy Conditional Parameters in the Amazon DynamoDB Developer Guide.
ConsumedCapacity
data ConsumedCapacity Source #
The capacity units consumed by an operation. The data returned includes the total provisioned throughput consumed, along with statistics for the table and any indexes involved in the operation. ConsumedCapacity is only returned if the request asked for it. For more information, see Provisioned Throughput in the Amazon DynamoDB Developer Guide.
See: consumedCapacity
smart constructor.
consumedCapacity :: ConsumedCapacity Source #
Creates a value of ConsumedCapacity
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ccGlobalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity) Source #
The amount of throughput consumed on each global index affected by the operation.
ccCapacityUnits :: Lens' ConsumedCapacity (Maybe Double) Source #
The total number of capacity units consumed by the operation.
ccLocalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity) Source #
The amount of throughput consumed on each local index affected by the operation.
ccTable :: Lens' ConsumedCapacity (Maybe Capacity) Source #
The amount of throughput consumed on the table affected by the operation.
ccTableName :: Lens' ConsumedCapacity (Maybe Text) Source #
The name of the table that was affected by the operation.
CreateGlobalSecondaryIndexAction
data CreateGlobalSecondaryIndexAction Source #
Represents a new global secondary index to be added to an existing table.
See: createGlobalSecondaryIndexAction
smart constructor.
createGlobalSecondaryIndexAction Source #
:: Text | |
-> NonEmpty KeySchemaElement | |
-> Projection | |
-> ProvisionedThroughput | |
-> CreateGlobalSecondaryIndexAction |
Creates a value of CreateGlobalSecondaryIndexAction
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cgsiaIndexName :: Lens' CreateGlobalSecondaryIndexAction Text Source #
The name of the global secondary index to be created.
cgsiaKeySchema :: Lens' CreateGlobalSecondaryIndexAction (NonEmpty KeySchemaElement) Source #
The key schema for the global secondary index.
cgsiaProjection :: Lens' CreateGlobalSecondaryIndexAction Projection Source #
Undocumented member.
cgsiaProvisionedThroughput :: Lens' CreateGlobalSecondaryIndexAction ProvisionedThroughput Source #
Undocumented member.
DeleteGlobalSecondaryIndexAction
data DeleteGlobalSecondaryIndexAction Source #
Represents a global secondary index to be deleted from an existing table.
See: deleteGlobalSecondaryIndexAction
smart constructor.
deleteGlobalSecondaryIndexAction Source #
Creates a value of DeleteGlobalSecondaryIndexAction
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
dgsiaIndexName :: Lens' DeleteGlobalSecondaryIndexAction Text Source #
The name of the global secondary index to be deleted.
DeleteRequest
data DeleteRequest Source #
Represents a request to perform a DeleteItem operation on an item.
See: deleteRequest
smart constructor.
deleteRequest :: DeleteRequest Source #
Creates a value of DeleteRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
drKey :: Lens' DeleteRequest (HashMap Text AttributeValue) Source #
A map of attribute name to attribute values, representing the primary key of the item to delete. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema.
ExpectedAttributeValue
data ExpectedAttributeValue Source #
Represents a condition to be compared with an attribute value. This condition can be used with DeleteItem, PutItem or UpdateItem operations; if the comparison evaluates to true, the operation succeeds; if not, the operation fails. You can use ExpectedAttributeValue in one of two different ways:
- Use AttributeValueList to specify one or more values to compare against an attribute. Use ComparisonOperator to specify how you want to perform the comparison. If the comparison evaluates to true, then the conditional operation succeeds.
- Use Value to specify a value that DynamoDB will compare against an attribute. If the values match, then ExpectedAttributeValue evaluates to true and the conditional operation succeeds. Optionally, you can also set Exists to false, indicating that you do not expect to find the attribute value in the table. In this case, the conditional operation succeeds only if the comparison evaluates to false.
Value and Exists are incompatible with AttributeValueList and ComparisonOperator. Note that if you use both sets of parameters at once, DynamoDB will return a ValidationException exception.
See: expectedAttributeValue
smart constructor.
expectedAttributeValue :: ExpectedAttributeValue Source #
Creates a value of ExpectedAttributeValue
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
eavAttributeValueList :: Lens' ExpectedAttributeValue [AttributeValue] Source #
One or more values to evaluate against the supplied attribute. The number of values in the list depends on the ComparisonOperator being used.
For type Number, value comparisons are numeric.
String value comparisons for greater than, equals, or less than are
based on ASCII character code values. For example, a
is greater than
A
, and a
is greater than B
. For a list of code values, see
http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
For Binary, DynamoDB treats each byte of the binary data as unsigned when it compares binary values.
For information on specifying data types in JSON, see JSON Data Format in the Amazon DynamoDB Developer Guide.
eavExists :: Lens' ExpectedAttributeValue (Maybe Bool) Source #
Causes DynamoDB to evaluate the value before attempting a conditional operation:
- If Exists is
true
, DynamoDB will check to see if that attribute value already exists in the table. If it is found, then the operation succeeds. If it is not found, the operation fails with a ConditionalCheckFailedException. - If Exists is
false
, DynamoDB assumes that the attribute value does not exist in the table. If in fact the value does not exist, then the assumption is valid and the operation succeeds. If the value is found, despite the assumption that it does not exist, the operation fails with a ConditionalCheckFailedException.
The default setting for Exists is true
. If you supply a Value all
by itself, DynamoDB assumes the attribute exists: You don't have to set
Exists to true
, because it is implied.
DynamoDB returns a ValidationException if:
- Exists is
true
but there is no Value to check. (You expect a value to exist, but don't specify what that value is.) - Exists is
false
but you also provide a Value. (You cannot expect an attribute to have a value, while also expecting it not to exist.)
eavValue :: Lens' ExpectedAttributeValue (Maybe AttributeValue) Source #
Undocumented member.
eavComparisonOperator :: Lens' ExpectedAttributeValue (Maybe ComparisonOperator) Source #
A comparator for evaluating attributes in the AttributeValueList. For example, equals, greater than, less than, etc.
The following comparison operators are available:
'EQ | NE | LE | LT | GE | GT | NOT_NULL | NULL | CONTAINS | NOT_CONTAINS | BEGINS_WITH | IN | BETWEEN'
The following are descriptions of each comparison operator.
EQ
: Equal.EQ
is supported for all datatypes, including lists and maps.AttributeValueList can contain only one AttributeValue element of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
NE
: Not equal.NE
is supported for all datatypes, including lists and maps.AttributeValueList can contain only one AttributeValue of type String, Number, Binary, String Set, Number Set, or Binary Set. If an item contains an AttributeValue of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not equal '{"NS":["6", "2", "1"]}'.
LE
: Less than or equal.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
LT
: Less than.AttributeValueList can contain only one AttributeValue of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
GE
: Greater than or equal.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
GT
: Greater than.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not equal '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'.
NOT_NULL
: The attribute exists.NOT_NULL
is supported for all datatypes, including lists and maps.This operator tests for the existence of an attribute, not its data type. If the data type of attribute "
a
" is null, and you evaluate it usingNOT_NULL
, the result is a Boolean true. This result is because the attribute "a
" exists; its data type is not relevant to theNOT_NULL
comparison operator.NULL
: The attribute does not exist.NULL
is supported for all datatypes, including lists and maps.This operator tests for the nonexistence of an attribute, not its data type. If the data type of attribute "
a
" is null, and you evaluate it usingNULL
, the result is a Boolean false. This is because the attribute "a
" exists; its data type is not relevant to theNULL
comparison operator.CONTAINS
: Checks for a subsequence, or value in a set.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is of type String, then the operator checks for a substring match. If the target attribute of the comparison is of type Binary, then the operator looks for a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("
SS
", "NS
", or "BS
"), then the operator evaluates to true if it finds an exact match with any member of the set.CONTAINS is supported for lists: When evaluating "'a CONTAINS b'", "
a
" can be a list; however, "b
" cannot be a set, a map, or a list.NOT_CONTAINS
: Checks for absence of a subsequence, or absence of a value in a set.AttributeValueList can contain only one AttributeValue element of type String, Number, or Binary (not a set type). If the target attribute of the comparison is a String, then the operator checks for the absence of a substring match. If the target attribute of the comparison is Binary, then the operator checks for the absence of a subsequence of the target that matches the input. If the target attribute of the comparison is a set ("
SS
", "NS
", or "BS
"), then the operator evaluates to true if it does not find an exact match with any member of the set.NOT_CONTAINS is supported for lists: When evaluating "'a NOT CONTAINS b'", "
a
" can be a list; however, "b
" cannot be a set, a map, or a list.BEGINS_WITH
: Checks for a prefix.AttributeValueList can contain only one AttributeValue of type String or Binary (not a Number or a set type). The target attribute of the comparison must be of type String or Binary (not a Number or a set type).
IN
: Checks for matching elements within two sets.AttributeValueList can contain one or more AttributeValue elements of type String, Number, or Binary (not a set type). These attributes are compared against an existing set type attribute of an item. If any elements of the input set are present in the item attribute, the expression evaluates to true.
BETWEEN
: Greater than or equal to the first value, and less than or equal to the second value.AttributeValueList must contain two AttributeValue elements of the same type, either String, Number, or Binary (not a set type). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an AttributeValue element of a different type than the one provided in the request, the value does not match. For example, '{"S":"6"}' does not compare to '{"N":"6"}'. Also, '{"N":"6"}' does not compare to '{"NS":["6", "2", "1"]}'
GlobalSecondaryIndex
data GlobalSecondaryIndex Source #
Represents the properties of a global secondary index.
See: globalSecondaryIndex
smart constructor.
Creates a value of GlobalSecondaryIndex
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gsiIndexName :: Lens' GlobalSecondaryIndex Text Source #
The name of the global secondary index. The name must be unique among all other indexes on this table.
gsiKeySchema :: Lens' GlobalSecondaryIndex (NonEmpty KeySchemaElement) Source #
The complete key schema for a global secondary index, which consists of
one or more pairs of attribute names and key types (HASH
or RANGE
).
gsiProjection :: Lens' GlobalSecondaryIndex Projection Source #
Undocumented member.
gsiProvisionedThroughput :: Lens' GlobalSecondaryIndex ProvisionedThroughput Source #
Undocumented member.
GlobalSecondaryIndexDescription
data GlobalSecondaryIndexDescription Source #
Represents the properties of a global secondary index.
See: globalSecondaryIndexDescription
smart constructor.
globalSecondaryIndexDescription :: GlobalSecondaryIndexDescription Source #
Creates a value of GlobalSecondaryIndexDescription
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gsidBackfilling :: Lens' GlobalSecondaryIndexDescription (Maybe Bool) Source #
Indicates whether the index is currently backfilling. Backfilling is the process of reading items from the table and determining whether they can be added to the index. (Not all items will qualify: For example, a hash key attribute cannot have any duplicates.) If an item can be added to the index, DynamoDB will do so. After all items have been processed, the backfilling operation is complete and Backfilling is false.
For indexes that were created during a CreateTable operation, the Backfilling attribute does not appear in the DescribeTable output.
gsidIndexSizeBytes :: Lens' GlobalSecondaryIndexDescription (Maybe Integer) Source #
The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
gsidIndexStatus :: Lens' GlobalSecondaryIndexDescription (Maybe IndexStatus) Source #
The current state of the global secondary index:
- CREATING - The index is being created.
- UPDATING - The index is being updated.
- DELETING - The index is being deleted.
- ACTIVE - The index is ready for use.
gsidProvisionedThroughput :: Lens' GlobalSecondaryIndexDescription (Maybe ProvisionedThroughputDescription) Source #
Undocumented member.
gsidIndexARN :: Lens' GlobalSecondaryIndexDescription (Maybe Text) Source #
The Amazon Resource Name (ARN) that uniquely identifies the index.
gsidKeySchema :: Lens' GlobalSecondaryIndexDescription (Maybe (NonEmpty KeySchemaElement)) Source #
The complete key schema for the global secondary index, consisting of
one or more pairs of attribute names and key types (HASH
or RANGE
).
gsidProjection :: Lens' GlobalSecondaryIndexDescription (Maybe Projection) Source #
Undocumented member.
gsidItemCount :: Lens' GlobalSecondaryIndexDescription (Maybe Integer) Source #
The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
gsidIndexName :: Lens' GlobalSecondaryIndexDescription (Maybe Text) Source #
The name of the global secondary index.
GlobalSecondaryIndexUpdate
data GlobalSecondaryIndexUpdate Source #
Represents one of the following:
- A new global secondary index to be added to an existing table.
- New provisioned throughput parameters for an existing global secondary index.
- An existing global secondary index to be removed from an existing table.
See: globalSecondaryIndexUpdate
smart constructor.
globalSecondaryIndexUpdate :: GlobalSecondaryIndexUpdate Source #
Creates a value of GlobalSecondaryIndexUpdate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gsiuCreate :: Lens' GlobalSecondaryIndexUpdate (Maybe CreateGlobalSecondaryIndexAction) Source #
The parameters required for creating a global secondary index on an existing table:
- 'IndexName '
- 'KeySchema '
- 'AttributeDefinitions '
- 'Projection '
- 'ProvisionedThroughput '
gsiuDelete :: Lens' GlobalSecondaryIndexUpdate (Maybe DeleteGlobalSecondaryIndexAction) Source #
The name of an existing global secondary index to be removed.
gsiuUpdate :: Lens' GlobalSecondaryIndexUpdate (Maybe UpdateGlobalSecondaryIndexAction) Source #
The name of an existing global secondary index, along with new provisioned throughput settings to be applied to that index.
ItemCollectionMetrics
data ItemCollectionMetrics Source #
Information about item collections, if any, that were affected by the operation. ItemCollectionMetrics is only returned if the request asked for it. If the table does not have any local secondary indexes, this information is not returned in the response.
See: itemCollectionMetrics
smart constructor.
itemCollectionMetrics :: ItemCollectionMetrics Source #
Creates a value of ItemCollectionMetrics
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
icmItemCollectionKey :: Lens' ItemCollectionMetrics (HashMap Text AttributeValue) Source #
The hash key value of the item collection. This value is the same as the hash key of the item.
icmSizeEstimateRangeGB :: Lens' ItemCollectionMetrics [Double] Source #
An estimate of item collection size, in gigabytes. This value is a two-element array containing a lower bound and an upper bound for the estimate. The estimate includes the size of all the items in the table, plus the size of all attributes projected into all of the local secondary indexes on that table. Use this estimate to measure whether a local secondary index is approaching its size limit.
The estimate is subject to change over time; therefore, do not rely on the precision or accuracy of the estimate.
KeySchemaElement
data KeySchemaElement Source #
Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.
A KeySchemaElement represents exactly one attribute of the primary key. For example, a hash type primary key would be represented by one KeySchemaElement. A hash-and-range type primary key would require one KeySchemaElement for the hash attribute, and another KeySchemaElement for the range attribute.
See: keySchemaElement
smart constructor.
Creates a value of KeySchemaElement
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
kseAttributeName :: Lens' KeySchemaElement Text Source #
The name of a key attribute.
kseKeyType :: Lens' KeySchemaElement KeyType Source #
The attribute data, consisting of the data type and the attribute value itself.
KeysAndAttributes
data KeysAndAttributes Source #
Represents a set of primary keys and, for each key, the attributes to retrieve from the table.
For each primary key, you must provide all of the key attributes. For example, with a hash type primary key, you only need to provide the hash attribute. For a hash-and-range type primary key, you must provide both the hash attribute and the range attribute.
See: keysAndAttributes
smart constructor.
Creates a value of KeysAndAttributes
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
kaaProjectionExpression :: Lens' KeysAndAttributes (Maybe Text) Source #
A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the ProjectionExpression must be separated by commas.
If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.
For more information, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide.
ProjectionExpression replaces the legacy AttributesToGet parameter.
kaaAttributesToGet :: Lens' KeysAndAttributes (Maybe (NonEmpty Text)) Source #
One or more attributes to retrieve from the table or index. If no attribute names are specified then all attributes will be returned. If any of the specified attributes are not found, they will not appear in the result.
kaaExpressionAttributeNames :: Lens' KeysAndAttributes (HashMap Text Text) Source #
One or more substitution tokens for attribute names in an expression. The following are some use cases for using ExpressionAttributeNames:
- To access an attribute whose name conflicts with a DynamoDB reserved word.
- To create a placeholder for repeating occurrences of an attribute name in an expression.
- To prevent special characters in an attribute name from being misinterpreted in an expression.
Use the # character in an expression to dereference an attribute name. For example, consider the following attribute name:
Percentile
The name of this attribute conflicts with a reserved word, so it cannot be used directly in an expression. (For the complete list of reserved words, see Reserved Words in the Amazon DynamoDB Developer Guide). To work around this, you could specify the following for ExpressionAttributeNames:
- '{"#P":"Percentile"}'
You could then use this substitution in an expression, as in this example:
- '#P = :val'
Tokens that begin with the : character are /expression attribute values/, which are placeholders for the actual value at runtime.
For more information on expression attribute names, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide.
kaaConsistentRead :: Lens' KeysAndAttributes (Maybe Bool) Source #
The consistency of a read operation. If set to true
, then a strongly
consistent read is used; otherwise, an eventually consistent read is
used.
kaaKeys :: Lens' KeysAndAttributes (NonEmpty (HashMap Text AttributeValue)) Source #
The primary key attribute values that define the items and the attributes associated with the items.
LocalSecondaryIndex
data LocalSecondaryIndex Source #
Represents the properties of a local secondary index.
See: localSecondaryIndex
smart constructor.
Creates a value of LocalSecondaryIndex
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lsiIndexName :: Lens' LocalSecondaryIndex Text Source #
The name of the local secondary index. The name must be unique among all other indexes on this table.
lsiKeySchema :: Lens' LocalSecondaryIndex (NonEmpty KeySchemaElement) Source #
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (HASH
or RANGE
).
lsiProjection :: Lens' LocalSecondaryIndex Projection Source #
Undocumented member.
LocalSecondaryIndexDescription
data LocalSecondaryIndexDescription Source #
Represents the properties of a local secondary index.
See: localSecondaryIndexDescription
smart constructor.
localSecondaryIndexDescription :: LocalSecondaryIndexDescription Source #
Creates a value of LocalSecondaryIndexDescription
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lsidIndexSizeBytes :: Lens' LocalSecondaryIndexDescription (Maybe Integer) Source #
The total size of the specified index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
lsidIndexARN :: Lens' LocalSecondaryIndexDescription (Maybe Text) Source #
The Amazon Resource Name (ARN) that uniquely identifies the index.
lsidKeySchema :: Lens' LocalSecondaryIndexDescription (Maybe (NonEmpty KeySchemaElement)) Source #
The complete index key schema, which consists of one or more pairs of
attribute names and key types (HASH
or RANGE
).
lsidProjection :: Lens' LocalSecondaryIndexDescription (Maybe Projection) Source #
Undocumented member.
lsidItemCount :: Lens' LocalSecondaryIndexDescription (Maybe Integer) Source #
The number of items in the specified index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
lsidIndexName :: Lens' LocalSecondaryIndexDescription (Maybe Text) Source #
Represents the name of the local secondary index.
Projection
data Projection Source #
Represents attributes that are copied (projected) from the table into an index. These are in addition to the primary key attributes and index key attributes, which are automatically projected.
See: projection
smart constructor.
projection :: Projection Source #
Creates a value of Projection
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pProjectionType :: Lens' Projection (Maybe ProjectionType) Source #
The set of attributes that are projected into the index:
KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.ALL
- All of the table attributes are projected into the index.
pNonKeyAttributes :: Lens' Projection (Maybe (NonEmpty Text)) Source #
Represents the non-key attribute names which will be projected into the index.
For local secondary indexes, the total count of NonKeyAttributes summed across all of the local secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
ProvisionedThroughput
data ProvisionedThroughput Source #
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.
For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.
See: provisionedThroughput
smart constructor.
provisionedThroughput Source #
Creates a value of ProvisionedThroughput
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ptReadCapacityUnits :: Lens' ProvisionedThroughput Natural Source #
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException. For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide.
ptWriteCapacityUnits :: Lens' ProvisionedThroughput Natural Source #
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException. For more information, see Specifying Read and Write Requirements in the Amazon DynamoDB Developer Guide.
ProvisionedThroughputDescription
data ProvisionedThroughputDescription Source #
Represents the provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.
See: provisionedThroughputDescription
smart constructor.
provisionedThroughputDescription :: ProvisionedThroughputDescription Source #
Creates a value of ProvisionedThroughputDescription
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ptdReadCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural) Source #
The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException. Eventually consistent reads require less effort than strongly consistent reads, so a setting of 50 ReadCapacityUnits per second provides 100 eventually consistent ReadCapacityUnits per second.
ptdLastDecreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime) Source #
The date and time of the last provisioned throughput decrease for this table.
ptdWriteCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural) Source #
The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException.
ptdNumberOfDecreasesToday :: Lens' ProvisionedThroughputDescription (Maybe Natural) Source #
The number of provisioned throughput decreases for this table during this UTC calendar day. For current maximums on provisioned throughput decreases, see Limits in the Amazon DynamoDB Developer Guide.
ptdLastIncreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime) Source #
The date and time of the last provisioned throughput increase for this table.
PutRequest
data PutRequest Source #
Represents a request to perform a PutItem operation on an item.
See: putRequest
smart constructor.
putRequest :: PutRequest Source #
Creates a value of PutRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
prItem :: Lens' PutRequest (HashMap Text AttributeValue) Source #
A map of attribute name to attribute values, representing the primary key of an item to be processed by PutItem. All of the table's primary key attributes must be specified, and their data types must match those of the table's key schema. If any attributes are present in the item which are part of an index key schema for the table, their types must match the index key schema.
StreamSpecification
data StreamSpecification Source #
Represents the DynamoDB Streams configuration for a table in DynamoDB.
See: streamSpecification
smart constructor.
streamSpecification :: StreamSpecification Source #
Creates a value of StreamSpecification
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ssStreamViewType :: Lens' StreamSpecification (Maybe StreamViewType) Source #
The DynamoDB Streams settings for the table. These settings consist of:
- StreamEnabled - Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.
StreamViewType - When an item in the table is modified, StreamViewType determines what information is written to the stream for this table. Valid values for StreamViewType are:
- KEYS_ONLY - Only the key attributes of the modified item are written to the stream.
- NEW_IMAGE - The entire item, as it appears after it was modified, is written to the stream.
- OLD_IMAGE - The entire item, as it appeared before it was modified, is written to the stream.
- NEW_AND_OLD_IMAGES - Both the new and the old item images of the item are written to the stream.
ssStreamEnabled :: Lens' StreamSpecification (Maybe Bool) Source #
Indicates whether DynamoDB Streams is enabled (true) or disabled (false) on the table.
TableDescription
data TableDescription Source #
Represents the properties of a table.
See: tableDescription
smart constructor.
tableDescription :: TableDescription Source #
Creates a value of TableDescription
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tdTableSizeBytes :: Lens' TableDescription (Maybe Integer) Source #
The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
tdAttributeDefinitions :: Lens' TableDescription [AttributeDefinition] Source #
An array of AttributeDefinition objects. Each of these objects describes one attribute in the table and index key schema.
Each AttributeDefinition object in this array is composed of:
- AttributeName - The name of the attribute.
- AttributeType - The data type for the attribute.
tdLatestStreamARN :: Lens' TableDescription (Maybe Text) Source #
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
tdProvisionedThroughput :: Lens' TableDescription (Maybe ProvisionedThroughputDescription) Source #
The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.
tdTableStatus :: Lens' TableDescription (Maybe TableStatus) Source #
The current state of the table:
- CREATING - The table is being created.
- UPDATING - The table is being updated.
- DELETING - The table is being deleted.
- ACTIVE - The table is ready for use.
tdTableARN :: Lens' TableDescription (Maybe Text) Source #
The Amazon Resource Name (ARN) that uniquely identifies the table.
tdKeySchema :: Lens' TableDescription (Maybe (NonEmpty KeySchemaElement)) Source #
The primary key structure for the table. Each KeySchemaElement consists of:
- AttributeName - The name of the attribute.
- KeyType - The key type for the attribute. Can be either
HASH
orRANGE
.
For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide.
tdGlobalSecondaryIndexes :: Lens' TableDescription [GlobalSecondaryIndexDescription] Source #
The global secondary indexes, if any, on the table. Each index is scoped to a given hash key value. Each element is composed of:
- Backfilling - If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table; it is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during a CreateTable operation.)
- IndexName - The name of the global secondary index.
- IndexSizeBytes - The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
IndexStatus - The current status of the global secondary index:
- CREATING - The index is being created.
- UPDATING - The index is being updated.
- DELETING - The index is being deleted.
- ACTIVE - The index is ready for use.
- ItemCount - The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
- KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same hash key attribute as the table.
Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:
ProjectionType - One of the following:
KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.ALL
- All of the table attributes are projected into the index.
- NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
- ProvisionedThroughput - The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.
If the table is in the DELETING
state, no information about indexes
will be returned.
tdLatestStreamLabel :: Lens' TableDescription (Maybe Text) Source #
A timestamp, in ISO 8601 format, for this stream.
Note that LatestStreamLabel is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:
- the AWS customer ID.
- the table name.
- the StreamLabel.
tdLocalSecondaryIndexes :: Lens' TableDescription [LocalSecondaryIndexDescription] Source #
Represents one or more local secondary indexes on the table. Each index is scoped to a given hash key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:
- IndexName - The name of the local secondary index.
- KeySchema - Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same hash key attribute as the table.
Projection - Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:
ProjectionType - One of the following:
KEYS_ONLY
- Only the index and primary keys are projected into the index.INCLUDE
- Only the specified table attributes are projected into the index. The list of projected attributes are in NonKeyAttributes.ALL
- All of the table attributes are projected into the index.
- NonKeyAttributes - A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided in NonKeyAttributes, summed across all of the secondary indexes, must not exceed 20. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
- IndexSizeBytes - Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
- ItemCount - Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
If the table is in the DELETING
state, no information about indexes
will be returned.
tdCreationDateTime :: Lens' TableDescription (Maybe UTCTime) Source #
The date and time when the table was created, in UNIX epoch time format.
tdItemCount :: Lens' TableDescription (Maybe Integer) Source #
The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
tdTableName :: Lens' TableDescription (Maybe Text) Source #
The name of the table.
tdStreamSpecification :: Lens' TableDescription (Maybe StreamSpecification) Source #
The current DynamoDB Streams configuration for the table.
UpdateGlobalSecondaryIndexAction
data UpdateGlobalSecondaryIndexAction Source #
Represents the new provisioned throughput settings to be applied to a global secondary index.
See: updateGlobalSecondaryIndexAction
smart constructor.
updateGlobalSecondaryIndexAction Source #
Creates a value of UpdateGlobalSecondaryIndexAction
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ugsiaIndexName :: Lens' UpdateGlobalSecondaryIndexAction Text Source #
The name of the global secondary index to be updated.
ugsiaProvisionedThroughput :: Lens' UpdateGlobalSecondaryIndexAction ProvisionedThroughput Source #
Undocumented member.
WriteRequest
data WriteRequest Source #
Represents an operation to perform - either DeleteItem or PutItem. You can only request one of these operations, not both, in a single WriteRequest. If you do need to perform both of these operations, you will need to provide two separate WriteRequest objects.
See: writeRequest
smart constructor.
writeRequest :: WriteRequest Source #
Creates a value of WriteRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
wrDeleteRequest :: Lens' WriteRequest (Maybe DeleteRequest) Source #
A request to perform a DeleteItem operation.
wrPutRequest :: Lens' WriteRequest (Maybe PutRequest) Source #
A request to perform a PutItem operation.