channels
Creates, updates, deletes, gets or lists a channels resource.
Overview
| Name | channels |
| Type | Resource |
| Id | aws.mediapackagev2.channels |
Fields
The following fields are returned by SELECT queries:
- get_channel
- list_channels
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) associated with the resource. |
channel_group_name | string | The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region. |
channel_name | string | The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. |
created_at | string (date-time) | The date and time the channel was created. |
description | string | The description for your channel. |
e_tag | string | The current Entity Tag (ETag) associated with this resource. The entity tag can be used to safely make concurrent updates to the resource. (pattern: <code>[\S]+</code>) |
ingest_endpoints | array | The list of ingest endpoints. |
input_switch_configuration | object | The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. |
input_type | string | The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior. The allowed values are: HLS - The HLS streaming specification (which defines M3U8 manifests and TS segments). CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests). (HLS, CMAF) |
modified_at | string (date-time) | The date and time the channel was modified. |
output_header_configuration | object | The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. |
output_locking_mode | string | The output locking mode configured for the channel. The allowed values are: EPOCH_LOCKED - The channel uses epoch-locked behavior with deterministic sequence numbering and fixed segment boundaries aligned to epoch time. NON_EPOCH_LOCKED - The channel uses non-epoch-locked behavior with duration-based segment combining and monotonically increasing sequence numbers starting from 0. (EPOCH_LOCKED, NON_EPOCH_LOCKED) |
reset_at | string (date-time) | The time that the channel was last reset. |
tags | object | The comma-separated list of tag key:value pairs assigned to the channel. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) associated with the resource. |
channel_group_name | string | The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region. |
channel_name | string | The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. |
created_at | string (date-time) | The date and time the channel was created. |
description | string | Any descriptive information that you want to add to the channel for future identification purposes. |
input_type | string | The input type will be an immutable field which will be used to define whether the channel will allow CMAF ingest or HLS ingest. If unprovided, it will default to HLS to preserve current behavior. The allowed values are: HLS - The HLS streaming specification (which defines M3U8 manifests and TS segments). CMAF - The DASH-IF CMAF Ingest specification (which defines CMAF segments with optional DASH manifests). (HLS, CMAF) |
modified_at | string (date-time) | The date and time the channel was modified. |
output_locking_mode | string | The output locking mode configured for the channel. The allowed values are: EPOCH_LOCKED - The channel uses epoch-locked behavior with deterministic sequence numbering and fixed segment boundaries aligned to epoch time. NON_EPOCH_LOCKED - The channel uses non-epoch-locked behavior with duration-based segment combining and monotonically increasing sequence numbers starting from 0. (EPOCH_LOCKED, NON_EPOCH_LOCKED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_channel | select | channel_group_name, channel_name, region | Retrieves the specified channel that's configured in AWS Elemental MediaPackage. | |
list_channels | select | channel_group_name, region | maxResults, nextToken | Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage. |
create_channel | insert | channel_group_name, region, ChannelName | x-amzn-client-token | Create a channel to start receiving content streams. The channel represents the input to MediaPackage for incoming live content from an encoder such as AWS Elemental MediaLive. The channel receives content, and after packaging it, outputs it through an origin endpoint to downstream devices (such as video players or CDNs) that request the content. You can create only one channel with each request. We recommend that you spread out channels between channel groups, such as putting redundant channels in the same AWS Region in different channel groups. |
update_channel | update | channel_group_name, channel_name, region | x-amzn-update-if-match | Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel's policy settings. You can't edit the name of the channel or CloudFront distribution details. Any edits you make that impact the video output may not be reflected for a few minutes. |
delete_channel | delete | channel_group_name, channel_name, region | Delete a channel to stop AWS Elemental MediaPackage from receiving further content. You must delete the channel's origin endpoints before you can delete the channel. | |
reset_channel_state | exec | channel_group_name, channel_name, region | Resetting the channel can help to clear errors from misconfigurations in the encoder. A reset refreshes the ingest stream and removes previous content. Be sure to stop the encoder before you reset the channel, and wait at least 30 seconds before you restart the encoder. |
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 |
|---|---|---|
channel_group_name | string | The name of the channel group that contains the channel that you are resetting. |
channel_name | string | The name of the channel that you are resetting. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The maximum number of results to return in the response. |
nextToken | string | The pagination token from the GET list request. Use the token to fetch the next page of results. |
x-amzn-client-token | string | A unique, case-sensitive token that you provide to ensure the idempotency of the request. |
x-amzn-update-if-match | string | The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected. |
SELECT examples
- get_channel
- list_channels
Retrieves the specified channel that's configured in AWS Elemental MediaPackage.
SELECT
arn,
channel_group_name,
channel_name,
created_at,
description,
e_tag,
ingest_endpoints,
input_switch_configuration,
input_type,
modified_at,
output_header_configuration,
output_locking_mode,
reset_at,
tags
FROM aws.mediapackagev2.channels
WHERE channel_group_name = '{{ channel_group_name }}' -- required
AND channel_name = '{{ channel_name }}' -- required
AND region = '{{ region }}' -- required
;
Retrieves all channels in a specific channel group that are configured in AWS Elemental MediaPackage.
SELECT
arn,
channel_group_name,
channel_name,
created_at,
description,
input_type,
modified_at,
output_locking_mode
FROM aws.mediapackagev2.channels
WHERE channel_group_name = '{{ channel_group_name }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_channel
- Manifest
Create a channel to start receiving content streams. The channel represents the input to MediaPackage for incoming live content from an encoder such as AWS Elemental MediaLive. The channel receives content, and after packaging it, outputs it through an origin endpoint to downstream devices (such as video players or CDNs) that request the content. You can create only one channel with each request. We recommend that you spread out channels between channel groups, such as putting redundant channels in the same AWS Region in different channel groups.
INSERT INTO aws.mediapackagev2.channels (
ChannelName,
InputType,
Description,
InputSwitchConfiguration,
OutputHeaderConfiguration,
OutputLockingMode,
Tags,
channel_group_name,
region,
`x-amzn-client-token`
)
SELECT
'{{ ChannelName }}' /* required */,
'{{ InputType }}',
'{{ Description }}',
'{{ InputSwitchConfiguration }}',
'{{ OutputHeaderConfiguration }}',
'{{ OutputLockingMode }}',
'{{ Tags }}',
'{{ channel_group_name }}',
'{{ region }}',
'{{ x-amzn-client-token }}'
RETURNING
arn,
channel_group_name,
channel_name,
created_at,
description,
e_tag,
ingest_endpoints,
input_switch_configuration,
input_type,
modified_at,
output_header_configuration,
output_locking_mode,
tags
;
# Description fields are for documentation purposes
- name: channels
props:
- name: channel_group_name
value: "{{ channel_group_name }}"
description: Required parameter for the channels resource.
- name: region
value: "{{ region }}"
description: Required parameter for the channels resource.
- name: ChannelName
value: "{{ ChannelName }}"
- name: InputType
value: "{{ InputType }}"
valid_values: ['HLS', 'CMAF']
- name: Description
value: "{{ Description }}"
- name: InputSwitchConfiguration
description: |
The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive.
value:
MQCSInputSwitching: {{ MQCSInputSwitching }}
PreferredInput: {{ PreferredInput }}
- name: OutputHeaderConfiguration
description: |
The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN.
value:
PublishMQCS: {{ PublishMQCS }}
- name: OutputLockingMode
value: "{{ OutputLockingMode }}"
valid_values: ['EPOCH_LOCKED', 'NON_EPOCH_LOCKED']
- name: Tags
value: "{{ Tags }}"
- name: x-amzn-client-token
value: "{{ x-amzn-client-token }}"
description: A unique, case-sensitive token that you provide to ensure the idempotency of the request.
description: A unique, case-sensitive token that you provide to ensure the idempotency of the request.
UPDATE examples
- update_channel
Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel's policy settings. You can't edit the name of the channel or CloudFront distribution details. Any edits you make that impact the video output may not be reflected for a few minutes.
UPDATE aws.mediapackagev2.channels
SET
Description = '{{ Description }}',
InputSwitchConfiguration = '{{ InputSwitchConfiguration }}',
OutputHeaderConfiguration = '{{ OutputHeaderConfiguration }}'
WHERE
channel_group_name = '{{ channel_group_name }}' --required
AND channel_name = '{{ channel_name }}' --required
AND region = '{{ region }}' --required
AND `x-amzn-update-if-match` = '{{ x-amzn-update-if-match}}'
RETURNING
arn,
channel_group_name,
channel_name,
created_at,
description,
e_tag,
ingest_endpoints,
input_switch_configuration,
input_type,
modified_at,
output_header_configuration,
output_locking_mode,
tags;
DELETE examples
- delete_channel
Delete a channel to stop AWS Elemental MediaPackage from receiving further content. You must delete the channel's origin endpoints before you can delete the channel.
DELETE FROM aws.mediapackagev2.channels
WHERE channel_group_name = '{{ channel_group_name }}' --required
AND channel_name = '{{ channel_name }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- reset_channel_state
Resetting the channel can help to clear errors from misconfigurations in the encoder. A reset refreshes the ingest stream and removes previous content. Be sure to stop the encoder before you reset the channel, and wait at least 30 seconds before you restart the encoder.
EXEC aws.mediapackagev2.channels.reset_channel_state
@channel_group_name='{{ channel_group_name }}' --required,
@channel_name='{{ channel_name }}' --required,
@region='{{ region }}' --required
;