streams
Creates, updates, deletes, gets or lists a streams resource.
Overview
| Name | streams |
| Type | Resource |
| Id | aws.ivs.streams |
Fields
The following fields are returned by SELECT queries:
- get_stream
- list_streams
| Name | Datatype | Description |
|---|---|---|
channel_arn | string | Channel ARN for the stream. (pattern: <code>arn:aws:ivs:[a-z0-9-]+:[0-9]+:channel/[a-zA-Z0-9-]+</code>) |
health | string | The stream’s health. (HEALTHY, STARVING, UNKNOWN) |
playback_url | string | URL of the master playlist, required by the video player to play the HLS stream. |
start_time | string (date-time) | Time of the stream’s start. This is an ISO 8601 timestamp; note that this is returned as a string. |
state | string | The stream’s state. Do not rely on the OFFLINE state, as the API may not return it; instead, a "NotBroadcasting" error will indicate that the stream is not live. (LIVE, OFFLINE) |
stream_id | string | Unique identifier for a live or previously live stream in the specified channel. (pattern: <code>st-[a-zA-Z0-9]+</code>) |
viewer_count | integer (int64) | A count of concurrent views of the stream. Typically, a new view appears in viewerCount within 15 seconds of when video playback starts and a view is removed from viewerCount within 1 minute of when video playback ends. A value of -1 indicates that the request timed out; in this case, retry. |
| Name | Datatype | Description |
|---|---|---|
channel_arn | string | Channel ARN for the stream. (pattern: <code>arn:aws:ivs:[a-z0-9-]+:[0-9]+:channel/[a-zA-Z0-9-]+</code>) |
health | string | The stream’s health. (HEALTHY, STARVING, UNKNOWN) |
start_time | string (date-time) | Time of the stream’s start. This is an ISO 8601 timestamp; note that this is returned as a string. |
state | string | The stream’s state. Do not rely on the OFFLINE state, as the API may not return it; instead, a "NotBroadcasting" error will indicate that the stream is not live. (LIVE, OFFLINE) |
stream_id | string | Unique identifier for a live or previously live stream in the specified channel. (pattern: <code>st-[a-zA-Z0-9]+</code>) |
viewer_count | integer (int64) | A count of concurrent views of the stream. Typically, a new view appears in viewerCount within 15 seconds of when video playback starts and a view is removed from viewerCount within 1 minute of when video playback ends. A value of -1 indicates that the request timed out; in this case, retry. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_stream | select | region | Gets information about the active (live) stream on a specified channel. | |
list_streams | select | region | Gets summary information about live streams in your account, in the Amazon Web Services region where the API request is processed. |
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) |
SELECT examples
- get_stream
- list_streams
Gets information about the active (live) stream on a specified channel.
SELECT
channel_arn,
health,
playback_url,
start_time,
state,
stream_id,
viewer_count
FROM aws.ivs.streams
WHERE region = '{{ region }}' -- required
;
Gets summary information about live streams in your account, in the Amazon Web Services region where the API request is processed.
SELECT
channel_arn,
health,
start_time,
state,
stream_id,
viewer_count
FROM aws.ivs.streams
WHERE region = '{{ region }}' -- required
;