class Channel (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.Channel |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#Channel |
Java | software.amazon.awscdk.services.medialive.alpha.Channel |
Python | aws_cdk.aws_medialive_alpha.Channel |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป Channel |
Implements
IConstruct, IDependable, IResource, IEnvironment, IChannel, IChannel
Defines an AWS Elemental MediaLive Channel.
Example
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
new medialive.Channel(stack, 'Channel', {
inputs: [{
input,
audioSelectors: [
medialive.AudioSelector.byLanguage('eng', 'eng', medialive.AudioLanguageSelectionPolicy.STRICT),
],
captionSelectors: [
medialive.CaptionSelector.embedded('embedded'),
],
videoSelector: {
colorSpace: medialive.VideoColorSpace.HDR10,
colorSpaceUsage: medialive.VideoColorSpaceUsage.FORCE,
selectBy: medialive.VideoSelection.byProgramId(1),
},
}],
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video], outputName: 'hls_out' }],
}),
],
});
Initializer
new Channel(scope: Construct, id: string, props: ChannelProps)
Parameters
- scope
Construct - id
string - props
ChannelProps
Construct Props
| Name | Type | Description |
|---|---|---|
| inputs | Input[] | The input attachments for this channel. |
| output | Output[] | The initial output groups for this channel. At least one is required. Additional output groups can be added with addOutputGroup(). |
| anywhere | Anywhere | Anywhere settings for running the channel on AWS Elemental Anywhere. |
| avail | Avail | Settings for blanking video, audio, and captions during ad avails. |
| avail | Avail | Ad avail handling configuration. |
| blackout | Blackout | Blackout slate configuration. |
| channel | Channel | The class of the channel (STANDARD for redundancy, SINGLE_PIPELINE for cost savings). |
| channel | string | The engine version for the channel. |
| channel | string | The name of the channel. |
| channel | IInput[] | Input security groups to associate with the channel. |
| color | Color[] | Global color correction rules applied to all outputs. |
| feature | Feature | Feature activations for the channel (e.g. Input Prepare schedule actions). |
| global | Global | Global configuration settings for the channel. |
| inference | string | An AWS Elemental Inference feed to send this channel's media to for inference processing. |
| input | Input | The input specification for this channel. |
| linked | Linked | Linked channel settings for primary/follower channel configurations. |
| log | Log | The log level for the channel. |
| maintenance? | Maintenance | Maintenance window configuration for the channel. |
| motion | Motion | Motion graphics overlay configuration. |
| nielsen | Nielsen | Nielsen watermark configuration. |
| role? | IRole | The IAM role for MediaLive to assume when running this channel. |
| scte35 | Scte35 | Which output groups receive SCTE-35 segmentation cues. |
| tags? | { [string]: string } | Tags to add to the channel. |
| thumbnail | Thumbnail | Thumbnail generation configuration. |
| timecode | Timecode | Timecode configuration for the channel. |
| vpc? | Vpc | VPC output settings. |
inputs
Type:
Input[]
The input attachments for this channel.
At least one is required.
Additional inputs can be added with addInput().
outputGroups
Type:
Output[]
The initial output groups for this channel. At least one is required. Additional output groups can be added with addOutputGroup().
A single channel can contain multiple output groups with different codecs (e.g. H.264 and H.265 ladders) sharing the same input.
anywhereSettings?
Type:
Anywhere
(optional, default: not an Anywhere channel)
Anywhere settings for running the channel on AWS Elemental Anywhere.
availBlanking?
Type:
Avail
(optional, default: avail blanking disabled)
Settings for blanking video, audio, and captions during ad avails.
availSettings?
Type:
Avail
(optional, default: no avail configuration)
Ad avail handling configuration.
Defines how SCTE-35 markers are processed.
blackoutSlate?
Type:
Blackout
(optional, default: blackout slate disabled)
Blackout slate configuration.
Controls what is displayed during blackout events.
channelClass?
Type:
Channel
(optional, default: ChannelClass.SINGLE_PIPELINE)
The class of the channel (STANDARD for redundancy, SINGLE_PIPELINE for cost savings).
channelEngineVersion?
Type:
string
(optional, default: service default)
The engine version for the channel.
channelName?
Type:
string
(optional, default: auto-generated)
The name of the channel.
channelSecurityGroups?
Type:
IInput[]
(optional, default: no channel security groups)
Input security groups to associate with the channel.
Controls which IP addresses can connect to the channel's outputs (pull-style outputs where downstream systems initiate connections).
colorCorrections?
Type:
Color[]
(optional, default: no color corrections)
Global color correction rules applied to all outputs.
featureActivations?
Type:
Feature
(optional, default: all features disabled)
Feature activations for the channel (e.g. Input Prepare schedule actions).
globalConfiguration?
Type:
Global
(optional, default: default global configuration)
Global configuration settings for the channel.
inferenceFeedArn?
Type:
string
(optional, default: the channel is not associated to an inference feed)
An AWS Elemental Inference feed to send this channel's media to for inference processing.
Future breaking change: this will change when Elemental Inference is released as an L2 construct.
inputSpecification?
Type:
Input
(optional, default: InputSpecification.standard() (AVC codec, 20 Mbps max, HD resolution))
The input specification for this channel.
Defines the expected codec, bitrate, and resolution of the inputs, and whether they are standard, CDI, or Elemental Link inputs.
linkedChannelSettings?
Type:
Linked
(optional, default: not a linked channel)
Linked channel settings for primary/follower channel configurations.
logLevel?
Type:
Log
(optional, default: LogLevel.DISABLED)
The log level for the channel.
maintenance?
Type:
Maintenance
(optional, default: default maintenance window)
Maintenance window configuration for the channel.
motionGraphicsConfiguration?
Type:
Motion
(optional, default: motion graphics disabled)
Motion graphics overlay configuration.
nielsenConfiguration?
Type:
Nielsen
(optional, default: no Nielsen configuration)
Nielsen watermark configuration.
role?
Type:
IRole
(optional, default: a role is auto-created with confused-deputy prevention)
The IAM role for MediaLive to assume when running this channel.
[disable-awslint:prefer-ref-interface]
scte35SegmentationScope?
Type:
Scte35
(optional, default: service default)
Which output groups receive SCTE-35 segmentation cues.
tags?
Type:
{ [string]: string }
(optional, default: no tags)
Tags to add to the channel.
thumbnailConfiguration?
Type:
Thumbnail
(optional, default: thumbnails disabled)
Thumbnail generation configuration.
timecodeConfig?
Type:
Timecode
(optional, default: EMBEDDED source, no sync threshold)
Timecode configuration for the channel.
vpc?
Type:
Vpc
(optional, default: no VPC (outputs use public endpoints))
VPC output settings.
When set, all output endpoints are created in the specified VPC.
Properties
| Name | Type | Description |
|---|---|---|
| channel | string | The ARN of the channel. |
| channel | string | The ID of the channel. |
| channel | Channel | A reference to this Channel resource. |
| env | Resource | The environment this resource belongs to. |
| grants | Channel | Collection of grant methods for this channel โ start, stop, and update its schedule. |
| node | Node | The tree node. |
| role | IRole | The IAM role used by this channel. |
| stack | Stack | The stack in which this resource is defined. |
| channel | string[] | The IDs of the inputs attached to this channel. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
channelArn
Type:
string
The ARN of the channel.
channelId
Type:
string
The ID of the channel.
channelRef
Type:
Channel
A reference to this Channel resource.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
grants
Type:
Channel
Collection of grant methods for this channel โ start, stop, and update its schedule.
node
Type:
Node
The tree node.
role
Type:
IRole
The IAM role used by this channel.
stack
Type:
Stack
The stack in which this resource is defined.
channelInputs?
Type:
string[]
(optional)
The IDs of the inputs attached to this channel.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| add | Attach an input to this channel. |
| add | Add an output group to this channel. |
| apply | Override the cross-stack reference strength for this resource. |
| apply | Apply the given removal policy to this resource. |
| metric(metricName, pipeline, props?) | Create a CloudWatch metric for this channel scoped to a specific pipeline. |
| metric | Metric for the total number of active alerts on this channel. |
| metric | Metric for dropped frames. |
| metric | Metric for fill milliseconds โ the time MediaLive has filled the video output with fill frames because the input did not deliver content within the expected window. |
| metric | Metric for input loss seconds (RTP and MediaConnect inputs only). |
| metric | Metric for the input video frame rate (frames per second). |
| metric | Metric for the rate of inbound network traffic to MediaLive in Mbps. |
| metric | Metric for the rate of outbound network traffic from MediaLive in Mbps. |
| metric | Metric for SVQ time (speed-vs-quality), expressed as a percent. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from | Import an existing channel by its ARN. |
addInput(attachment)
public addInput(attachment: InputAttachment): void
Parameters
- attachment
InputAttachment
Attach an input to this channel.
addOutputGroup(config)
public addOutputGroup(config: OutputGroupConfiguration): void
Parameters
- config
OutputGroup Configuration
Add an output group to this channel.
Outputs are declared up front via the outputs prop on the group configuration.
applyCrossStackReferenceStrength(strength)
public applyCrossStackReferenceStrength(strength: ReferenceStrength): void
Parameters
- strength
Referenceโ - The reference strength to use for this resource.Strength
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
metric(metricName, pipeline, props?)
public metric(metricName: string, pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- metricName
string - pipeline
Pipeline - props
MetricOptions
Returns
Create a CloudWatch metric for this channel scoped to a specific pipeline.
Channel metrics are published per-pipeline. STANDARD channels run two
redundant pipelines (PIPELINE_0 and PIPELINE_1); to cover both, build
a metric for each. SINGLE_PIPELINE channels only publish on PIPELINE_0.
See the
{@link https://docs.aws.amazon.com/medialive/latest/ug/monitoring-eml-metrics.html MediaLive metrics docs}
for the full set of metric names and recommended statistics.
metricActiveAlerts(pipeline, props?)
public metricActiveAlerts(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for the total number of active alerts on this channel.
metricDroppedFrames(pipeline, props?)
public metricDroppedFrames(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for dropped frames.
A non-zero value indicates the encoder cannot keep up with the incoming video in real time.
metricFillMsec(pipeline, props?)
public metricFillMsec(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for fill milliseconds โ the time MediaLive has filled the video output with fill frames because the input did not deliver content within the expected window.
A non-zero value indicates an unhealthy input.
metricInputLossSeconds(pipeline, props?)
public metricInputLossSeconds(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for input loss seconds (RTP and MediaConnect inputs only).
metricInputVideoFrameRate(pipeline, props?)
public metricInputVideoFrameRate(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for the input video frame rate (frames per second).
metricNetworkIn(pipeline, props?)
public metricNetworkIn(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for the rate of inbound network traffic to MediaLive in Mbps.
metricNetworkOut(pipeline, props?)
public metricNetworkOut(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for the rate of outbound network traffic from MediaLive in Mbps.
metricSvqTime(pipeline, props?)
public metricSvqTime(pipeline: Pipeline, props?: MetricOptions): Metric
Parameters
- pipeline
Pipeline - props
MetricOptions
Returns
Metric for SVQ time (speed-vs-quality), expressed as a percent.
Indicates the share of time MediaLive reduced quality optimisations to keep up with real-time output.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.
with(...mixins)
public with(...mixins: IMixin[]): IConstruct
Parameters
- mixins
IMixin
Returns
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
static fromChannelArn(scope, id, channelArn)
public static fromChannelArn(scope: Construct, id: string, channelArn: string): IChannel
Parameters
- scope
Construct - id
string - channelArn
string
Returns
Import an existing channel by its ARN.
The id is parsed out of the ARN.

.NET
Go
Java
Python
TypeScript (