[ 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 | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <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 | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those 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. This may not be specified along with --cli-input-yaml.

--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. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

--cli-auto-prompt (boolean) Automatically prompt for CLI input parameters.

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.