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
Idawscc.kinesis.streams

Fields

NameDatatypeDescription
arnstringThe Amazon resource name (ARN) of the Kinesis stream
namestringThe name of the Kinesis stream.
desired_shard_level_metricsarrayThe final list of shard-level metrics
retention_period_hoursintegerThe number of hours for the data records that are stored in shards to remain accessible.
shard_countintegerThe number of shards that the stream uses. Required when StreamMode = PROVISIONED is passed.
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.
tagsarrayAn arbitrary set of tags (key–value pairs) to associate with the Kinesis stream.
regionstringAWS region.

For more information, see AWS::Kinesis::Stream.

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 properties from an individual stream.

SELECT
region,
arn,
name,
desired_shard_level_metrics,
retention_period_hours,
shard_count,
stream_mode_details,
stream_encryption,
tags
FROM awscc.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 awscc.kinesis.streams (
Name,
DesiredShardLevelMetrics,
RetentionPeriodHours,
ShardCount,
StreamModeDetails,
StreamEncryption,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ DesiredShardLevelMetrics }}',
'{{ RetentionPeriodHours }}',
'{{ ShardCount }}',
'{{ StreamModeDetails }}',
'{{ StreamEncryption }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.kinesis.streams
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the streams resource, the following permissions are required:

Create

kinesis:EnableEnhancedMonitoring,
kinesis:DescribeStreamSummary,
kinesis:CreateStream,
kinesis:IncreaseStreamRetentionPeriod,
kinesis:StartStreamEncryption,
kinesis:AddTagsToStream,
kinesis:ListTagsForStream,
kinesis:ListTagsForResource

Read

kinesis:DescribeStreamSummary,
kinesis:ListTagsForStream,
kinesis:ListTagsForResource

Update

kinesis:EnableEnhancedMonitoring,
kinesis:DisableEnhancedMonitoring,
kinesis:DescribeStreamSummary,
kinesis:UpdateShardCount,
kinesis:UpdateStreamMode,
kinesis:IncreaseStreamRetentionPeriod,
kinesis:DecreaseStreamRetentionPeriod,
kinesis:StartStreamEncryption,
kinesis:StopStreamEncryption,
kinesis:AddTagsToStream,
kinesis:TagResource,
kinesis:RemoveTagsFromStream,
kinesis:UntagResource,
kinesis:ListTagsForStream,
kinesis:ListTagsForResource

Delete

kinesis:DescribeStreamSummary,
kinesis:DeleteStream,
kinesis:RemoveTagsFromStream,
kinesis:UntagResource

List

kinesis:ListStreams