Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . qldb ]

list-ledgers

Description

Returns an array of ledger summaries that are associated with the current AWS account and Region.

This action returns a maximum of 100 items and is paginated so that you can retrieve all the items by calling ListLedgers multiple times.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  list-ledgers
[--max-results <value>]
[--next-token <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--max-results (integer)

The maximum number of results to return in a single ListLedgers request. (The actual number of results returned might be fewer.)

--next-token (string)

A pagination token, indicating that you want to retrieve the next page of results. If you received a value for NextToken in the response from a previous ListLedgers call, then you should use that value as input here.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To list your available ledgers

The following list-ledgers example lists all ledgers that are associated with the current AWS account and Region.

aws qldb list-ledgers

Output:

{
    "Ledgers": [
        {
            "State": "ACTIVE",
            "CreationDateTime": 1568839243.951,
            "Name": "myExampleLedger"
        },
        {
            "State": "ACTIVE",
            "CreationDateTime": 1568839543.557,
            "Name": "myExampleLedger2"
        }
    ]
}

For more information, see Basic Operations for Amazon QLDB Ledgers in the Amazon QLDB Developer Guide.

Output

Ledgers -> (list)

The array of ledger summaries that are associated with the current AWS account and Region.

(structure)

Information about a ledger, including its name, state, and when it was created.

Name -> (string)

The name of the ledger.

State -> (string)

The current status of the ledger.

CreationDateTime -> (timestamp)

The date and time, in epoch time format, when the ledger was created. (Epoch time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 UTC.)

NextToken -> (string)

A pagination token, indicating whether there are more results available:

  • If NextToken is empty, then the last page of results has been processed and there are no more results to be retrieved.
  • If NextToken is not empty, then there are more results available. To retrieve the next page of results, use the value of NextToken in a subsequent ListLedgers call.