HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //lib/python3/dist-packages/awscli/examples/qldb/create-ledger.rst
**Example 1: To create a ledger with default properties**

The following ``create-ledger`` example creates a ledger with the name ``myExampleLedger`` and the permissions mode ``ALLOW_ALL``. The optional parameter for deletion protection is not specified, so it defaults to ``true``. ::

    aws qldb create-ledger \
        --name myExampleLedger \
        --permissions-mode ALLOW_ALL

Output::

    {
        "State": "CREATING",
        "Arn": "arn:aws:qldb:us-west-2:123456789012:ledger/myExampleLedger",
        "DeletionProtection": true,
        "CreationDateTime": 1568839243.951,
        "Name": "myExampleLedger"
    }

**Example 2: To create a ledger with deletion protection disabled and with specified tags**

The following ``create-ledger`` example creates a ledger with the name ``myExampleLedger2`` and the permissions mode ``ALLOW_ALL``. The deletion protection feature is disabled, and the specified tags are attached to the resource. ::

    aws qldb create-ledger \
        --name myExampleLedger \
        --no-deletion-protection \
        --permissions-mode ALLOW_ALL \
        --tags IsTest=true,Domain=Test

Output::

    {
        "Arn": "arn:aws:qldb:us-west-2:123456789012:ledger/myExampleLedger2",
        "DeletionProtection": false,
        "CreationDateTime": 1568839543.557,
        "State": "CREATING",
        "Name": "myExampleLedger2"
    }


For more information, see `Basic Operations for Amazon QLDB Ledgers <https://docs.aws.amazon.com/qldb/latest/developerguide/ledger-management.basics.html>`__ in the *Amazon QLDB Developer Guide*.