streams
Creates, updates, deletes, gets or lists a streams resource.
Overview
| Name | streams |
| Type | Resource |
| Id | aws.iot.streams |
Fields
The following fields are returned by SELECT queries:
- describe_stream
- list_streams
| Name | Datatype | Description |
|---|---|---|
created_at | string (date-time) | The date when the stream was created. |
description | string | The description of the stream. (pattern: <code>[^\p{C}]+</code>) |
files | array | The files to stream. |
last_updated_at | string (date-time) | The date when the stream was last updated. |
role_arn | string | An IAM role IoT assumes to access your S3 files. |
stream_arn | string | The stream ARN. |
stream_id | string | The stream ID. (pattern: <code>[a-zA-Z0-9_-]+</code>) |
stream_version | integer | The stream version. |
| Name | Datatype | Description |
|---|---|---|
description | string | A description of the stream. (pattern: <code>[^\p{C}]+</code>) |
stream_arn | string | The stream ARN. |
stream_id | string | The stream ID. (pattern: <code>[a-zA-Z0-9_-]+</code>) |
stream_version | integer | The stream version. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stream | select | stream_id, region | Gets information about a stream. Requires permission to access the DescribeStream action. | |
list_streams | select | region | maxResults, nextToken, isAscendingOrder | Lists all of the streams in your Amazon Web Services account. Requires permission to access the ListStreams action. |
create_stream | insert | stream_id, region, files, roleArn | 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. | |
update_stream | update | stream_id, region | Updates an existing stream. The stream version will be incremented by one. Requires permission to access the UpdateStream action. | |
delete_stream | delete | stream_id, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
stream_id | string | The stream ID. |
isAscendingOrder | boolean | Set to true to return the list of streams in ascending order. |
maxResults | integer | The maximum number of results to return at a time. |
nextToken | string | A token used to get the next set of results. |
SELECT examples
- describe_stream
- list_streams
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
;
Lists all of the streams in your Amazon Web Services account. Requires permission to access the ListStreams action.
SELECT
description,
stream_arn,
stream_id,
stream_version
FROM aws.iot.streams
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND isAscendingOrder = '{{ isAscendingOrder }}'
;
INSERT examples
- create_stream
- Manifest
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
;
# Description fields are for documentation purposes
- name: streams
props:
- name: stream_id
value: "{{ stream_id }}"
description: Required parameter for the streams resource.
- name: region
value: "{{ region }}"
description: Required parameter for the streams resource.
- name: description
value: "{{ description }}"
- name: files
value:
- fileId: {{ fileId }}
s3Location:
bucket: "{{ bucket }}"
key: "{{ key }}"
version: "{{ version }}"
- name: roleArn
value: "{{ roleArn }}"
- name: tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_stream
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
- delete_stream
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
;