We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

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 resource management API for Amazon QLDB

Sending a Request Using QLDB

var qldb = new AWS.QLDB();
qldb.cancelJournalKinesisStream(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|AWS.Endpoint)

    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' or an Endpoint object.

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

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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. The function is only called for retryable errors.
  • 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|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • 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'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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

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

Ends a given Amazon QLDB journal stream. Before a stream can be canceled, its current status must be ACTIVE.

You can't restart a stream after you cancel it. Canceled QLDB stream resources are subject to a 7-day retention period, so they are automatically deleted after this limit expires.

Service Reference:

Examples:

Calling the cancelJournalKinesisStream operation

var params = {
  LedgerName: 'STRING_VALUE', /* required */
  StreamId: 'STRING_VALUE' /* required */
};
qldb.cancelJournalKinesisStream(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: {})
    • LedgerName — (String)

      The name of the ledger.

    • StreamId — (String)

      The UUID (represented in Base62-encoded text) of the QLDB journal stream to be canceled.

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:

      • StreamId — (String)

        The UUID (Base62-encoded text) of the canceled QLDB journal stream.

Returns:

  • (AWS.Request)

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

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

Creates a new ledger in your Amazon Web Services account in the current Region.

Service Reference:

Examples:

Calling the createLedger operation

var params = {
  Name: 'STRING_VALUE', /* required */
  PermissionsMode: ALLOW_ALL | STANDARD, /* required */
  DeletionProtection: true || false,
  KmsKey: 'STRING_VALUE',
  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 the ledgers in your Amazon Web Services account in the current Region.

      Naming constraints for ledger names are defined in Quotas in Amazon QLDB in the Amazon QLDB Developer Guide.

    • 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. This parameter can have one of the following values:

      • ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for ledgers.

        This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.

      • STANDARD: (Recommended) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.

        By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started with the standard permissions mode in the Amazon QLDB Developer Guide.

      Note: We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger data.
      Possible values include:
      • "ALLOW_ALL"
      • "STANDARD"
    • DeletionProtection — (Boolean)

      Specifies whether the ledger is protected from being deleted by any user. If not defined during 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. You can disable it by calling the UpdateLedger operation to set this parameter to false.

    • KmsKey — (String)

      The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see Encryption at rest in the Amazon QLDB Developer Guide.

      Use one of the following options to specify this parameter:

      • AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.

      • Undefined: By default, use an Amazon Web Services owned KMS key.

      • A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.

        Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and asymmetric keys in the Key Management Service Developer Guide.

      To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

      For example:

      • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

      • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

      • Alias name: alias/ExampleAlias

      • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

      For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

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

      • PermissionsMode — (String)

        The permissions mode of the ledger that you created.

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

        Specifies whether the ledger is protected from being deleted by any user. If not defined during 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. You can disable it by calling the UpdateLedger operation to set this parameter to false.

      • KmsKeyArn — (String)

        The ARN of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.

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. You can disable it by calling the UpdateLedger operation to set this parameter to false.

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.

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

Returns detailed information about a given Amazon QLDB journal stream. The output includes the Amazon Resource Name (ARN), stream name, current status, creation time, and the parameters of the original stream creation request.

This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide.

Service Reference:

Examples:

Calling the describeJournalKinesisStream operation

var params = {
  LedgerName: 'STRING_VALUE', /* required */
  StreamId: 'STRING_VALUE' /* required */
};
qldb.describeJournalKinesisStream(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: {})
    • LedgerName — (String)

      The name of the ledger.

    • StreamId — (String)

      The UUID (represented in Base62-encoded text) of the QLDB journal stream 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:

      • Stream — (map)

        Information about the QLDB journal stream returned by a DescribeJournalS3Export request.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • CreationTime — (Date)

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

        • InclusiveStartTime — (Date)

          The inclusive start date and time from which to start streaming journal data.

        • ExclusiveEndTime — (Date)

          The exclusive date and time that specifies when the stream ends. If this parameter is undefined, the stream runs indefinitely until you cancel it.

        • RoleArnrequired — (String)

          The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.

        • StreamIdrequired — (String)

          The UUID (represented in Base62-encoded text) of the QLDB journal stream.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the QLDB journal stream.

        • Statusrequired — (String)

          The current state of the QLDB journal stream.

          Possible values include:
          • "ACTIVE"
          • "COMPLETED"
          • "CANCELED"
          • "FAILED"
          • "IMPAIRED"
        • KinesisConfigurationrequired — (map)

          The configuration settings of the Amazon Kinesis Data Streams destination for a QLDB journal stream.

          • StreamArnrequired — (String)

            The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.

          • AggregationEnabled — (Boolean)

            Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.

            Default: True

            Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see KPL Key Concepts and Consumer De-aggregation in the Amazon Kinesis Data Streams Developer Guide.

        • ErrorCause — (String)

          The error message that describes the reason that a stream has a status of IMPAIRED or FAILED. This is not applicable to streams that have other status values.

          Possible values include:
          • "KINESIS_STREAM_NOT_FOUND"
          • "IAM_PERMISSION_REVOKED"
        • StreamNamerequired — (String)

          The user-defined name of the QLDB journal stream.

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, creation time, current status, and the parameters of the original export creation request.

This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.

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 UUID (represented in Base62-encoded text) of the journal export job 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 UUID (represented in Base62-encoded text) 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 was specified in the original export request.

        • ExclusiveEndTimerequired — (Date)

          The exclusive end date and time for the range of journal contents that was 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) of a symmetric encryption key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.

              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 managed key in Key Management Service (KMS) for server-side encryption of your exported data.

        • OutputFormat — (String)

          The output format of the exported journal data.

          Possible values include:
          • "ION_BINARY"
          • "ION_TEXT"
          • "JSON"

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, permissions mode, encryption at rest settings, 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.)

      • PermissionsMode — (String)

        The permissions mode of the ledger.

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

        Specifies whether the ledger is protected from being deleted by any user. If not defined during 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. You can disable it by calling the UpdateLedger operation to set this parameter to false.

      • EncryptionDescription — (map)

        Information about the encryption of data at rest in the ledger. This includes the current status, the KMS key, and when the key became inaccessible (in the case of an error). If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption.

        • KmsKeyArnrequired — (String)

          The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption. It will display AWS_OWNED_KMS_KEY when updating the ledger's encryption configuration to the Amazon Web Services owned KMS key.

        • EncryptionStatusrequired — (String)

          The current state of encryption at rest for the ledger. This can be one of the following values:

          • ENABLED: Encryption is fully enabled using the specified key.

          • UPDATING: The ledger is actively processing the specified key change.

            Key changes in QLDB are asynchronous. The ledger is fully accessible without any performance impact while the key change is being processed. The amount of time it takes to update a key varies depending on the ledger size.

          • KMS_KEY_INACCESSIBLE: The specified customer managed KMS key is not accessible, and the ledger is impaired. Either the key was disabled or deleted, or the grants on the key were revoked. When a ledger is impaired, it is not accessible and does not accept any read or write requests.

            An impaired ledger automatically returns to an active state after you restore the grants on the key, or re-enable the key that was disabled. However, deleting a customer managed KMS key is irreversible. After a key is deleted, you can no longer access the ledgers that are protected with that key, and the data becomes unrecoverable permanently.

          Possible values include:
          • "ENABLED"
          • "UPDATING"
          • "KMS_KEY_INACCESSIBLE"
        • InaccessibleKmsKeyDateTime — (Date)

          The date and time, in epoch time format, when the KMS key first became inaccessible, in the case of an error. (Epoch time format is the number of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)

          This parameter is undefined if the KMS key is accessible.

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. A journal export job can write the data objects in either the text or binary representation of Amazon Ion format, or in JSON Lines text 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 */
  },
  OutputFormat: ION_BINARY | ION_TEXT | JSON
};
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 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 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) of a symmetric encryption key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.

          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 S3 bucket.

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

      To pass a role to QLDB when requesting a journal export, you must have permissions to perform the iam:PassRole action on the IAM role resource. This is required for all journal export requests.

    • OutputFormat — (String)

      The output format of your exported journal data. A journal export job can write the data objects in either the text or binary representation of Amazon Ion format, or in JSON Lines text format.

      Default: ION_TEXT

      In JSON Lines format, each journal block in an exported data object is a valid JSON object that is delimited by a newline. You can use this format to directly integrate JSON exports with analytics tools such as Amazon Athena and Glue because these services can parse newline-delimited JSON automatically.

      Possible values include:
      • "ION_BINARY"
      • "ION_TEXT"
      • "JSON"

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 UUID (represented in Base62-encoded text) 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 block object at a specified address in a journal. Also returns a proof of the specified block for verification if DigestTipAddress is provided.

For information about the data contents in a block, see Journal contents in the Amazon QLDB Developer Guide.

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 UUID (represented in Base62-encoded text) 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.

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

Returns all Amazon QLDB journal streams for a given ledger.

This action does not return any expired journal streams. For more information, see Expiration for terminal streams in the Amazon QLDB Developer Guide.

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

Examples:

Calling the listJournalKinesisStreamsForLedger operation

var params = {
  LedgerName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
qldb.listJournalKinesisStreamsForLedger(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: {})
    • LedgerName — (String)

      The name of the ledger.

    • MaxResults — (Integer)

      The maximum number of results to return in a single ListJournalKinesisStreamsForLedger 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 ListJournalKinesisStreamsForLedger call, 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:

      • Streams — (Array<map>)

        The QLDB journal streams that are currently associated with the given ledger.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • CreationTime — (Date)

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

        • InclusiveStartTime — (Date)

          The inclusive start date and time from which to start streaming journal data.

        • ExclusiveEndTime — (Date)

          The exclusive date and time that specifies when the stream ends. If this parameter is undefined, the stream runs indefinitely until you cancel it.

        • RoleArnrequired — (String)

          The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.

        • StreamIdrequired — (String)

          The UUID (represented in Base62-encoded text) of the QLDB journal stream.

        • Arn — (String)

          The Amazon Resource Name (ARN) of the QLDB journal stream.

        • Statusrequired — (String)

          The current state of the QLDB journal stream.

          Possible values include:
          • "ACTIVE"
          • "COMPLETED"
          • "CANCELED"
          • "FAILED"
          • "IMPAIRED"
        • KinesisConfigurationrequired — (map)

          The configuration settings of the Amazon Kinesis Data Streams destination for a QLDB journal stream.

          • StreamArnrequired — (String)

            The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.

          • AggregationEnabled — (Boolean)

            Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.

            Default: True

            Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see KPL Key Concepts and Consumer De-aggregation in the Amazon Kinesis Data Streams Developer Guide.

        • ErrorCause — (String)

          The error message that describes the reason that a stream has a status of IMPAIRED or FAILED. This is not applicable to streams that have other status values.

          Possible values include:
          • "KINESIS_STREAM_NOT_FOUND"
          • "IAM_PERMISSION_REVOKED"
        • StreamNamerequired — (String)

          The user-defined name of the QLDB journal stream.

      • NextToken — (String)
        • If NextToken is empty, the last page of results has been processed and there are no more results to be retrieved.

        • If NextToken is not empty, more results are available. To retrieve the next page of results, use the value of NextToken in a subsequent ListJournalKinesisStreamsForLedger call.

Returns:

  • (AWS.Request)

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

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

Returns all journal export jobs for all ledgers that are associated with the current Amazon Web Services 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.

This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.

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 journal export jobs for all ledgers that are associated with the current Amazon Web Services account and Region.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • ExportIdrequired — (String)

          The UUID (represented in Base62-encoded text) 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 was specified in the original export request.

        • ExclusiveEndTimerequired — (Date)

          The exclusive end date and time for the range of journal contents that was 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) of a symmetric encryption key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.

              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 managed key in Key Management Service (KMS) for server-side encryption of your exported data.

        • OutputFormat — (String)

          The output format of the exported journal data.

          Possible values include:
          • "ION_BINARY"
          • "ION_TEXT"
          • "JSON"
      • 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 all journal export jobs 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.

This action does not return any expired export jobs. For more information, see Export job expiration in the Amazon QLDB Developer Guide.

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 journal export jobs that are currently associated with the specified ledger.

        • LedgerNamerequired — (String)

          The name of the ledger.

        • ExportIdrequired — (String)

          The UUID (represented in Base62-encoded text) 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 was specified in the original export request.

        • ExclusiveEndTimerequired — (Date)

          The exclusive end date and time for the range of journal contents that was 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) of a symmetric encryption key in Key Management Service (KMS). Amazon S3 does not support asymmetric KMS keys.

              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 managed key in Key Management Service (KMS) for server-side encryption of your exported data.

        • OutputFormat — (String)

          The output format of the exported journal data.

          Possible values include:
          • "ION_BINARY"
          • "ION_TEXT"
          • "JSON"
      • 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 all ledgers that are associated with the current Amazon Web Services account and Region.

This action returns a maximum of MaxResults 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 ledgers that are associated with the current Amazon Web Services 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 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.

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

Creates a journal stream for a given Amazon QLDB ledger. The stream captures every document revision that is committed to the ledger's journal and delivers the data to a specified Amazon Kinesis Data Streams resource.

Service Reference:

Examples:

Calling the streamJournalToKinesis operation

var params = {
  InclusiveStartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  KinesisConfiguration: { /* required */
    StreamArn: 'STRING_VALUE', /* required */
    AggregationEnabled: true || false
  },
  LedgerName: 'STRING_VALUE', /* required */
  RoleArn: 'STRING_VALUE', /* required */
  StreamName: 'STRING_VALUE', /* required */
  ExclusiveEndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
qldb.streamJournalToKinesis(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: {})
    • LedgerName — (String)

      The name of the ledger.

    • RoleArn — (String)

      The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal stream to write data records to a Kinesis Data Streams resource.

      To pass a role to QLDB when requesting a journal stream, you must have permissions to perform the iam:PassRole action on the IAM role resource. This is required for all journal stream requests.

    • Tags — (map<String>)

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

    • InclusiveStartTime — (Date)

      The inclusive start date and time from which to start streaming journal data. This parameter must be in ISO 8601 date and time format and in Universal Coordinated Time (UTC). For example: 2019-06-13T21:36:34Z.

      The InclusiveStartTime cannot be in the future and must be before ExclusiveEndTime.

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

    • ExclusiveEndTime — (Date)

      The exclusive date and time that specifies when the stream ends. If you don't define this parameter, the stream runs indefinitely until you cancel it.

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

    • KinesisConfiguration — (map)

      The configuration settings of the Kinesis Data Streams destination for your stream request.

      • StreamArnrequired — (String)

        The Amazon Resource Name (ARN) of the Kinesis Data Streams resource.

      • AggregationEnabled — (Boolean)

        Enables QLDB to publish multiple data records in a single Kinesis Data Streams record, increasing the number of records sent per API call.

        Default: True

        Record aggregation has important implications for processing records and requires de-aggregation in your stream consumer. To learn more, see KPL Key Concepts and Consumer De-aggregation in the Amazon Kinesis Data Streams Developer Guide.

    • StreamName — (String)

      The name that you want to assign to the QLDB journal stream. User-defined names can help identify and indicate the purpose of a stream.

      Your stream name must be unique among other active streams for a given ledger. Stream names have the same naming constraints as ledger names, as defined in Quotas in Amazon QLDB in the Amazon QLDB Developer Guide.

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:

      • StreamId — (String)

        The UUID (represented in Base62-encoded text) that QLDB assigns to each QLDB journal stream.

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 to remove the tags. For example:

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

    • TagKeys — (Array<String>)

      The list of tag keys 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,
  KmsKey: 'STRING_VALUE'
};
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)

      Specifies whether the ledger is protected from being deleted by any user. If not defined during 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. You can disable it by calling the UpdateLedger operation to set this parameter to false.

    • KmsKey — (String)

      The key in Key Management Service (KMS) to use for encryption of data at rest in the ledger. For more information, see Encryption at rest in the Amazon QLDB Developer Guide.

      Use one of the following options to specify this parameter:

      • AWS_OWNED_KMS_KEY: Use an KMS key that is owned and managed by Amazon Web Services on your behalf.

      • Undefined: Make no changes to the KMS key of the ledger.

      • A valid symmetric customer managed KMS key: Use the specified symmetric encryption KMS key in your account that you create, own, and manage.

        Amazon QLDB does not support asymmetric keys. For more information, see Using symmetric and asymmetric keys in the Key Management Service Developer Guide.

      To specify a customer managed KMS key, you can use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

      For example:

      • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

      • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

      • Alias name: alias/ExampleAlias

      • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

      For more information, see Key identifiers (KeyId) in the Key Management Service Developer Guide.

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)

        Specifies whether the ledger is protected from being deleted by any user. If not defined during 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. You can disable it by calling the UpdateLedger operation to set this parameter to false.

      • EncryptionDescription — (map)

        Information about the encryption of data at rest in the ledger. This includes the current status, the KMS key, and when the key became inaccessible (in the case of an error).

        • KmsKeyArnrequired — (String)

          The Amazon Resource Name (ARN) of the customer managed KMS key that the ledger uses for encryption at rest. If this parameter is undefined, the ledger uses an Amazon Web Services owned KMS key for encryption. It will display AWS_OWNED_KMS_KEY when updating the ledger's encryption configuration to the Amazon Web Services owned KMS key.

        • EncryptionStatusrequired — (String)

          The current state of encryption at rest for the ledger. This can be one of the following values:

          • ENABLED: Encryption is fully enabled using the specified key.

          • UPDATING: The ledger is actively processing the specified key change.

            Key changes in QLDB are asynchronous. The ledger is fully accessible without any performance impact while the key change is being processed. The amount of time it takes to update a key varies depending on the ledger size.

          • KMS_KEY_INACCESSIBLE: The specified customer managed KMS key is not accessible, and the ledger is impaired. Either the key was disabled or deleted, or the grants on the key were revoked. When a ledger is impaired, it is not accessible and does not accept any read or write requests.

            An impaired ledger automatically returns to an active state after you restore the grants on the key, or re-enable the key that was disabled. However, deleting a customer managed KMS key is irreversible. After a key is deleted, you can no longer access the ledgers that are protected with that key, and the data becomes unrecoverable permanently.

          Possible values include:
          • "ENABLED"
          • "UPDATING"
          • "KMS_KEY_INACCESSIBLE"
        • InaccessibleKmsKeyDateTime — (Date)

          The date and time, in epoch time format, when the KMS key first became inaccessible, in the case of an error. (Epoch time format is the number of seconds that have elapsed since 12:00:00 AM January 1, 1970 UTC.)

          This parameter is undefined if the KMS key is accessible.

Returns:

  • (AWS.Request)

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

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

Updates the permissions mode of a ledger.

Before you switch to the STANDARD permissions mode, you must first create all required IAM policies and table tags to avoid disruption to your users. To learn more, see Migrating to the standard permissions mode in the Amazon QLDB Developer Guide.

Service Reference:

Examples:

Calling the updateLedgerPermissionsMode operation

var params = {
  Name: 'STRING_VALUE', /* required */
  PermissionsMode: ALLOW_ALL | STANDARD /* required */
};
qldb.updateLedgerPermissionsMode(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.

    • PermissionsMode — (String)

      The permissions mode to assign to the ledger. This parameter can have one of the following values:

      • ALLOW_ALL: A legacy permissions mode that enables access control with API-level granularity for ledgers.

        This mode allows users who have the SendCommand API permission for this ledger to run all PartiQL commands (hence, ALLOW_ALL) on any tables in the specified ledger. This mode disregards any table-level or command-level IAM permissions policies that you create for the ledger.

      • STANDARD: (Recommended) A permissions mode that enables access control with finer granularity for ledgers, tables, and PartiQL commands.

        By default, this mode denies all user requests to run any PartiQL commands on any tables in this ledger. To allow PartiQL commands to run, you must create IAM permissions policies for specific table resources and PartiQL actions, in addition to the SendCommand API permission for the ledger. For information, see Getting started with the standard permissions mode in the Amazon QLDB Developer Guide.

      Note: We strongly recommend using the STANDARD permissions mode to maximize the security of your ledger data.
      Possible values include:
      • "ALLOW_ALL"
      • "STANDARD"

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.

      • PermissionsMode — (String)

        The current permissions mode of the ledger.

        Possible values include:
        • "ALLOW_ALL"
        • "STANDARD"

Returns:

  • (AWS.Request)

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