streams
Creates, updates, deletes or gets a stream resource or lists streams in a region
Overview
| Name | streams |
| Type | Resource |
| Description | Resource Type Definition for AWS::KinesisVideo::Stream |
| Id | awscc.kinesisvideo.streams |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the Kinesis Video stream. |
name | string | The name of the Kinesis Video stream. |
data_retention_in_hours | integer | The number of hours till which Kinesis Video will retain the data in the stream |
device_name | string | The name of the device that is writing to the stream. |
kms_key_id | string | AWS KMS key ID that Kinesis Video Streams uses to encrypt stream data. |
media_type | string | The media type of the stream. Consumers of the stream can use this information when processing the stream. |
tags | array | An array of key-value pairs associated with the Kinesis Video Stream. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the Kinesis Video stream. |
region | string | AWS region. |
For more information, see AWS::KinesisVideo::Stream.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | streams | INSERT | , region |
delete_resource | streams | DELETE | Identifier, region |
update_resource | streams | UPDATE | Identifier, PatchDocument, region |
list_resources | streams_list_only | SELECT | region |
get_resource | streams | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all streams in a region.
SELECT
region,
name
FROM awscc.kinesisvideo.streams_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new stream resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.kinesisvideo.streams (
,
region
)
SELECT
'{{ }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.kinesisvideo.streams (
Name,
DataRetentionInHours,
DeviceName,
KmsKeyId,
MediaType,
Tags,
region
)
SELECT
'{{ name }}',
'{{ data_retention_in_hours }}',
'{{ device_name }}',
'{{ kms_key_id }}',
'{{ media_type }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: stream
props:
- name: name
value: '{{ name }}'
- name: data_retention_in_hours
value: '{{ data_retention_in_hours }}'
- name: device_name
value: '{{ device_name }}'
- name: kms_key_id
value: '{{ kms_key_id }}'
- name: media_type
value: '{{ media_type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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:
| Parameter | Description |
|---|---|
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:
- Create
- Read
- Update
- Delete
- List
kinesisvideo:DescribeStream,
kinesisvideo:CreateStream,
kinesisvideo:TagStream
kinesisvideo:DescribeStream,
kinesisvideo:ListTagsForStream
kinesisvideo:DescribeStream,
kinesisvideo:UpdateStream,
kinesisvideo:UpdateDataRetention,
kinesisvideo:TagStream,
kinesisvideo:UntagStream,
kinesisvideo:ListTagsForStream
kinesisvideo:DescribeStream,
kinesisvideo:DeleteStream
kinesisvideo:ListStreams