Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
Pipeline Class
MediaLive pipeline (channel pipeline 0 or 1).
STANDARD channels run two redundant pipelines (PIPELINE_0, PIPELINE_1). SINGLE_PIPELINE channels run only PIPELINE_0.
| Stability | Experimental |
|---|---|
| Source | lib/channel.ts |
Example
ts
declare const channel: medialive.Channel;
declare const stack: Stack;
channel.metricDroppedFrames(medialive.Pipeline.PIPELINE_0).createAlarm(stack, 'DroppedFrames', {
threshold: 1,
evaluationPeriods: 2,
});
channel.metricSvqTime(medialive.Pipeline.PIPELINE_0).createAlarm(stack, 'SvqTime', {
threshold: 0,
evaluationPeriods: 1,
});
// Custom metric by name with sum statistic
channel.metric('Output4xxErrors', medialive.Pipeline.PIPELINE_0, { statistic: 'sum' });
python
# channel: medialive.Channel
# stack: Stack
channel.metric_dropped_frames(medialive.Pipeline.PIPELINE_0).create_alarm(stack, "DroppedFrames",
threshold=1,
evaluation_periods=2
)
channel.metric_svq_time(medialive.Pipeline.PIPELINE_0).create_alarm(stack, "SvqTime",
threshold=0,
evaluation_periods=1
)
# Custom metric by name with sum statistic
channel.metric("Output4xxErrors", medialive.Pipeline.PIPELINE_0, statistic="sum")
java
Channel channel;
Stack stack;
channel.metricDroppedFrames(Pipeline.PIPELINE_0).createAlarm(stack, "DroppedFrames", CreateAlarmOptions.builder()
.threshold(1)
.evaluationPeriods(2)
.build());
channel.metricSvqTime(Pipeline.PIPELINE_0).createAlarm(stack, "SvqTime", CreateAlarmOptions.builder()
.threshold(0)
.evaluationPeriods(1)
.build());
// Custom metric by name with sum statistic
channel.metric("Output4xxErrors", Pipeline.PIPELINE_0, MetricOptions.builder().statistic("sum").build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
Channel channel;
Stack stack;
channel.MetricDroppedFrames(Pipeline.PIPELINE_0).CreateAlarm(stack, "DroppedFrames", new CreateAlarmOptions {
Threshold = 1,
EvaluationPeriods = 2
});
channel.MetricSvqTime(Pipeline.PIPELINE_0).CreateAlarm(stack, "SvqTime", new CreateAlarmOptions {
Threshold = 0,
EvaluationPeriods = 1
});
// Custom metric by name with sum statistic
channel.Metric("Output4xxErrors", Pipeline.PIPELINE_0, new MetricOptions { Statistic = "sum" });
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var channel Channel
var stack Stack
channel.metricDroppedFrames(medialive.Pipeline_PIPELINE_0()).CreateAlarm(stack, jsii.String("DroppedFrames"), &CreateAlarmOptions{
Threshold: jsii.Number(1),
EvaluationPeriods: jsii.Number(2),
})
channel.metricSvqTime(medialive.Pipeline_PIPELINE_0()).CreateAlarm(stack, jsii.String("SvqTime"), &CreateAlarmOptions{
Threshold: jsii.Number(0),
EvaluationPeriods: jsii.Number(1),
})
// Custom metric by name with sum statistic
channel.metric(jsii.String("Output4xxErrors"), medialive.Pipeline_PIPELINE_0(), &MetricOptions{
Statistic: jsii.String("sum"),
})
Properties
Methods
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #Returns the CloudWatch dimension value for this pipeline (`'0'` or `'1'`).