libZSservicesZSamazonka-qldbZSamazonka-qldb
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

Creating a Request

data GetBlock Source #

See: newGetBlock smart constructor.

Constructors

GetBlock' 

Fields

  • digestTipAddress :: Maybe (Sensitive ValueHolder)

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

  • name :: Text

    The name of the ledger.

  • blockAddress :: Sensitive ValueHolder

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

Instances

Instances details
Eq GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Show GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Generic GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Associated Types

type Rep GetBlock :: Type -> Type #

Methods

from :: GetBlock -> Rep GetBlock x #

to :: Rep GetBlock x -> GetBlock #

NFData GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Methods

rnf :: GetBlock -> () #

Hashable GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Methods

hashWithSalt :: Int -> GetBlock -> Int #

hash :: GetBlock -> Int #

ToJSON GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

AWSRequest GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Associated Types

type AWSResponse GetBlock #

ToHeaders GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Methods

toHeaders :: GetBlock -> [Header] #

ToPath GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

ToQuery GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

type Rep GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

type Rep GetBlock = D1 ('MetaData "GetBlock" "Amazonka.QLDB.GetBlock" "libZSservicesZSamazonka-qldbZSamazonka-qldb" 'False) (C1 ('MetaCons "GetBlock'" 'PrefixI 'True) (S1 ('MetaSel ('Just "digestTipAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive ValueHolder))) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "blockAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive ValueHolder)))))
type AWSResponse GetBlock Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

newGetBlock Source #

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

$sel:name: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_name :: Lens' GetBlock Text Source #

The name of the ledger.

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

  • proof :: Maybe (Sensitive ValueHolder)

    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.

  • httpStatus :: Int

    The response's http status code.

  • block :: Sensitive ValueHolder

    The block data object in Amazon Ion format.

Instances

Instances details
Eq GetBlockResponse Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Show GetBlockResponse Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Generic GetBlockResponse Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Associated Types

type Rep GetBlockResponse :: Type -> Type #

NFData GetBlockResponse Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

Methods

rnf :: GetBlockResponse -> () #

type Rep GetBlockResponse Source # 
Instance details

Defined in Amazonka.QLDB.GetBlock

type Rep GetBlockResponse = D1 ('MetaData "GetBlockResponse" "Amazonka.QLDB.GetBlock" "libZSservicesZSamazonka-qldbZSamazonka-qldb" 'False) (C1 ('MetaCons "GetBlockResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "proof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive ValueHolder))) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "block") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive ValueHolder)))))

newGetBlockResponse Source #

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.