1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. qldb
  6. getLedger
Viewing docs for AWS v7.52.1
published on Wednesday, Oct 28, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.52.1
published on Wednesday, Oct 28, 2026 by Pulumi

    Use this data source to fetch information about a Quantum Ledger Database.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.qldb.getLedger({
        name: "an_example_ledger",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.qldb.get_ledger(name="an_example_ledger")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/qldb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := qldb.LookupLedger(ctx, &qldb.LookupLedgerArgs{
    			Name: "an_example_ledger",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Qldb.GetLedger.Invoke(new()
        {
            Name = "an_example_ledger",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.qldb.QldbFunctions;
    import com.pulumi.aws.qldb.inputs.GetLedgerArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = QldbFunctions.getLedger(GetLedgerArgs.builder()
                .name("an_example_ledger")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:qldb:getLedger
          arguments:
            name: an_example_ledger
    
    terraform {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_qldb_ledger" "example" {
      name = "an_example_ledger"
    }
    

    Using getLedger

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getLedger(args: GetLedgerArgs, opts?: InvokeOptions): Promise<GetLedgerResult>
    function getLedgerOutput(args: GetLedgerOutputArgs, opts?: InvokeOutputOptions): Output<GetLedgerResult>
    def get_ledger(name: Optional[str] = None,
                   region: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetLedgerResult
    def get_ledger_output(name: pulumi.Input[Optional[str]] = None,
                   region: pulumi.Input[Optional[str]] = None,
                   tags: pulumi.Input[Optional[Mapping[str, pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOutputOptions] = None) -> Output[GetLedgerResult]
    func LookupLedger(ctx *Context, args *LookupLedgerArgs, opts ...InvokeOption) (*LookupLedgerResult, error)
    func LookupLedgerOutput(ctx *Context, args *LookupLedgerOutputArgs, opts ...InvokeOption) LookupLedgerResultOutput

    > Note: This function is named LookupLedger in the Go SDK.

    public static class GetLedger 
    {
        public static Task<GetLedgerResult> InvokeAsync(GetLedgerArgs args, InvokeOptions? opts = null)
        public static Output<GetLedgerResult> Invoke(GetLedgerInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetLedgerResult> Invoke(GetLedgerInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetLedgerResult> getLedger(GetLedgerArgs args, InvokeOptions options)
    public static Output<GetLedgerResult> getLedger(GetLedgerArgs args, InvokeOptions options)
    public static Output<GetLedgerResult> getLedger(GetLedgerArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aws:qldb/getLedger:getLedger
      arguments:
        # arguments dictionary
    data "aws_qldb_get_ledger" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Friendly name of the ledger to match.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Map of tags assigned to the resource.
    Name string
    Friendly name of the ledger to match.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Map of tags assigned to the resource.
    name string
    Friendly name of the ledger to match.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags map(string)
    Map of tags assigned to the resource.
    name String
    Friendly name of the ledger to match.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Map of tags assigned to the resource.
    name string
    Friendly name of the ledger to match.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Map of tags assigned to the resource.
    name str
    Friendly name of the ledger to match.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Map of tags assigned to the resource.
    name String
    Friendly name of the ledger to match.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Map of tags assigned to the resource.

    getLedger Result

    The following output properties are available:

    Arn string
    ARN of the QLDB Ledger.
    DeletionProtection bool
    Deletion protection setting of the QLDB Ledger.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKey string
    KMS key used for encryption of data at rest in the ledger.
    Name string
    PermissionsMode string
    Permissions mode of the QLDB Ledger.
    Region string
    Tags Dictionary<string, string>
    Map of tags assigned to the resource.
    Arn string
    ARN of the QLDB Ledger.
    DeletionProtection bool
    Deletion protection setting of the QLDB Ledger.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKey string
    KMS key used for encryption of data at rest in the ledger.
    Name string
    PermissionsMode string
    Permissions mode of the QLDB Ledger.
    Region string
    Tags map[string]string
    Map of tags assigned to the resource.
    arn string
    ARN of the QLDB Ledger.
    deletion_protection bool
    Deletion protection setting of the QLDB Ledger.
    id string
    The provider-assigned unique ID for this managed resource.
    kms_key string
    KMS key used for encryption of data at rest in the ledger.
    name string
    permissions_mode string
    Permissions mode of the QLDB Ledger.
    region string
    tags map(string)
    Map of tags assigned to the resource.
    arn String
    ARN of the QLDB Ledger.
    deletionProtection Boolean
    Deletion protection setting of the QLDB Ledger.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKey String
    KMS key used for encryption of data at rest in the ledger.
    name String
    permissionsMode String
    Permissions mode of the QLDB Ledger.
    region String
    tags Map<String,String>
    Map of tags assigned to the resource.
    arn string
    ARN of the QLDB Ledger.
    deletionProtection boolean
    Deletion protection setting of the QLDB Ledger.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKey string
    KMS key used for encryption of data at rest in the ledger.
    name string
    permissionsMode string
    Permissions mode of the QLDB Ledger.
    region string
    tags {[key: string]: string}
    Map of tags assigned to the resource.
    arn str
    ARN of the QLDB Ledger.
    deletion_protection bool
    Deletion protection setting of the QLDB Ledger.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key str
    KMS key used for encryption of data at rest in the ledger.
    name str
    permissions_mode str
    Permissions mode of the QLDB Ledger.
    region str
    tags Mapping[str, str]
    Map of tags assigned to the resource.
    arn String
    ARN of the QLDB Ledger.
    deletionProtection Boolean
    Deletion protection setting of the QLDB Ledger.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKey String
    KMS key used for encryption of data at rest in the ledger.
    name String
    permissionsMode String
    Permissions mode of the QLDB Ledger.
    region String
    tags Map<String>
    Map of tags assigned to the resource.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo aws logo
    Viewing docs for AWS v7.52.1
    published on Wednesday, Oct 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial