channels
Creates, updates, deletes or gets a channel resource or lists channels in a region
Overview
| Name | channels |
| Type | Resource |
| Description | Definition of AWS::MediaTailor::Channel Resource Type |
| Id | awscc.mediatailor.channels |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the channel. |
audiences | array | The list of audiences defined in channel. |
channel_name | string | |
filler_slate | object | Slate VOD source configuration. |
log_configuration | object | The log configuration for the channel. |
outputs | array | The channel's output properties. |
playback_mode | string | |
tags | array | The tags to assign to the channel. |
tier | string | |
time_shift_configuration | object | The configuration for time-shifted viewing. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
channel_name | string | |
region | string | AWS region. |
For more information, see AWS::MediaTailor::Channel.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | channels | INSERT | ChannelName, Outputs, PlaybackMode, region |
delete_resource | channels | DELETE | Identifier, region |
update_resource | channels | UPDATE | Identifier, PatchDocument, region |
list_resources | channels_list_only | SELECT | region |
get_resource | channels | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual channel.
SELECT
region,
arn,
audiences,
channel_name,
filler_slate,
log_configuration,
outputs,
playback_mode,
tags,
tier,
time_shift_configuration
FROM awscc.mediatailor.channels
WHERE
region = '{{ region }}' AND
Identifier = '{{ channel_name }}';
Lists all channels in a region.
SELECT
region,
channel_name
FROM awscc.mediatailor.channels_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new channel resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.mediatailor.channels (
ChannelName,
Outputs,
PlaybackMode,
region
)
SELECT
'{{ channel_name }}',
'{{ outputs }}',
'{{ playback_mode }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.mediatailor.channels (
Audiences,
ChannelName,
FillerSlate,
LogConfiguration,
Outputs,
PlaybackMode,
Tags,
Tier,
TimeShiftConfiguration,
region
)
SELECT
'{{ audiences }}',
'{{ channel_name }}',
'{{ filler_slate }}',
'{{ log_configuration }}',
'{{ outputs }}',
'{{ playback_mode }}',
'{{ tags }}',
'{{ tier }}',
'{{ time_shift_configuration }}',
'{{ 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: channel
props:
- name: audiences
value:
- '{{ audiences[0] }}'
- name: channel_name
value: '{{ channel_name }}'
- name: filler_slate
value:
source_location_name: '{{ source_location_name }}'
vod_source_name: '{{ vod_source_name }}'
- name: log_configuration
value:
log_types:
- '{{ log_types[0] }}'
- name: outputs
value:
- dash_playlist_settings:
manifest_window_seconds: null
min_buffer_time_seconds: null
min_update_period_seconds: null
suggested_presentation_delay_seconds: null
hls_playlist_settings:
manifest_window_seconds: null
ad_markup_type:
- '{{ ad_markup_type[0] }}'
manifest_name: '{{ manifest_name }}'
source_group: '{{ source_group }}'
- name: playback_mode
value: '{{ playback_mode }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: tier
value: '{{ tier }}'
- name: time_shift_configuration
value:
max_time_delay_seconds: null
UPDATE example
Use the following StackQL query and manifest file to update a channel resource, using stack-deploy.
/*+ update */
UPDATE awscc.mediatailor.channels
SET PatchDocument = string('{{ {
"Audiences": audiences,
"FillerSlate": filler_slate,
"LogConfiguration": log_configuration,
"Outputs": outputs,
"PlaybackMode": playback_mode,
"Tags": tags,
"TimeShiftConfiguration": time_shift_configuration
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ channel_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.mediatailor.channels
WHERE
Identifier = '{{ channel_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 channels resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
mediatailor:CreateChannel,
mediatailor:TagResource,
mediatailor:ConfigureLogsForChannel,
iam:CreateServiceLinkedRole,
mediatailor:DescribeChannel
mediatailor:DescribeChannel
mediatailor:UpdateChannel,
mediatailor:TagResource,
mediatailor:UntagResource,
iam:CreateServiceLinkedRole,
mediatailor:ConfigureLogsForChannel,
mediatailor:DescribeChannel
mediatailor:DeleteChannel,
mediatailor:DescribeChannel
mediatailor:ListChannels