streams
Creates, updates, deletes, gets or lists a streams resource.
Overview
| Name | streams |
| Type | Resource |
| Id | aws.kinesisvideo.streams |
Fields
The following fields are returned by SELECT queries:
- describe_stream
- list_streams
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | A time stamp that indicates when the stream was created. |
data_retention_in_hours | integer | How long the stream retains data, in hours. |
device_name | string | The name of the device that is associated with the stream. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
kms_key_id | string | The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. (pattern: <code>.+</code>) |
media_type | string | The MediaType of the stream. (pattern: <code>[\w-.+]+/[\w-.+]+(,[\w-.+]+/[\w-.+]+)*</code>) |
status | string | The status of the stream. (CREATING, ACTIVE, UPDATING, DELETING) |
stream_arn | string | The 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_name | string | The name of the stream. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
version | string | The version of the stream. (pattern: <code>[a-zA-Z0-9]+</code>) |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | A time stamp that indicates when the stream was created. |
data_retention_in_hours | integer | How long the stream retains data, in hours. |
device_name | string | The name of the device that is associated with the stream. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
kms_key_id | string | The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses to encrypt data on the stream. (pattern: <code>.+</code>) |
media_type | string | The MediaType of the stream. (pattern: <code>[\w-.+]+/[\w-.+]+(,[\w-.+]+/[\w-.+]+)*</code>) |
status | string | The status of the stream. (CREATING, ACTIVE, UPDATING, DELETING) |
stream_arn | string | The 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_name | string | The name of the stream. (pattern: <code>[a-zA-Z0-9_.-]+</code>) |
version | string | The version of the stream. (pattern: <code>[a-zA-Z0-9]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stream | select | region | Returns the most current information about the specified stream. You must specify either the StreamName or the StreamARN. | |
list_streams | select | region | Returns 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_stream | insert | region, StreamName | 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. | |
update_stream | update | region, CurrentVersion | 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. | |
delete_stream | delete | region | 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. |
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
- describe_stream
- list_streams
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
;
Returns an array of StreamInfo objects. Each object describes a stream. To retrieve only streams that satisfy a specific condition, you can specify a StreamNameCondition.
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
- create_stream
- Manifest
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
;
# Description fields are for documentation purposes
- name: streams
props:
- name: region
value: "{{ region }}"
description: Required parameter for the streams resource.
- name: DeviceName
value: "{{ DeviceName }}"
- name: StreamName
value: "{{ StreamName }}"
- name: MediaType
value: "{{ MediaType }}"
- name: KmsKeyId
value: "{{ KmsKeyId }}"
- name: DataRetentionInHours
value: {{ DataRetentionInHours }}
- name: Tags
value: "{{ Tags }}"
- name: StreamStorageConfiguration
description: |
The configuration for stream storage, including the default storage tier for stream data. This configuration determines how stream data is stored and accessed, with different tiers offering varying levels of performance and cost optimization.
value:
DefaultStorageTier: "{{ DefaultStorageTier }}"
UPDATE examples
- update_stream
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
- delete_stream
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
;