QLDB / Client / get_revision

get_revision#

QLDB.Client.get_revision(**kwargs)#

Returns a revision data object for a specified document ID and block address. Also returns a proof of the specified revision for verification if DigestTipAddress is provided.

See also: AWS API Documentation

Request Syntax

response = client.get_revision(
    Name='string',
    BlockAddress={
        'IonText': 'string'
    },
    DocumentId='string',
    DigestTipAddress={
        'IonText': 'string'
    }
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The name of the ledger.

  • BlockAddress (dict) –

    [REQUIRED]

    The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

    For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}.

    • IonText (string) –

      An Amazon Ion plaintext value contained in a ValueHolder structure.

  • DocumentId (string) –

    [REQUIRED]

    The UUID (represented in Base62-encoded text) of the document to be verified.

  • DigestTipAddress (dict) –

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

    • IonText (string) –

      An Amazon Ion plaintext value contained in a ValueHolder structure.

Return type:

dict

Returns:

Response Syntax

{
    'Proof': {
        'IonText': 'string'
    },
    'Revision': {
        'IonText': 'string'
    }
}

Response Structure

  • (dict) –

    • Proof (dict) –

      The proof object in Amazon Ion format returned by a GetRevision request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.

      • IonText (string) –

        An Amazon Ion plaintext value contained in a ValueHolder structure.

    • Revision (dict) –

      The document revision data object in Amazon Ion format.

      • IonText (string) –

        An Amazon Ion plaintext value contained in a ValueHolder structure.

Exceptions