Skip to main content

streams

Creates, updates, deletes, gets or lists a streams resource.

Overview

Namestreams
TypeResource
Idaws.iot.streams

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date when the stream was created.
descriptionstringThe description of the stream. (pattern: <code>[^\p{C}]+</code>)
filesarrayThe files to stream.
last_updated_atstring (date-time)The date when the stream was last updated.
role_arnstringAn IAM role IoT assumes to access your S3 files.
stream_arnstringThe stream ARN.
stream_idstringThe stream ID. (pattern: <code>[a-zA-Z0-9_-]+</code>)
stream_versionintegerThe stream version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_streamselectstream_id, regionGets information about a stream. Requires permission to access the DescribeStream action.
list_streamsselectregionmaxResults, nextToken, isAscendingOrderLists all of the streams in your Amazon Web Services account. Requires permission to access the ListStreams action.
create_streaminsertstream_id, region, files, roleArnCreates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream. Requires permission to access the CreateStream action.
update_streamupdatestream_id, regionUpdates an existing stream. The stream version will be incremented by one. Requires permission to access the UpdateStream action.
delete_streamdeletestream_id, regionDeletes a stream. Requires permission to access the DeleteStream action.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
stream_idstringThe stream ID.
isAscendingOrderbooleanSet to true to return the list of streams in ascending order.
maxResultsintegerThe maximum number of results to return at a time.
nextTokenstringA token used to get the next set of results.

SELECT examples

Gets information about a stream. Requires permission to access the DescribeStream action.

SELECT
created_at,
description,
files,
last_updated_at,
role_arn,
stream_arn,
stream_id,
stream_version
FROM aws.iot.streams
WHERE stream_id = '{{ stream_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a stream for delivering one or more large files in chunks over MQTT. A stream transports data bytes in chunks or blocks packaged as MQTT messages from a source like S3. You can have one or more files associated with a stream. Requires permission to access the CreateStream action.

INSERT INTO aws.iot.streams (
description,
files,
roleArn,
tags,
stream_id,
region
)
SELECT
'{{ description }}',
'{{ files }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ tags }}',
'{{ stream_id }}',
'{{ region }}'
RETURNING
description,
stream_arn,
stream_id,
stream_version
;

UPDATE examples

Updates an existing stream. The stream version will be incremented by one. Requires permission to access the UpdateStream action.

UPDATE aws.iot.streams
SET
description = '{{ description }}',
files = '{{ files }}',
roleArn = '{{ roleArn }}'
WHERE
stream_id = '{{ stream_id }}' --required
AND region = '{{ region }}' --required
RETURNING
description,
stream_arn,
stream_id,
stream_version;

DELETE examples

Deletes a stream. Requires permission to access the DeleteStream action.

DELETE FROM aws.iot.streams
WHERE stream_id = '{{ stream_id }}' --required
AND region = '{{ region }}' --required
;