AWS CloudFormation
User Guide (Version )

AWS::QLDB::Ledger

The AWS::QLDB::Ledger resource creates a new Amazon Quantum Ledger Database (Amazon QLDB) ledger in your AWS account. Amazon QLDB is a fully managed ledger database owned by a central trusted authority that provides a transparent, immutable, and cryptographically verifiable transaction log of all of your application changes.

For more information, see CreateLedger in the Amazon QLDB API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::QLDB::Ledger", "Properties" : { "DeletionProtection" : Boolean, "Name" : String, "PermissionsMode" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::QLDB::Ledger Properties: DeletionProtection: Boolean Name: String PermissionsMode: String Tags: - Tag

Properties

DeletionProtection

The flag that prevents a ledger from being deleted by any user. If not provided on ledger creation, this feature is enabled (true) by default.

If deletion protection is enabled, you must first disable it before you can delete the ledger using the QLDB API or the AWS Command Line Interface (AWS CLI). You can disable it by calling the UpdateLedger operation to set the flag to false. The QLDB console disables deletion protection for you when you use it to delete a ledger.

Required: No

Type: Boolean

Update requires: No interruption

Name

The name of the ledger that you want to create. The name must be unique among all of your ledgers in the current AWS Region.

Required: No

Type: String

Minimum: 1

Maximum: 32

Pattern: (?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$

Update requires: Replacement

PermissionsMode

The permissions mode to assign to the ledger that you want to create.

Required: Yes

Type: String

Allowed Values: ALLOW_ALL

Update requires: Replacement

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag.

Required: No

Type: List of Tag

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name. For example:

{ "Ref": "myQLDBLedger" }

For the resource with the logical ID myQLDBLedger, Ref will return the Amazon QLDB ledger name.

For more information about using the Ref function, see Ref.

Examples

Amazon QLDB Ledger

The following example describes an Amazon QLDB ledger with a PermissionsMode of ALLOW_ALL. The only permissions mode currently supported for a QLDB ledger is ALLOW_ALL.

JSON

{ "AWSTemplateFormatVersion" : "2010-09-09", "Resources" : { "myQLDBLedger": { "Type": "AWS::QLDB::Ledger", "Properties": { "DeletionProtection": true, "Name": "exampleLedger", "PermissionsMode": "ALLOW_ALL", "Tags": [ { "Key": "foo", "Value": "bar" } ] } } } }

YAML

AWSTemplateFormatVersion: "2010-09-09" Resources: myQLDBLedger: Type: "AWS::QLDB::Ledger" Properties: DeletionProtection: true Name: "exampleLedger" PermissionsMode: "ALLOW_ALL" Tags: - Key: foo Value: bar

See Also