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 | awscc.qldb.streams |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
ledger_name | string | |
id | string | |
region | string | AWS region. |
For more information, see AWS::QLDB::Stream.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | streams | INSERT | LedgerName, StreamName, RoleArn, KinesisConfiguration, InclusiveStartTime, region |
delete_resource | streams | DELETE | Identifier, region |
update_resource | streams | UPDATE | Identifier, PatchDocument, region |
list_resources | streams_list_only | SELECT | region |
get_resource | streams | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.qldb.streams
WHERE
region = 'us-east-1' AND
Identifier = '{{ ledger_name }}|{{ id }}';
Lists all streams in a region.
SELECT
region,
ledger_name,
id
FROM awscc.qldb.streams_list_only
WHERE
region = 'us-east-1';
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 awscc.qldb.streams (
LedgerName,
StreamName,
RoleArn,
InclusiveStartTime,
KinesisConfiguration,
region
)
SELECT
'{{ ledger_name }}',
'{{ stream_name }}',
'{{ role_arn }}',
'{{ inclusive_start_time }}',
'{{ kinesis_configuration }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.qldb.streams (
LedgerName,
StreamName,
RoleArn,
InclusiveStartTime,
ExclusiveEndTime,
KinesisConfiguration,
Tags,
region
)
SELECT
'{{ ledger_name }}',
'{{ stream_name }}',
'{{ role_arn }}',
'{{ inclusive_start_time }}',
'{{ exclusive_end_time }}',
'{{ kinesis_configuration }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: stream
props:
- name: ledger_name
value: '{{ ledger_name }}'
- name: stream_name
value: '{{ stream_name }}'
- name: role_arn
value: '{{ role_arn }}'
- name: inclusive_start_time
value: '{{ inclusive_start_time }}'
- name: exclusive_end_time
value: '{{ exclusive_end_time }}'
- name: kinesis_configuration
value:
stream_arn: null
aggregation_enabled: '{{ aggregation_enabled }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a stream resource, using stack-deploy.
/*+ update */
UPDATE awscc.qldb.streams
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ ledger_name }}|{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.qldb.streams
WHERE
Identifier = '{{ ledger_name }}|{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the streams resource, the following permissions are required:
- Create
- Delete
- Read
- Update
- List
iam:PassRole,
qldb:StreamJournalToKinesis,
qldb:DescribeJournalKinesisStream
qldb:CancelJournalKinesisStream,
qldb:DescribeJournalKinesisStream
qldb:DescribeJournalKinesisStream,
qldb:ListTagsForResource
qldb:DescribeJournalKinesisStream,
qldb:UntagResource,
qldb:TagResource
qldb:listJournalKinesisStreamsForLedger