streams
Creates, updates, deletes or gets a stream
resource or lists streams
in a region
Overview
Name | streams |
Type | Resource |
Description | Resource Type definition for AWS::Kinesis::Stream |
Id | aws.kinesis.streams |
Fields
Name | Datatype | Description |
---|---|---|
stream_mode_details | object | The mode in which the stream is running. |
stream_encryption | object | When specified, enables or updates server-side encryption using an AWS KMS key for a specified stream. |
arn | string | The Amazon resource name (ARN) of the Kinesis stream |
retention_period_hours | integer | The number of hours for the data records that are stored in shards to remain accessible. |
tags | array | An arbitrary set of tags (key–value pairs) to associate with the Kinesis stream. |
name | string | The name of the Kinesis stream. |
shard_count | integer | The number of shards that the stream uses. Required when StreamMode = PROVISIONED is passed. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | 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,
stream_mode_details,
stream_encryption,
arn,
retention_period_hours,
tags,
name,
shard_count
FROM aws.kinesis.streams
WHERE region = 'us-east-1';
Gets all properties from an individual stream
.
SELECT
region,
stream_mode_details,
stream_encryption,
arn,
retention_period_hours,
tags,
name,
shard_count
FROM aws.kinesis.streams
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';
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.kinesis.streams (
StreamModeDetails,
StreamEncryption,
RetentionPeriodHours,
Tags,
Name,
ShardCount,
region
)
SELECT
'{{ StreamModeDetails }}',
'{{ StreamEncryption }}',
'{{ RetentionPeriodHours }}',
'{{ Tags }}',
'{{ Name }}',
'{{ ShardCount }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.kinesis.streams (
StreamModeDetails,
StreamEncryption,
RetentionPeriodHours,
Tags,
Name,
ShardCount,
region
)
SELECT
'{{ StreamModeDetails }}',
'{{ StreamEncryption }}',
'{{ RetentionPeriodHours }}',
'{{ Tags }}',
'{{ Name }}',
'{{ ShardCount }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: stream
props:
- name: StreamModeDetails
value:
StreamMode: '{{ StreamMode }}'
- name: StreamEncryption
value:
EncryptionType: '{{ EncryptionType }}'
KeyId: '{{ KeyId }}'
- name: RetentionPeriodHours
value: '{{ RetentionPeriodHours }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
- name: Name
value: '{{ Name }}'
- name: ShardCount
value: '{{ ShardCount }}'
DELETE
example
/*+ delete */
DELETE FROM aws.kinesis.streams
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';
Permissions
To operate on the streams
resource, the following permissions are required:
Read
kinesis:DescribeStreamSummary,
kinesis:ListTagsForStream
Create
kinesis:EnableEnhancedMonitoring,
kinesis:DescribeStreamSummary,
kinesis:CreateStream,
kinesis:IncreaseStreamRetentionPeriod,
kinesis:StartStreamEncryption,
kinesis:AddTagsToStream,
kinesis:ListTagsForStream
Update
kinesis:EnableEnhancedMonitoring,
kinesis:DisableEnhancedMonitoring,
kinesis:DescribeStreamSummary,
kinesis:UpdateShardCount,
kinesis:UpdateStreamMode,
kinesis:IncreaseStreamRetentionPeriod,
kinesis:DecreaseStreamRetentionPeriod,
kinesis:StartStreamEncryption,
kinesis:StopStreamEncryption,
kinesis:AddTagsToStream,
kinesis:RemoveTagsFromStream,
kinesis:ListTagsForStream
List
kinesis:ListStreams
Delete
kinesis:DescribeStreamSummary,
kinesis:DeleteStream,
kinesis:RemoveTagsFromStream