Amazon QLDB

2021/12/21 - Amazon QLDB - 4 updated api methods

Changes  Amazon QLDB now supports journal exports in JSON and Ion Binary formats. This release adds an optional OutputFormat parameter to the ExportJournalToS3 API.

DescribeJournalS3Export (updated) Link ¶
Changes (response)
{'ExportDescription': {'OutputFormat': 'ION_BINARY | ION_TEXT | JSON'}}

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 .

See also: AWS API Documentation

Request Syntax

client.describe_journal_s3_export(
    Name='string',
    ExportId='string'
)
type Name

string

param Name

[REQUIRED]

The name of the ledger.

type ExportId

string

param ExportId

[REQUIRED]

The UUID (represented in Base62-encoded text) of the journal export job to describe.

rtype

dict

returns

Response Syntax

{
    'ExportDescription': {
        'LedgerName': 'string',
        'ExportId': 'string',
        'ExportCreationTime': datetime(2015, 1, 1),
        'Status': 'IN_PROGRESS'|'COMPLETED'|'CANCELLED',
        'InclusiveStartTime': datetime(2015, 1, 1),
        'ExclusiveEndTime': datetime(2015, 1, 1),
        'S3ExportConfiguration': {
            'Bucket': 'string',
            'Prefix': 'string',
            'EncryptionConfiguration': {
                'ObjectEncryptionType': 'SSE_KMS'|'SSE_S3'|'NO_ENCRYPTION',
                'KmsKeyArn': 'string'
            }
        },
        'RoleArn': 'string',
        'OutputFormat': 'ION_BINARY'|'ION_TEXT'|'JSON'
    }
}

Response Structure

  • (dict) --

    • ExportDescription (dict) --

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

      • LedgerName (string) --

        The name of the ledger.

      • ExportId (string) --

        The UUID (represented in Base62-encoded text) of the journal export job.

      • ExportCreationTime (datetime) --

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

      • Status (string) --

        The current state of the journal export job.

      • InclusiveStartTime (datetime) --

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

      • ExclusiveEndTime (datetime) --

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

      • S3ExportConfiguration (dict) --

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

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

        • Prefix (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/

        • EncryptionConfiguration (dict) --

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

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

          • KmsKeyArn (string) --

            The Amazon Resource Name (ARN) of a symmetric 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 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.

ExportJournalToS3 (updated) Link ¶
Changes (request)
{'OutputFormat': 'ION_BINARY | ION_TEXT | JSON'}

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.

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

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 .

See also: AWS API Documentation

Request Syntax

client.export_journal_to_s3(
    Name='string',
    InclusiveStartTime=datetime(2015, 1, 1),
    ExclusiveEndTime=datetime(2015, 1, 1),
    S3ExportConfiguration={
        'Bucket': 'string',
        'Prefix': 'string',
        'EncryptionConfiguration': {
            'ObjectEncryptionType': 'SSE_KMS'|'SSE_S3'|'NO_ENCRYPTION',
            'KmsKeyArn': 'string'
        }
    },
    RoleArn='string',
    OutputFormat='ION_BINARY'|'ION_TEXT'|'JSON'
)
type Name

string

param Name

[REQUIRED]

The name of the ledger.

type InclusiveStartTime

datetime

param InclusiveStartTime

[REQUIRED]

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 .

type ExclusiveEndTime

datetime

param ExclusiveEndTime

[REQUIRED]

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.

type S3ExportConfiguration

dict

param S3ExportConfiguration

[REQUIRED]

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

  • Bucket (string) -- [REQUIRED]

    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 .

  • Prefix (string) -- [REQUIRED]

    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/

  • EncryptionConfiguration (dict) -- [REQUIRED]

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

    • ObjectEncryptionType (string) -- [REQUIRED]

      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 .

    • KmsKeyArn (string) --

      The Amazon Resource Name (ARN) of a symmetric 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 .

type RoleArn

string

param RoleArn

[REQUIRED]

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.

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.

type OutputFormat

string

param OutputFormat

The output format of your exported journal data. If this parameter is not specified, the exported data defaults to ION_TEXT format.

rtype

dict

returns

Response Syntax

{
    'ExportId': 'string'
}

Response Structure

  • (dict) --

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

ListJournalS3Exports (updated) Link ¶
Changes (response)
{'JournalS3Exports': {'OutputFormat': 'ION_BINARY | ION_TEXT | JSON'}}

Returns an array of journal export job descriptions 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 .

See also: AWS API Documentation

Request Syntax

client.list_journal_s3_exports(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

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

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'JournalS3Exports': [
        {
            'LedgerName': 'string',
            'ExportId': 'string',
            'ExportCreationTime': datetime(2015, 1, 1),
            'Status': 'IN_PROGRESS'|'COMPLETED'|'CANCELLED',
            'InclusiveStartTime': datetime(2015, 1, 1),
            'ExclusiveEndTime': datetime(2015, 1, 1),
            'S3ExportConfiguration': {
                'Bucket': 'string',
                'Prefix': 'string',
                'EncryptionConfiguration': {
                    'ObjectEncryptionType': 'SSE_KMS'|'SSE_S3'|'NO_ENCRYPTION',
                    'KmsKeyArn': 'string'
                }
            },
            'RoleArn': 'string',
            'OutputFormat': 'ION_BINARY'|'ION_TEXT'|'JSON'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • JournalS3Exports (list) --

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

      • (dict) --

        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.

        • LedgerName (string) --

          The name of the ledger.

        • ExportId (string) --

          The UUID (represented in Base62-encoded text) of the journal export job.

        • ExportCreationTime (datetime) --

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

        • Status (string) --

          The current state of the journal export job.

        • InclusiveStartTime (datetime) --

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

        • ExclusiveEndTime (datetime) --

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

        • S3ExportConfiguration (dict) --

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

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

          • Prefix (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/

          • EncryptionConfiguration (dict) --

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

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

            • KmsKeyArn (string) --

              The Amazon Resource Name (ARN) of a symmetric 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 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.

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

ListJournalS3ExportsForLedger (updated) Link ¶
Changes (response)
{'JournalS3Exports': {'OutputFormat': 'ION_BINARY | ION_TEXT | JSON'}}

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.

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

See also: AWS API Documentation

Request Syntax

client.list_journal_s3_exports_for_ledger(
    Name='string',
    MaxResults=123,
    NextToken='string'
)
type Name

string

param Name

[REQUIRED]

The name of the ledger.

type MaxResults

integer

param MaxResults

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

type NextToken

string

param NextToken

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.

rtype

dict

returns

Response Syntax

{
    'JournalS3Exports': [
        {
            'LedgerName': 'string',
            'ExportId': 'string',
            'ExportCreationTime': datetime(2015, 1, 1),
            'Status': 'IN_PROGRESS'|'COMPLETED'|'CANCELLED',
            'InclusiveStartTime': datetime(2015, 1, 1),
            'ExclusiveEndTime': datetime(2015, 1, 1),
            'S3ExportConfiguration': {
                'Bucket': 'string',
                'Prefix': 'string',
                'EncryptionConfiguration': {
                    'ObjectEncryptionType': 'SSE_KMS'|'SSE_S3'|'NO_ENCRYPTION',
                    'KmsKeyArn': 'string'
                }
            },
            'RoleArn': 'string',
            'OutputFormat': 'ION_BINARY'|'ION_TEXT'|'JSON'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • JournalS3Exports (list) --

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

      • (dict) --

        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.

        • LedgerName (string) --

          The name of the ledger.

        • ExportId (string) --

          The UUID (represented in Base62-encoded text) of the journal export job.

        • ExportCreationTime (datetime) --

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

        • Status (string) --

          The current state of the journal export job.

        • InclusiveStartTime (datetime) --

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

        • ExclusiveEndTime (datetime) --

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

        • S3ExportConfiguration (dict) --

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

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

          • Prefix (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/

          • EncryptionConfiguration (dict) --

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

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

            • KmsKeyArn (string) --

              The Amazon Resource Name (ARN) of a symmetric 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 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.

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