streams
Creates, updates, deletes or gets a stream
resource or lists streams
in a region
Overview
Name | streams |
Type | Resource |
Description | Resource schema for AWS::QLDB::Stream. |
Id | aws.qldb.streams |
Fields
Name | Datatype | Description |
---|---|---|
ledger_name | string | |
stream_name | string | |
role_arn | string | |
inclusive_start_time | string | |
exclusive_end_time | string | |
kinesis_configuration | object | |
tags | array | An array of key-value pairs to apply to this resource. |
arn | string | |
id | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | LedgerName, StreamName, RoleArn, KinesisConfiguration, InclusiveStartTime, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all streams
in a region.
SELECT
region,
ledger_name,
stream_name,
role_arn,
inclusive_start_time,
exclusive_end_time,
kinesis_configuration,
tags,
arn,
id
FROM aws.qldb.streams
WHERE region = 'us-east-1';
Gets all properties from an individual stream
.
SELECT
region,
ledger_name,
stream_name,
role_arn,
inclusive_start_time,
exclusive_end_time,
kinesis_configuration,
tags,
arn,
id
FROM aws.qldb.streams
WHERE region = 'us-east-1' AND data__Identifier = '<LedgerName>|<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new stream
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.qldb.streams (
LedgerName,
StreamName,
RoleArn,
InclusiveStartTime,
KinesisConfiguration,
region
)
SELECT
'{{ LedgerName }}',
'{{ StreamName }}',
'{{ RoleArn }}',
'{{ InclusiveStartTime }}',
'{{ KinesisConfiguration }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.qldb.streams (
LedgerName,
StreamName,
RoleArn,
InclusiveStartTime,
ExclusiveEndTime,
KinesisConfiguration,
Tags,
region
)
SELECT
'{{ LedgerName }}',
'{{ StreamName }}',
'{{ RoleArn }}',
'{{ InclusiveStartTime }}',
'{{ ExclusiveEndTime }}',
'{{ KinesisConfiguration }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: stream
props:
- name: LedgerName
value: '{{ LedgerName }}'
- name: StreamName
value: '{{ StreamName }}'
- name: RoleArn
value: '{{ RoleArn }}'
- name: InclusiveStartTime
value: '{{ InclusiveStartTime }}'
- name: ExclusiveEndTime
value: '{{ ExclusiveEndTime }}'
- name: KinesisConfiguration
value:
StreamArn: null
AggregationEnabled: '{{ AggregationEnabled }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.qldb.streams
WHERE data__Identifier = '<LedgerName|Id>'
AND region = 'us-east-1';
Permissions
To operate on the streams
resource, the following permissions are required:
Create
iam:PassRole,
qldb:StreamJournalToKinesis,
qldb:DescribeJournalKinesisStream
Delete
qldb:CancelJournalKinesisStream,
qldb:DescribeJournalKinesisStream
Read
qldb:DescribeJournalKinesisStream,
qldb:ListTagsForResource
Update
qldb:DescribeJournalKinesisStream,
qldb:UntagResource,
qldb:TagResource
List
qldb:listJournalKinesisStreamsForLedger