amazonka-dynamodb-0.3.0: Amazon DynamoDB SDK.

Safe HaskellNone
LanguageHaskell2010

Network.AWS.DynamoDB.Types

Contents

Synopsis

Service

data DynamoDB Source

Version 2012-08-10 of the Amazon DynamoDB service.

Instances

AWSService DynamoDB 
type Sg DynamoDB = V4 
type Er DynamoDB = JSONError 

Error

data JSONError :: *

Instances

Eq JSONError 
Show JSONError 
Generic JSONError 
FromJSON JSONError 
AWSErrorCode JSONError 
type Rep JSONError = D1 D1JSONError (C1 C1_0JSONError ((:*:) (S1 S1_0_0JSONError (Rec0 (Maybe Text))) ((:*:) (S1 S1_0_1JSONError (Rec0 ErrorCode)) (S1 S1_0_2JSONError (Rec0 Text))))) 

WriteRequest

writeRequest :: WriteRequest Source

WriteRequest constructor.

The fields accessible through corresponding lenses are:

wDeleteRequest :: Lens' WriteRequest (Maybe DeleteRequest) Source

A request to perform a DeleteItem operation.

wPutRequest :: Lens' WriteRequest (Maybe PutRequest) Source

A request to perform a PutItem operation.

ProvisionedThroughputDescription

ptdLastDecreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime) Source

The date and time of the last provisioned throughput decrease for this table.

ptdLastIncreaseDateTime :: Lens' ProvisionedThroughputDescription (Maybe UTCTime) Source

The date and time of the last provisioned throughput increase for this table.

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.

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.

ptdWriteCapacityUnits :: Lens' ProvisionedThroughputDescription (Maybe Natural) Source

The maximum number of writes consumed per second before DynamoDB returns a ThrottlingException.

KeyType

data KeyType Source

Constructors

Hash

HASH

Range

RANGE

AttributeValue

attributeValue :: AttributeValue Source

AttributeValue constructor.

The fields accessible through corresponding lenses are:

avB :: Lens' AttributeValue (Maybe Base64) Source

A Binary data type.

avBOOL :: Lens' AttributeValue (Maybe Bool) Source

A Boolean data type.

avBS :: Lens' AttributeValue [Base64] Source

A Binary Set data type.

avL :: Lens' AttributeValue [AttributeValue] Source

A List of attribute values.

avM :: Lens' AttributeValue (HashMap Text AttributeValue) Source

A Map of attribute values.

avN :: Lens' AttributeValue (Maybe Text) Source

A Number data type.

avNS :: Lens' AttributeValue [Text] Source

A Number Set data type.

avNULL :: Lens' AttributeValue (Maybe Bool) Source

A Null data type.

avS :: Lens' AttributeValue (Maybe Text) Source

A String data type.

avSS :: Lens' AttributeValue [Text] Source

A String Set data type.

IndexStatus

ProvisionedThroughput

ptReadCapacityUnits :: Lens' ProvisionedThroughput Natural Source

The maximum number of strongly consistent reads consumed per second before DynamoDB returns a ThrottlingException. For more information, see SpecifyingRead 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.

TableStatus

ProjectionType

TableDescription

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.

tdCreationDateTime :: Lens' TableDescription UTCTime Source

The date and time when the table was created, in UNIX epoch time format.

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 specified 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.

tdItemCount :: Lens' TableDescription 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.

tdKeySchema :: Lens' TableDescription (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 or RANGE.

For more information about primary keys, see Primary Key in the AmazonDynamoDB Developer Guide.

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 specified 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.

tdProvisionedThroughput :: Lens' TableDescription ProvisionedThroughputDescription Source

The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.

tdTableName :: Lens' TableDescription Text Source

The name of the table.

tdTableSizeBytes :: Lens' TableDescription 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.

tdTableStatus :: Lens' TableDescription TableStatus Source

The current state of the table:

CREATING - The table is being created, as the result of a CreateTable operation.

UPDATING - The table is being updated, as the result of an UpdateTable operation.

DELETING - The table is being deleted, as the result of a DeleteTable operation.

ACTIVE - The table is ready for use.

KeysAndAttributes

kaaAttributesToGet :: Lens' KeysAndAttributes (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.

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.

kaaExpressionAttributeNames :: Lens' KeysAndAttributes (HashMap Text Text) Source

One or more substitution tokens for simplifying complex expressions. The following are some use cases for using ExpressionAttributeNames:

To shorten an attribute name that is very long or unwieldy in an expression.

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 expression:

'order.customerInfo.LastName = Smith OR order.customerInfo.LastName =Jones'

Now suppose that you specified the following for ExpressionAttributeNames:

'{"#name":"order.customerInfo.LastName"}'

The expression can now be simplified as follows:

'name = Jones'

For more information on expression attribute names, go to Accessing ItemAttributes in the Amazon DynamoDB Developer Guide.

kaaKeys :: Lens' KeysAndAttributes (NonEmpty (HashMap Text AttributeValue)) Source

The primary key attribute values that define the items and the attributes associated with the items.

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 expression 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 on projection expressions, go to Accessing ItemAttributes in the Amazon DynamoDB Developer Guide.

ReturnConsumedCapacity

ReturnItemCollectionMetrics

AttributeValueUpdate

attributeValueUpdate :: AttributeValueUpdate Source

AttributeValueUpdate constructor.

The fields accessible through corresponding lenses are:

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 of ADD 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 to ADD 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.

ExpectedAttributeValue

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 example when evaluating query expressions.

For information on specifying data types in JSON, see JSON Data Format in the Amazon DynamoDB Developer Guide.

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 specified 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 specified 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 specified 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 specified 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 specified 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 specified 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 using NOT_NULL, the result is a Boolean true. This result is because the attribute "a" exists; its data type is not relevant to the NOT_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 using NULL, the result is a Boolean false. This is because the attribute "a" exists; its data type is not relevant to the NULL 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 specified 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"]}'

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 specify a Value. (You cannot expect an attribute to have a value, while also expecting it not to exist.)

AttributeDefinition

ComparisonOperator

ReturnValue

LocalSecondaryIndex

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).

GlobalSecondaryIndexDescription

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.

gsidIndexName :: Lens' GlobalSecondaryIndexDescription (Maybe Text) Source

The name of the global secondary index.

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, as the result of a CreateTable or UpdateTable operation.

UPDATING - The index is being updated, as the result of a CreateTable or UpdateTable operation.

DELETING - The index is being deleted, as the result of an UpdateTable or DeleteTable operation.

ACTIVE - The index is ready for use.

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.

gsidKeySchema :: Lens' GlobalSecondaryIndexDescription (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).

ItemCollectionMetrics

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.

Capacity

capacity :: Capacity Source

Capacity constructor.

The fields accessible through corresponding lenses are:

cCapacityUnits :: Lens' Capacity (Maybe Double) Source

The total number of capacity units consumed on a table or an index.

ConsumedCapacity

ccCapacityUnits :: Lens' ConsumedCapacity (Maybe Double) Source

The total number of capacity units consumed by the operation.

ccGlobalSecondaryIndexes :: Lens' ConsumedCapacity (HashMap Text Capacity) Source

The amount of throughput consumed on each global index affected 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.

GlobalSecondaryIndex

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).

LocalSecondaryIndexDescription

lsidIndexName :: Lens' LocalSecondaryIndexDescription (Maybe Text) Source

Represents the name of the local secondary index.

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.

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.

lsidKeySchema :: Lens' LocalSecondaryIndexDescription (NonEmpty KeySchemaElement) Source

The complete index key schema, which consists of one or more pairs of attribute names and key types (HASH or RANGE).

AttributeAction

ScalarAttributeType

Projection

projection Source

Projection constructor.

The fields accessible through corresponding lenses are:

pNonKeyAttributes :: Lens' Projection (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.

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.

CreateGlobalSecondaryIndexAction

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.

Select

data Select Source

Constructors

AllAttributes

ALL_ATTRIBUTES

AllProjectedAttributes

ALL_PROJECTED_ATTRIBUTES

Count

COUNT

SpecificAttributes

SPECIFIC_ATTRIBUTES

Instances

KeySchemaElement

keySchemaElement Source

KeySchemaElement constructor.

The fields accessible through corresponding lenses are:

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.

DeleteGlobalSecondaryIndexAction

dgsiaIndexName :: Lens' DeleteGlobalSecondaryIndexAction Text Source

The name of the global secondary index to be deleted.

DeleteRequest

deleteRequest :: DeleteRequest Source

DeleteRequest constructor.

The fields accessible through corresponding lenses are:

dKey :: 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.

UpdateGlobalSecondaryIndexAction

ugsiaIndexName :: Lens' UpdateGlobalSecondaryIndexAction Text Source

The name of the global secondary index to be updated.

PutRequest

putRequest :: PutRequest Source

PutRequest constructor.

The fields accessible through corresponding lenses are:

pItem :: 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.

Condition

condition Source

Condition constructor.

The fields accessible through corresponding lenses are:

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, for example when evaluating query expressions.

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 specified 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 specified 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 specified 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 specified 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 specified 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 specified 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 using NOT_NULL, the result is a Boolean true. This result is because the attribute "a" exists; its data type is not relevant to the NOT_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 using NULL, the result is a Boolean false. This is because the attribute "a" exists; its data type is not relevant to the NULL 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 specified 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.

ConditionalOperator

GlobalSecondaryIndexUpdate

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.