StreamJournalToKinesis
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.
Request Syntax
POST /ledgers/name
/journal-kinesis-streams HTTP/1.1
Content-type: application/json
{
"ExclusiveEndTime": number
,
"InclusiveStartTime": number
,
"KinesisConfiguration": {
"AggregationEnabled": boolean
,
"StreamArn": "string
"
},
"RoleArn": "string
",
"StreamName": "string
",
"Tags": {
"string
" : "string
"
}
}
URI Request Parameters
The request uses the following URI parameters.
- name
-
The name of the ledger.
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern:
(?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$
Required: Yes
Request Body
The request accepts the following data in JSON format.
- ExclusiveEndTime
-
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 inISO 8601
date and time format and in Universal Coordinated Time (UTC). For example:2019-06-13T21:36:34Z
.Type: Timestamp
Required: No
- InclusiveStartTime
-
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 beforeExclusiveEndTime
.If you provide an
InclusiveStartTime
that is before the ledger'sCreationDateTime
, QLDB effectively defaults it to the ledger'sCreationDateTime
.Type: Timestamp
Required: Yes
- KinesisConfiguration
-
The configuration settings of the Kinesis Data Streams destination for your stream request.
Type: KinesisConfiguration object
Required: Yes
- RoleArn
-
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.Type: String
Length Constraints: Minimum length of 20. Maximum length of 1600.
Required: Yes
- StreamName
-
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.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 32.
Pattern:
(?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$
Required: Yes
- Tags
-
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.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 200 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Value Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"StreamId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- StreamId
-
The UUID (represented in Base62-encoded text) that QLDB assigns to each QLDB journal stream.
Type: String
Length Constraints: Fixed length of 22.
Pattern:
^[A-Za-z-0-9]+$
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidParameterException
-
One or more parameters in the request aren't valid.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource doesn't exist.
HTTP Status Code: 404
- ResourcePreconditionNotMetException
-
The operation failed because a condition wasn't satisfied in advance.
HTTP Status Code: 412
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: