Class: AWS.QLDB

Inherits:
AWS.Service show all
Identifier:
qldb
API Version:
2019-01-02
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

The control plane for Amazon QLDB

Sending a Request Using QLDB

var qldb = new AWS.QLDB();
qldb.createLedger(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the QLDB object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var qldb = new AWS.QLDB({apiVersion: '2019-01-02'});

You can also set the API version globally in AWS.config.apiVersions using the qldb service identifier:

AWS.config.apiVersions = {
  qldb: '2019-01-02',
  // other service API versions
};

var qldb = new AWS.QLDB();

Version:

  • 2019-01-02

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.QLDB(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a QLDB object

var qldb = new AWS.QLDB({apiVersion: '2019-01-02'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.QLDB.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.QLDB.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.QLDB.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

createLedger(params = {}, callback) ⇒ AWS.Request

Creates a new ledger in your AWS account.

Service Reference:

Examples:

Calling the createLedger operation

var params = {
  Name: 'STRING_VALUE', /* required */
  PermissionsMode: ALLOW_ALL, /* required */
  DeletionProtection: true || false,
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
qldb.createLedger(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      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.

    • Tags — (map<String>)

      The key-value pairs to add as tags to the ledger that you want to create. Tag keys are case sensitive. Tag values are case sensitive and can be null.

    • PermissionsMode — (String)

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

      Possible values include:
      • "ALLOW_ALL"
    • DeletionProtection — (Boolean)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the ledger.

      • Arn — (String)

        The Amazon Resource Name (ARN) for the ledger.

      • State — (String)

        The current status of the ledger.

        Possible values include:
        • "CREATING"
        • "ACTIVE"
        • "DELETING"
        • "DELETED"
      • CreationDateTime — (Date)

        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.)

      • DeletionProtection — (Boolean)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteLedger(params = {}, callback) ⇒ AWS.Request

Deletes a ledger and all of its contents. This action is irreversible.

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.

Service Reference:

Examples:

Calling the deleteLedger operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
qldb.deleteLedger(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger that you want to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeJournalS3Export(params = {}, callback) ⇒ AWS.Request

Returns information about a journal export job, including the ledger name, export ID, when it was created, current status, and its start and end time export parameters.

If the export job with the given ExportId doesn't exist, then throws ResourceNotFoundException.

If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException.

Service Reference:

Examples:

Calling the describeJournalS3Export operation

var params = {
  ExportId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE' /* required */
};
qldb.describeJournalS3Export(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

    • ExportId — (String)

      The unique ID of the journal export job that you want to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ExportDescription — (map)

        Information about the journal export job returned by a DescribeJournalS3Export request.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • ExportIdrequired — (String)

          The unique ID of the journal export job.

        • ExportCreationTimerequired — (Date)

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

        • Statusrequired — (String)

          The current state of the journal export job.

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "CANCELLED"
        • InclusiveStartTimerequired — (Date)

          The inclusive start date and time for the range of journal contents that are specified in the original export request.

        • ExclusiveEndTimerequired — (Date)

          The exclusive end date and time for the range of journal contents that are specified in the original export request.

        • S3ExportConfigurationrequired — (map)

          The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.

          • Bucketrequired — (String)

            The Amazon S3 bucket name in which a journal export job writes the journal contents.

            The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and Limitations in the Amazon S3 Developer Guide.

          • Prefixrequired — (String)

            The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.

            The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the Amazon S3 Developer Guide.

            The following are examples of valid Prefix values:

            • JournalExports-ForMyLedger/Testing/

            • JournalExports

            • My:Tests/

          • EncryptionConfigurationrequired — (map)

            The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.

            • ObjectEncryptionTyperequired — (String)

              The Amazon S3 object encryption type.

              To learn more about server-side encryption options in Amazon S3, see Protecting Data Using Server-Side Encryption in the Amazon S3 Developer Guide.

              Possible values include:
              • "SSE_KMS"
              • "SSE_S3"
              • "NO_ENCRYPTION"
            • KmsKeyArn — (String)

              The Amazon Resource Name (ARN) for a customer master key (CMK) in AWS Key Management Service (AWS KMS).

              You must provide a KmsKeyArn if you specify SSE_KMS as the ObjectEncryptionType.

              KmsKeyArn is not required if you specify SSE_S3 as the ObjectEncryptionType.

        • RoleArnrequired — (String)

          The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:

          • Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.

          • (Optional) Use your customer master key (CMK) in AWS Key Management Service (AWS KMS) for server-side encryption of your exported data.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeLedger(params = {}, callback) ⇒ AWS.Request

Returns information about a ledger, including its state and when it was created.

Service Reference:

Examples:

Calling the describeLedger operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
qldb.describeLedger(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger that you want to describe.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the ledger.

      • Arn — (String)

        The Amazon Resource Name (ARN) for the ledger.

      • State — (String)

        The current status of the ledger.

        Possible values include:
        • "CREATING"
        • "ACTIVE"
        • "DELETING"
        • "DELETED"
      • CreationDateTime — (Date)

        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.)

      • DeletionProtection — (Boolean)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

exportJournalToS3(params = {}, callback) ⇒ AWS.Request

Exports journal contents within a date and time range from a ledger into a specified Amazon Simple Storage Service (Amazon S3) bucket. The data is written as files in Amazon Ion format.

If the ledger with the given Name doesn't exist, then throws ResourceNotFoundException.

If the ledger with the given Name is in CREATING status, then throws ResourcePreconditionNotMetException.

You can initiate up to two concurrent journal export requests for each ledger. Beyond this limit, journal export requests throw LimitExceededException.

Service Reference:

Examples:

Calling the exportJournalToS3 operation

var params = {
  ExclusiveEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  InclusiveStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  Name: 'STRING_VALUE', /* required */
  RoleArn: 'STRING_VALUE', /* required */
  S3ExportConfiguration: { /* required */
    Bucket: 'STRING_VALUE', /* required */
    EncryptionConfiguration: { /* required */
      ObjectEncryptionType: SSE_KMS | SSE_S3 | NO_ENCRYPTION, /* required */
      KmsKeyArn: 'STRING_VALUE'
    },
    Prefix: 'STRING_VALUE' /* required */
  }
};
qldb.exportJournalToS3(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

    • InclusiveStartTime — (Date)

      The inclusive start date and time for the range of journal contents that you want to export.

      The InclusiveStartTime must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z

      The InclusiveStartTime must be before ExclusiveEndTime.

      If you provide an InclusiveStartTime that is before the ledger's CreationDateTime, Amazon QLDB defaults it to the ledger's CreationDateTime.

    • ExclusiveEndTime — (Date)

      The exclusive end date and time for the range of journal contents that you want to export.

      The ExclusiveEndTime must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z

      The ExclusiveEndTime must be less than or equal to the current UTC date and time.

    • S3ExportConfiguration — (map)

      The configuration settings of the Amazon S3 bucket destination for your export request.

      • Bucketrequired — (String)

        The Amazon S3 bucket name in which a journal export job writes the journal contents.

        The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and Limitations in the Amazon S3 Developer Guide.

      • Prefixrequired — (String)

        The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.

        The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the Amazon S3 Developer Guide.

        The following are examples of valid Prefix values:

        • JournalExports-ForMyLedger/Testing/

        • JournalExports

        • My:Tests/

      • EncryptionConfigurationrequired — (map)

        The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.

        • ObjectEncryptionTyperequired — (String)

          The Amazon S3 object encryption type.

          To learn more about server-side encryption options in Amazon S3, see Protecting Data Using Server-Side Encryption in the Amazon S3 Developer Guide.

          Possible values include:
          • "SSE_KMS"
          • "SSE_S3"
          • "NO_ENCRYPTION"
        • KmsKeyArn — (String)

          The Amazon Resource Name (ARN) for a customer master key (CMK) in AWS Key Management Service (AWS KMS).

          You must provide a KmsKeyArn if you specify SSE_KMS as the ObjectEncryptionType.

          KmsKeyArn is not required if you specify SSE_S3 as the ObjectEncryptionType.

    • RoleArn — (String)

      The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:

      • Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.

      • (Optional) Use your customer master key (CMK) in AWS Key Management Service (AWS KMS) for server-side encryption of your exported data.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ExportId — (String)

        The unique ID that QLDB assigns to each journal export job.

        To describe your export request and check the status of the job, you can use ExportId to call DescribeJournalS3Export.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getBlock(params = {}, callback) ⇒ AWS.Request

Returns a journal block object at a specified address in a ledger. Also returns a proof of the specified block for verification if DigestTipAddress is provided.

If the specified ledger doesn't exist or is in DELETING status, then throws ResourceNotFoundException.

If the specified ledger is in CREATING status, then throws ResourcePreconditionNotMetException.

If no block exists with the specified address, then throws InvalidParameterException.

Service Reference:

Examples:

Calling the getBlock operation

var params = {
  BlockAddress: { /* required */
    IonText: 'STRING_VALUE'
  },
  Name: 'STRING_VALUE', /* required */
  DigestTipAddress: {
    IonText: 'STRING_VALUE'
  }
};
qldb.getBlock(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

    • BlockAddress — (map)

      The location of the block that you want to request. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

      For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}

      • IonText — (String)

        An Amazon Ion plaintext value contained in a ValueHolder structure.

    • DigestTipAddress — (map)

      The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

      For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}

      • IonText — (String)

        An Amazon Ion plaintext value contained in a ValueHolder structure.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Block — (map)

        The block data object in Amazon Ion format.

        • IonText — (String)

          An Amazon Ion plaintext value contained in a ValueHolder structure.

      • Proof — (map)

        The proof object in Amazon Ion format returned by a GetBlock request. A proof contains the list of hash values required to recalculate the specified digest using a Merkle tree, starting with the specified block.

        • IonText — (String)

          An Amazon Ion plaintext value contained in a ValueHolder structure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDigest(params = {}, callback) ⇒ AWS.Request

Returns the digest of a ledger at the latest committed block in the journal. The response includes a 256-bit hash value and a block address.

Service Reference:

Examples:

Calling the getDigest operation

var params = {
  Name: 'STRING_VALUE' /* required */
};
qldb.getDigest(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Digest — (Buffer(Node.js), Typed Array(Browser))

        The 256-bit hash value representing the digest returned by a GetDigest request.

      • DigestTipAddress — (map)

        The latest block location covered by the digest that you requested. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

        • IonText — (String)

          An Amazon Ion plaintext value contained in a ValueHolder structure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRevision(params = {}, callback) ⇒ AWS.Request

Returns a revision data object for a specified document ID and block address. Also returns a proof of the specified revision for verification if DigestTipAddress is provided.

Service Reference:

Examples:

Calling the getRevision operation

var params = {
  BlockAddress: { /* required */
    IonText: 'STRING_VALUE'
  },
  DocumentId: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  DigestTipAddress: {
    IonText: 'STRING_VALUE'
  }
};
qldb.getRevision(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

    • BlockAddress — (map)

      The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

      For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}

      • IonText — (String)

        An Amazon Ion plaintext value contained in a ValueHolder structure.

    • DocumentId — (String)

      The unique ID of the document to be verified.

    • DigestTipAddress — (map)

      The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: strandId and sequenceNo.

      For example: {strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}

      • IonText — (String)

        An Amazon Ion plaintext value contained in a ValueHolder structure.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Proof — (map)

        The proof object in Amazon Ion format returned by a GetRevision request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.

        • IonText — (String)

          An Amazon Ion plaintext value contained in a ValueHolder structure.

      • Revision — (map)

        The document revision data object in Amazon Ion format.

        • IonText — (String)

          An Amazon Ion plaintext value contained in a ValueHolder structure.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJournalS3Exports(params = {}, callback) ⇒ AWS.Request

Returns an array of journal export job descriptions for all ledgers that are associated with the current AWS account and Region.

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

Service Reference:

Examples:

Calling the listJournalS3Exports operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
qldb.listJournalS3Exports(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

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

    • NextToken — (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 ListJournalS3Exports call, then you should use that value as input here.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • JournalS3Exports — (Array<map>)

        The array of journal export job descriptions for all ledgers that are associated with the current AWS account and Region.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • ExportIdrequired — (String)

          The unique ID of the journal export job.

        • ExportCreationTimerequired — (Date)

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

        • Statusrequired — (String)

          The current state of the journal export job.

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "CANCELLED"
        • InclusiveStartTimerequired — (Date)

          The inclusive start date and time for the range of journal contents that are specified in the original export request.

        • ExclusiveEndTimerequired — (Date)

          The exclusive end date and time for the range of journal contents that are specified in the original export request.

        • S3ExportConfigurationrequired — (map)

          The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.

          • Bucketrequired — (String)

            The Amazon S3 bucket name in which a journal export job writes the journal contents.

            The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and Limitations in the Amazon S3 Developer Guide.

          • Prefixrequired — (String)

            The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.

            The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the Amazon S3 Developer Guide.

            The following are examples of valid Prefix values:

            • JournalExports-ForMyLedger/Testing/

            • JournalExports

            • My:Tests/

          • EncryptionConfigurationrequired — (map)

            The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.

            • ObjectEncryptionTyperequired — (String)

              The Amazon S3 object encryption type.

              To learn more about server-side encryption options in Amazon S3, see Protecting Data Using Server-Side Encryption in the Amazon S3 Developer Guide.

              Possible values include:
              • "SSE_KMS"
              • "SSE_S3"
              • "NO_ENCRYPTION"
            • KmsKeyArn — (String)

              The Amazon Resource Name (ARN) for a customer master key (CMK) in AWS Key Management Service (AWS KMS).

              You must provide a KmsKeyArn if you specify SSE_KMS as the ObjectEncryptionType.

              KmsKeyArn is not required if you specify SSE_S3 as the ObjectEncryptionType.

        • RoleArnrequired — (String)

          The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:

          • Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.

          • (Optional) Use your customer master key (CMK) in AWS Key Management Service (AWS KMS) for server-side encryption of your exported data.

      • NextToken — (String)
        • 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 ListJournalS3Exports call.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listJournalS3ExportsForLedger(params = {}, callback) ⇒ AWS.Request

Returns an array of journal export job descriptions for a specified ledger.

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

Service Reference:

Examples:

Calling the listJournalS3ExportsForLedger operation

var params = {
  Name: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
qldb.listJournalS3ExportsForLedger(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

    • MaxResults — (Integer)

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

    • NextToken — (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 ListJournalS3ExportsForLedger call, then you should use that value as input here.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • JournalS3Exports — (Array<map>)

        The array of journal export job descriptions that are associated with the specified ledger.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • ExportIdrequired — (String)

          The unique ID of the journal export job.

        • ExportCreationTimerequired — (Date)

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

        • Statusrequired — (String)

          The current state of the journal export job.

          Possible values include:
          • "IN_PROGRESS"
          • "COMPLETED"
          • "CANCELLED"
        • InclusiveStartTimerequired — (Date)

          The inclusive start date and time for the range of journal contents that are specified in the original export request.

        • ExclusiveEndTimerequired — (Date)

          The exclusive end date and time for the range of journal contents that are specified in the original export request.

        • S3ExportConfigurationrequired — (map)

          The Amazon Simple Storage Service (Amazon S3) bucket location in which a journal export job writes the journal contents.

          • Bucketrequired — (String)

            The Amazon S3 bucket name in which a journal export job writes the journal contents.

            The bucket name must comply with the Amazon S3 bucket naming conventions. For more information, see Bucket Restrictions and Limitations in the Amazon S3 Developer Guide.

          • Prefixrequired — (String)

            The prefix for the Amazon S3 bucket in which a journal export job writes the journal contents.

            The prefix must comply with Amazon S3 key naming rules and restrictions. For more information, see Object Key and Metadata in the Amazon S3 Developer Guide.

            The following are examples of valid Prefix values:

            • JournalExports-ForMyLedger/Testing/

            • JournalExports

            • My:Tests/

          • EncryptionConfigurationrequired — (map)

            The encryption settings that are used by a journal export job to write data in an Amazon S3 bucket.

            • ObjectEncryptionTyperequired — (String)

              The Amazon S3 object encryption type.

              To learn more about server-side encryption options in Amazon S3, see Protecting Data Using Server-Side Encryption in the Amazon S3 Developer Guide.

              Possible values include:
              • "SSE_KMS"
              • "SSE_S3"
              • "NO_ENCRYPTION"
            • KmsKeyArn — (String)

              The Amazon Resource Name (ARN) for a customer master key (CMK) in AWS Key Management Service (AWS KMS).

              You must provide a KmsKeyArn if you specify SSE_KMS as the ObjectEncryptionType.

              KmsKeyArn is not required if you specify SSE_S3 as the ObjectEncryptionType.

        • RoleArnrequired — (String)

          The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:

          • Write objects into your Amazon Simple Storage Service (Amazon S3) bucket.

          • (Optional) Use your customer master key (CMK) in AWS Key Management Service (AWS KMS) for server-side encryption of your exported data.

      • NextToken — (String)
        • 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 ListJournalS3ExportsForLedger call.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listLedgers(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the listLedgers operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
qldb.listLedgers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

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

    • NextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Ledgers — (Array<map>)

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

        • Name — (String)

          The name of the ledger.

        • State — (String)

          The current status of the ledger.

          Possible values include:
          • "CREATING"
          • "ACTIVE"
          • "DELETING"
          • "DELETED"
        • CreationDateTime — (Date)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Returns all tags for a specified Amazon QLDB resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
qldb.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) for which you want to list the tags. For example:

      arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (map<String>)

        The tags that are currently associated with the specified Amazon QLDB resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds one or more tags to a specified Amazon QLDB resource.

A resource can have up to 50 tags. If you try to create more than 50 tags for a resource, your request fails and returns an error.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
qldb.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) to which you want to add the tags. For example:

      arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger

    • Tags — (map<String>)

      The key-value pairs to add as tags to the specified QLDB resource. Tag keys are case sensitive. If you specify a key that already exists for the resource, your request fails and returns an error. Tag values are case sensitive and can be null.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes one or more tags from a specified Amazon QLDB resource. You can specify up to 50 tag keys to remove.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
qldb.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) from which you want to remove the tags. For example:

      arn:aws:qldb:us-east-1:123456789012:ledger/exampleLedger

    • TagKeys — (Array<String>)

      The list of tag keys that you want to remove.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateLedger(params = {}, callback) ⇒ AWS.Request

Updates properties on a ledger.

Service Reference:

Examples:

Calling the updateLedger operation

var params = {
  Name: 'STRING_VALUE', /* required */
  DeletionProtection: true || false
};
qldb.updateLedger(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Name — (String)

      The name of the ledger.

    • DeletionProtection — (Boolean)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Name — (String)

        The name of the ledger.

      • Arn — (String)

        The Amazon Resource Name (ARN) for the ledger.

      • State — (String)

        The current status of the ledger.

        Possible values include:
        • "CREATING"
        • "ACTIVE"
        • "DELETING"
        • "DELETED"
      • CreationDateTime — (Date)

        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.)

      • DeletionProtection — (Boolean)

        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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.