| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.QLDB.GetBlock
Description
Returns a block object at a specified address in a journal. Also returns
a proof of the specified block for verification if DigestTipAddress is
provided.
For information about the data contents in a block, see Journal contents in the Amazon QLDB Developer Guide.
If the specified ledger doesn't exist or is in DELETING status, then
throws ResourceNotFoundException.
If the specified ledger is in CREATING status, then throws
ResourcePreconditionNotMetException.
If no block exists with the specified address, then throws
InvalidParameterException.
Synopsis
- data GetBlock = GetBlock' {}
- newGetBlock :: Text -> ValueHolder -> GetBlock
- getBlock_digestTipAddress :: Lens' GetBlock (Maybe ValueHolder)
- getBlock_name :: Lens' GetBlock Text
- getBlock_blockAddress :: Lens' GetBlock ValueHolder
- data GetBlockResponse = GetBlockResponse' {
- proof :: Maybe (Sensitive ValueHolder)
- httpStatus :: Int
- block :: Sensitive ValueHolder
- newGetBlockResponse :: Int -> ValueHolder -> GetBlockResponse
- getBlockResponse_proof :: Lens' GetBlockResponse (Maybe ValueHolder)
- getBlockResponse_httpStatus :: Lens' GetBlockResponse Int
- getBlockResponse_block :: Lens' GetBlockResponse ValueHolder
Creating a Request
See: newGetBlock smart constructor.
Constructors
| GetBlock' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> ValueHolder | |
| -> GetBlock |
Create a value of GetBlock with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:digestTipAddress:GetBlock', getBlock_digestTipAddress - The latest block location covered by the digest for which to request a
proof. An address is an Amazon Ion structure that has two fields:
strandId and sequenceNo.
For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}.
GetBlock, getBlock_name - The name of the ledger.
$sel:blockAddress:GetBlock', getBlock_blockAddress - The location of the block that you want to request. An address is an
Amazon Ion structure that has two fields: strandId and sequenceNo.
For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}.
Request Lenses
getBlock_digestTipAddress :: Lens' GetBlock (Maybe ValueHolder) Source #
The latest block location covered by the digest for which to request a
proof. An address is an Amazon Ion structure that has two fields:
strandId and sequenceNo.
For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}.
getBlock_blockAddress :: Lens' GetBlock ValueHolder Source #
The location of the block that you want to request. An address is an
Amazon Ion structure that has two fields: strandId and sequenceNo.
For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}.
Destructuring the Response
data GetBlockResponse Source #
See: newGetBlockResponse smart constructor.
Constructors
| GetBlockResponse' | |
Fields
| |
Instances
Arguments
| :: Int | |
| -> ValueHolder | |
| -> GetBlockResponse |
Create a value of GetBlockResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:proof:GetBlockResponse', getBlockResponse_proof - The proof object in Amazon Ion format returned by a GetBlock request.
A proof contains the list of hash values required to recalculate the
specified digest using a Merkle tree, starting with the specified block.
$sel:httpStatus:GetBlockResponse', getBlockResponse_httpStatus - The response's http status code.
$sel:block:GetBlockResponse', getBlockResponse_block - The block data object in Amazon Ion format.
Response Lenses
getBlockResponse_proof :: Lens' GetBlockResponse (Maybe ValueHolder) Source #
The proof object in Amazon Ion format returned by a GetBlock request.
A proof contains the list of hash values required to recalculate the
specified digest using a Merkle tree, starting with the specified block.
getBlockResponse_httpStatus :: Lens' GetBlockResponse Int Source #
The response's http status code.
getBlockResponse_block :: Lens' GetBlockResponse ValueHolder Source #
The block data object in Amazon Ion format.