QLDB / Client / stream_journal_to_kinesis

stream_journal_to_kinesis#

QLDB.Client.stream_journal_to_kinesis(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.stream_journal_to_kinesis(
    LedgerName='string',
    RoleArn='string',
    Tags={
        'string': 'string'
    },
    InclusiveStartTime=datetime(2015, 1, 1),
    ExclusiveEndTime=datetime(2015, 1, 1),
    KinesisConfiguration={
        'StreamArn': 'string',
        'AggregationEnabled': True|False
    },
    StreamName='string'
)
Parameters:
  • LedgerName (string) –

    [REQUIRED]

    The name of the ledger.

  • RoleArn (string) –

    [REQUIRED]

    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 (dict) –

    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.

    • (string) –

      • (string) –

  • InclusiveStartTime (datetime) –

    [REQUIRED]

    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 (datetime) –

    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 (dict) –

    [REQUIRED]

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

    • StreamArn (string) – [REQUIRED]

      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

      Warning

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

    [REQUIRED]

    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.

Return type:

dict

Returns:

Response Syntax

{
    'StreamId': 'string'
}

Response Structure

  • (dict) –

    • StreamId (string) –

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

Exceptions