Skip to main content

streams

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

Overview

Namestreams
TypeResource
Idaws.kinesisvideo.streams

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)A time stamp that indicates when the stream was created.
data_retention_in_hoursintegerHow long the stream retains data, in hours.
device_namestringThe name of the device that is associated with the stream. (pattern: <code>[a-zA-Z0-9_.-]+</code>)
kms_key_idstringThe ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. (pattern: <code>.+</code>)
media_typestringThe MediaType of the stream. (pattern: <code>[\w-.+]+/[\w-.+]+(,[\w-.+]+/[\w-.+]+)*</code>)
statusstringThe status of the stream. (CREATING, ACTIVE, UPDATING, DELETING)
stream_arnstringThe Amazon Resource Name (ARN) of the stream. (pattern: <code>arn:[a-z\d-]+:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA-Z0-9_.-]+/[0-9]+</code>)
stream_namestringThe name of the stream. (pattern: <code>[a-zA-Z0-9_.-]+</code>)
versionstringThe version of the stream. (pattern: <code>[a-zA-Z0-9]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_streamselectregionReturns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.
list_streamsselectregionReturns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.
create_streaminsertregion, StreamNameCreates a new Kinesis video stream. When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version. CreateStream is an asynchronous operation. For information about how the service works, see How it Works. You must have permissions for the KinesisVideo:CreateStream action.
update_streamupdateregion, CurrentVersionUpdates stream metadata, such as the device name and media type. You must provide the stream name or the Amazon Resource Name (ARN) of the stream. To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. UpdateStream is an asynchronous operation, and takes time to complete.
delete_streamdeleteregionDeletes a Kinesis video stream and the data contained in the stream. This method marks the stream for deletion, and makes the data in the stream inaccessible immediately. To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. This operation requires permission for the KinesisVideo: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)

SELECT examples

Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN.

SELECT
creation_time,
data_retention_in_hours,
device_name,
kms_key_id,
media_type,
status,
stream_arn,
stream_name,
version
FROM aws.kinesisvideo.streams
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new Kinesis video stream. When you create a new stream, Kinesis Video Streams assigns it a version number. When you change the stream's metadata, Kinesis Video Streams updates the version. CreateStream is an asynchronous operation. For information about how the service works, see How it Works. You must have permissions for the KinesisVideo:CreateStream action.

INSERT INTO aws.kinesisvideo.streams (
DeviceName,
StreamName,
MediaType,
KmsKeyId,
DataRetentionInHours,
Tags,
StreamStorageConfiguration,
region
)
SELECT
'{{ DeviceName }}',
'{{ StreamName }}' /* required */,
'{{ MediaType }}',
'{{ KmsKeyId }}',
{{ DataRetentionInHours }},
'{{ Tags }}',
'{{ StreamStorageConfiguration }}',
'{{ region }}'
RETURNING
stream_arn
;

UPDATE examples

Updates stream metadata, such as the device name and media type. You must provide the stream name or the Amazon Resource Name (ARN) of the stream. To make sure that you have the latest version of the stream before updating it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. UpdateStream is an asynchronous operation, and takes time to complete.

UPDATE aws.kinesisvideo.streams
SET
StreamName = '{{ StreamName }}',
StreamARN = '{{ StreamARN }}',
CurrentVersion = '{{ CurrentVersion }}',
DeviceName = '{{ DeviceName }}',
MediaType = '{{ MediaType }}'
WHERE
region = '{{ region }}' --required
AND CurrentVersion = '{{ CurrentVersion }}' --required;

DELETE examples

Deletes a Kinesis video stream and the data contained in the stream. This method marks the stream for deletion, and makes the data in the stream inaccessible immediately. To ensure that you have the latest version of the stream before deleting it, you can specify the stream version. Kinesis Video Streams assigns a version to each stream. When you update a stream, Kinesis Video Streams assigns a new version number. To get the latest stream version, use the DescribeStream API. This operation requires permission for the KinesisVideo:DeleteStream action.

DELETE FROM aws.kinesisvideo.streams
WHERE region = '{{ region }}' --required
;