Skip to main content

streams

Creates, updates, deletes or gets a stream resource or lists streams in a region

Overview

Namestreams
TypeResource
DescriptionResource Type definition for AWS::Kinesis::Stream
Idaws.kinesis.streams

Fields

NameDatatypeDescription
stream_mode_detailsobjectThe mode in which the stream is running.
stream_encryptionobjectWhen specified, enables or updates server-side encryption using an AWS KMS key for a specified stream.
arnstringThe Amazon resource name (ARN) of the Kinesis stream
retention_period_hoursintegerThe number of hours for the data records that are stored in shards to remain accessible.
tagsarrayAn arbitrary set of tags (key–value pairs) to associate with the Kinesis stream.
namestringThe name of the Kinesis stream.
shard_countintegerThe number of shards that the stream uses. Required when StreamMode = PROVISIONED is passed.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.kinesis.streams (
StreamModeDetails,
StreamEncryption,
RetentionPeriodHours,
Tags,
Name,
ShardCount,
region
)
SELECT
'{{ StreamModeDetails }}',
'{{ StreamEncryption }}',
'{{ RetentionPeriodHours }}',
'{{ Tags }}',
'{{ Name }}',
'{{ ShardCount }}',
'{{ region }}';

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