aws-0.24.4: Amazon Web Services (AWS) for Haskell

Copyright | Soostone Inc
License | BSD3
Maintainer | Ozgun Ataman <ozgun.ataman@soostone.com>
Stability | experimental
Safe Haskell | None
Language | Haskell2010

Aws.DynamoDb.Commands.UpdateItem

Description

Synopsis

- data UpdateItem = UpdateItem {
  - uiTable :: Text
  - uiKey :: PrimaryKey
  - uiUpdates :: [AttributeUpdate]
  - uiExpect :: Conditions
  - uiReturn :: UpdateReturn
  - uiRetCons :: ReturnConsumption
  - uiRetMet :: ReturnItemCollectionMetrics
  }
- updateItem :: Text -> PrimaryKey -> [AttributeUpdate] -> UpdateItem
- data AttributeUpdate = AttributeUpdate {
  - auAttr :: Attribute
  - auAction :: UpdateAction
  }
- au :: Attribute -> AttributeUpdate
- data UpdateAction
  - = UPut
  - | UAdd
  - | UDelete
- data UpdateItemResponse = UpdateItemResponse {
  - uirAttrs :: Maybe Item
  - uirConsumed :: Maybe ConsumedCapacity
  }

# Documentation

data UpdateItem Source #

An `UpdateItem` request.

Constructors

UpdateItem |

Fields

- uiTable :: Text
- uiKey :: PrimaryKey
- uiUpdates :: [AttributeUpdate]
- uiExpect :: Conditions

  Conditional update - see DynamoDb documentation

- uiReturn :: UpdateReturn
- uiRetCons :: ReturnConsumption
- uiRetMet :: ReturnItemCollectionMetrics

#### Instances

Instances details

ToJSON UpdateItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods toJSON :: UpdateItem -> Value Source # toEncoding :: UpdateItem -> Encoding Source # toJSONList :: [UpdateItem] -> Value Source # toEncodingList :: [UpdateItem] -> Encoding Source # omitField :: UpdateItem -> Bool Source #
SignQuery UpdateItem Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Associated Types

type ServiceConfiguration UpdateItem |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem type ServiceConfiguration UpdateItem = DdbConfiguration

Methods

signQuery :: UpdateItem -> ServiceConfiguration UpdateItem queryType -> SignatureData -> SignedQuery Source #

Read UpdateItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods readsPrec :: Int -> ReadS UpdateItem Source # readList :: ReadS [UpdateItem] Source # readPrec :: ReadPrec UpdateItem Source # readListPrec :: ReadPrec [UpdateItem] Source #
Show UpdateItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods showsPrec :: Int -> UpdateItem -> ShowS Source # show :: UpdateItem -> String Source # showList :: [UpdateItem] -> ShowS Source #
Eq UpdateItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods (==) :: UpdateItem -> UpdateItem -> Bool Source # (/=) :: UpdateItem -> UpdateItem -> Bool Source #
Ord UpdateItem Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Methods

compare :: UpdateItem -> UpdateItem -> Ordering Source #

(<) :: UpdateItem -> UpdateItem -> Bool Source #

(<=) :: UpdateItem -> UpdateItem -> Bool Source #

(>) :: UpdateItem -> UpdateItem -> Bool Source #

(>=) :: UpdateItem -> UpdateItem -> Bool Source #

max :: UpdateItem -> UpdateItem -> UpdateItem Source #

min :: UpdateItem -> UpdateItem -> UpdateItem Source #

Transaction UpdateItem UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem
type ServiceConfiguration UpdateItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem type ServiceConfiguration UpdateItem = DdbConfiguration

updateItem Source #

Arguments

:: Text | Table name
-> PrimaryKey | Primary key for item
-> [AttributeUpdate] | Updates for this item
-> UpdateItem |

Construct a minimal `UpdateItem` request.

data AttributeUpdate Source #

Constructors

AttributeUpdate |

Fields

- auAttr :: Attribute

  Attribute key-value

- auAction :: UpdateAction

  Type of update operation.

#### Instances

Instances details

DynSize AttributeUpdate Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods dynSize :: AttributeUpdate -> Int Source #
Read AttributeUpdate Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods readsPrec :: Int -> ReadS AttributeUpdate Source # readList :: ReadS [AttributeUpdate] Source # readPrec :: ReadPrec AttributeUpdate Source # readListPrec :: ReadPrec [AttributeUpdate] Source #
Show AttributeUpdate Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods showsPrec :: Int -> AttributeUpdate -> ShowS Source # show :: AttributeUpdate -> String Source # showList :: [AttributeUpdate] -> ShowS Source #
Eq AttributeUpdate Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods (==) :: AttributeUpdate -> AttributeUpdate -> Bool Source # (/=) :: AttributeUpdate -> AttributeUpdate -> Bool Source #
Ord AttributeUpdate Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Methods

compare :: AttributeUpdate -> AttributeUpdate -> Ordering Source #

(<) :: AttributeUpdate -> AttributeUpdate -> Bool Source #

(<=) :: AttributeUpdate -> AttributeUpdate -> Bool Source #

(>) :: AttributeUpdate -> AttributeUpdate -> Bool Source #

(>=) :: AttributeUpdate -> AttributeUpdate -> Bool Source #

max :: AttributeUpdate -> AttributeUpdate -> AttributeUpdate Source #

min :: AttributeUpdate -> AttributeUpdate -> AttributeUpdate Source #

au :: Attribute -> AttributeUpdate Source #

Shorthand for the `AttributeUpdate` constructor. Defaults to PUT for the update action.

data UpdateAction Source #

Type of attribute update to perform.

See AWS docs at:

    http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html

Constructors

UPut | Simpley write, overwriting any previous value
UAdd | Numerical add or add to set.
UDelete | Empty value: remove; Set value: Subtract from set.

#### Instances

Instances details

ToJSON UpdateAction Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods toJSON :: UpdateAction -> Value Source # toEncoding :: UpdateAction -> Encoding Source # toJSONList :: [UpdateAction] -> Value Source # toEncodingList :: [UpdateAction] -> Encoding Source # omitField :: UpdateAction -> Bool Source #
Default UpdateAction Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods def :: UpdateAction Source #
Read UpdateAction Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods readsPrec :: Int -> ReadS UpdateAction Source # readList :: ReadS [UpdateAction] Source # readPrec :: ReadPrec UpdateAction Source # readListPrec :: ReadPrec [UpdateAction] Source #
Show UpdateAction Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods showsPrec :: Int -> UpdateAction -> ShowS Source # show :: UpdateAction -> String Source # showList :: [UpdateAction] -> ShowS Source #
Eq UpdateAction Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods (==) :: UpdateAction -> UpdateAction -> Bool Source # (/=) :: UpdateAction -> UpdateAction -> Bool Source #
Ord UpdateAction Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Methods

compare :: UpdateAction -> UpdateAction -> Ordering Source #

(<) :: UpdateAction -> UpdateAction -> Bool Source #

(<=) :: UpdateAction -> UpdateAction -> Bool Source #

(>) :: UpdateAction -> UpdateAction -> Bool Source #

(>=) :: UpdateAction -> UpdateAction -> Bool Source #

max :: UpdateAction -> UpdateAction -> UpdateAction Source #

min :: UpdateAction -> UpdateAction -> UpdateAction Source #

data UpdateItemResponse Source #

Constructors

UpdateItemResponse |

Fields

- uirAttrs :: Maybe Item

  Old attributes, if requested

- uirConsumed :: Maybe ConsumedCapacity

  Amount of capacity consumed

#### Instances

Instances details

FromJSON UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods parseJSON :: Value -> Parser UpdateItemResponse Source # parseJSONList :: Value -> Parser [UpdateItemResponse] Source # omittedField :: Maybe UpdateItemResponse Source #
AsMemoryResponse UpdateItemResponse Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Associated Types

type MemoryResponse UpdateItemResponse |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem type MemoryResponse UpdateItemResponse = UpdateItemResponse

Methods

loadToMemory :: UpdateItemResponse -> ResourceT IO (MemoryResponse UpdateItemResponse) Source #

Read UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods readsPrec :: Int -> ReadS UpdateItemResponse Source # readList :: ReadS [UpdateItemResponse] Source # readPrec :: ReadPrec UpdateItemResponse Source # readListPrec :: ReadPrec [UpdateItemResponse] Source #
Show UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods showsPrec :: Int -> UpdateItemResponse -> ShowS Source # show :: UpdateItemResponse -> String Source # showList :: [UpdateItemResponse] -> ShowS Source #
Eq UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem Methods (==) :: UpdateItemResponse -> UpdateItemResponse -> Bool Source # (/=) :: UpdateItemResponse -> UpdateItemResponse -> Bool Source #
Ord UpdateItemResponse Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Methods

compare :: UpdateItemResponse -> UpdateItemResponse -> Ordering Source #

(<) :: UpdateItemResponse -> UpdateItemResponse -> Bool Source #

(<=) :: UpdateItemResponse -> UpdateItemResponse -> Bool Source #

(>) :: UpdateItemResponse -> UpdateItemResponse -> Bool Source #

(>=) :: UpdateItemResponse -> UpdateItemResponse -> Bool Source #

max :: UpdateItemResponse -> UpdateItemResponse -> UpdateItemResponse Source #

min :: UpdateItemResponse -> UpdateItemResponse -> UpdateItemResponse Source #

ResponseConsumer r UpdateItemResponse Source # |

Instance details

Defined in Aws.DynamoDb.Commands.UpdateItem

Associated Types

type ResponseMetadata UpdateItemResponse |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem type ResponseMetadata UpdateItemResponse = DdbResponse

Methods

responseConsumer :: Request -> r -> IORef (ResponseMetadata UpdateItemResponse) -> HTTPResponseConsumer UpdateItemResponse Source #

Transaction UpdateItem UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem
type MemoryResponse UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem type MemoryResponse UpdateItemResponse = UpdateItemResponse
type ResponseMetadata UpdateItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.UpdateItem type ResponseMetadata UpdateItemResponse = DdbResponse