Skip to main content

streams

Creates, updates, deletes or gets a stream resource or lists streams in a region

Overview

Namestreams
TypeResource
DescriptionResource Type Definition for AWS::KinesisVideo::Stream
Idawscc.kinesisvideo.streams

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the Kinesis Video stream.
namestringThe name of the Kinesis Video stream.
data_retention_in_hoursintegerThe number of hours till which Kinesis Video will retain the data in the stream
device_namestringThe name of the device that is writing to the stream.
kms_key_idstringAWS KMS key ID that Kinesis Video Streams uses to encrypt stream data.
media_typestringThe media type of the stream. Consumers of the stream can use this information when processing the stream.
tagsarrayAn array of key-value pairs associated with the Kinesis Video Stream.
regionstringAWS region.

For more information, see AWS::KinesisVideo::Stream.

Methods

NameResourceAccessible byRequired Params
create_resourcestreamsINSERT, region
delete_resourcestreamsDELETEIdentifier, region
update_resourcestreamsUPDATEIdentifier, PatchDocument, region
list_resourcesstreams_list_onlySELECTregion
get_resourcestreamsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual stream.

SELECT
region,
arn,
name,
data_retention_in_hours,
device_name,
kms_key_id,
media_type,
tags
FROM awscc.kinesisvideo.streams
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';

INSERT example

Use the following StackQL query and manifest file to create a new stream resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.kinesisvideo.streams (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a stream resource, using stack-deploy.

/*+ update */
UPDATE awscc.kinesisvideo.streams
SET PatchDocument = string('{{ {
"DataRetentionInHours": data_retention_in_hours,
"DeviceName": device_name,
"KmsKeyId": kms_key_id,
"MediaType": media_type,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.kinesisvideo.streams
WHERE
Identifier = '{{ name }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the streams resource, the following permissions are required:

kinesisvideo:DescribeStream,
kinesisvideo:CreateStream,
kinesisvideo:TagStream