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

Description

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

Synopsis

- data PutItem = PutItem {
  - piTable :: Text
  - piItem :: Item
  - piExpect :: Conditions
  - piReturn :: UpdateReturn
  - piRetCons :: ReturnConsumption
  - piRetMet :: ReturnItemCollectionMetrics
  }
- putItem :: Text -> Item -> PutItem
- data PutItemResponse = PutItemResponse {
  - pirAttrs :: Maybe Item
  - pirConsumed :: Maybe ConsumedCapacity
  - pirColMet :: Maybe ItemCollectionMetrics
  }

# Documentation

data PutItem Source #

Constructors

PutItem |

Fields

- piTable :: Text

  Target table

- piItem :: Item

  An item to Put. Attributes here will replace what maybe under the key on DDB.

- piExpect :: Conditions

  (Possible) set of expections for a conditional Put

- piReturn :: UpdateReturn

  What to return from this query.

- piRetCons :: ReturnConsumption
- piRetMet :: ReturnItemCollectionMetrics

#### Instances

Instances details

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

Instance details

Defined in Aws.DynamoDb.Commands.PutItem

Associated Types

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

Methods

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

Read PutItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.PutItem Methods readsPrec :: Int -> ReadS PutItem Source # readList :: ReadS [PutItem] Source # readPrec :: ReadPrec PutItem Source # readListPrec :: ReadPrec [PutItem] Source #
Show PutItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.PutItem Methods showsPrec :: Int -> PutItem -> ShowS Source # show :: PutItem -> String Source # showList :: [PutItem] -> ShowS Source #
Eq PutItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.PutItem Methods (==) :: PutItem -> PutItem -> Bool Source # (/=) :: PutItem -> PutItem -> Bool Source #
Ord PutItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.PutItem Methods compare :: PutItem -> PutItem -> Ordering Source # (<) :: PutItem -> PutItem -> Bool Source # (<=) :: PutItem -> PutItem -> Bool Source # (>) :: PutItem -> PutItem -> Bool Source # (>=) :: PutItem -> PutItem -> Bool Source # max :: PutItem -> PutItem -> PutItem Source # min :: PutItem -> PutItem -> PutItem Source #
Transaction PutItem PutItemResponse Source # |
Instance details Defined in Aws.DynamoDb.Commands.PutItem
type ServiceConfiguration PutItem Source # |
Instance details Defined in Aws.DynamoDb.Commands.PutItem type ServiceConfiguration PutItem = DdbConfiguration

putItem Source #

Arguments

:: Text | A Dynamo table name
-> Item | Item to be saved
-> PutItem |

Construct a minimal `PutItem` request.

data PutItemResponse Source #

Constructors

PutItemResponse |

Fields

- pirAttrs :: Maybe Item

  Old attributes, if requested

- pirConsumed :: Maybe ConsumedCapacity

  Amount of capacity consumed

- pirColMet :: Maybe ItemCollectionMetrics

  Collection metrics if they have been requested.

#### Instances

Instances details

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

Instance details

Defined in Aws.DynamoDb.Commands.PutItem

Associated Types

type MemoryResponse PutItemResponse |
Instance details Defined in Aws.DynamoDb.Commands.PutItem type MemoryResponse PutItemResponse = PutItemResponse

Methods

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

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

Instance details

Defined in Aws.DynamoDb.Commands.PutItem

Methods

compare :: PutItemResponse -> PutItemResponse -> Ordering Source #

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

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

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

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

max :: PutItemResponse -> PutItemResponse -> PutItemResponse Source #

min :: PutItemResponse -> PutItemResponse -> PutItemResponse Source #

ResponseConsumer r PutItemResponse Source # |

Instance details

Defined in Aws.DynamoDb.Commands.PutItem

Associated Types

type ResponseMetadata PutItemResponse |
Instance details Defined in Aws.DynamoDb.Commands.PutItem type ResponseMetadata PutItemResponse = DdbResponse

Methods

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

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