class ChannelGroup (construct)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaPackageV2.Alpha.ChannelGroup |
Go | github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2#ChannelGroup |
Java | software.amazon.awscdk.services.mediapackagev2.alpha.ChannelGroup |
Python | aws_cdk.aws_mediapackagev2_alpha.ChannelGroup |
TypeScript (source) | @aws-cdk/aws-mediapackagev2-alpha ยป ChannelGroup |
Implements
IConstruct, IDependable, IResource, IEnvironment, IChannel, IChannel
Defines an AWS Elemental MediaPackage V2 Channel Group.
Example
declare const stack: Stack;
// Create a channel group
const group = new ChannelGroup(stack, 'MyChannelGroup', {
channelGroupName: 'my-channel-group',
});
// Add a channel using the factory method
const channel = group.addChannel('MyChannel', {
channelName: 'my-channel',
input: InputConfiguration.cmaf(),
});
// Add an origin endpoint using the factory method
const endpoint = channel.addOriginEndpoint('MyEndpoint', {
originEndpointName: 'my-endpoint',
segment: Segment.cmaf(),
manifests: [Manifest.hls({ manifestName: 'index' })],
});
Initializer
new ChannelGroup(scope: Construct, id: string, props?: ChannelGroupProps)
Parameters
- scope
Construct - id
string - props
ChannelGroup Props
Construct Props
| Name | Type | Description |
|---|---|---|
| channel | string | The name that describes the channel group. |
| description? | string | The description for your channel group. |
| removal | Removal | Policy to apply when the channel group is removed from the stack. |
| tags? | { [string]: string } | Tags to add to the Channel Group. |
channelGroupName?
Type:
string
(optional, default: autogenerated)
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.
description?
Type:
string
(optional, default: no description)
The description for your channel group.
removalPolicy?
Type:
Removal
(optional, default: RemovalPolicy.DESTROY)
Policy to apply when the channel group is removed from the stack.
Even though MediaPackage ChannelGroups, Channels and OriginEndpoints are technically stateful,
their contents are transient and it is common to add and remove these while rearchitecting your application.
The default is therefore DESTROY. Change it to RETAIN if the content (in a lookback window) are so
valuable that accidentally losing it would be unacceptable.
tags?
Type:
{ [string]: string }
(optional, default: No tagging)
Tags to add to the Channel Group.
Properties
| Name | Type | Description |
|---|---|---|
| channel | string | The Amazon Resource Name (ARN) associated with the resource. |
| channel | string | The name that describes the channel group. |
| channel | Channel | A reference to this Channel Group resource. |
| egress | string | The egress domain where packaged content is available. |
| env | Resource | The environment this resource belongs to. |
| node | Node | The tree node. |
| stack | Stack | The stack in which this resource is defined. |
| created | string | The date and time the channel group was created. |
| modified | string | The date and time the channel group was modified. |
| static PROPERTY_INJECTION_ID | string | Uniquely identifies this class. |
channelGroupArn
Type:
string
The Amazon Resource Name (ARN) associated with the resource.
channelGroupName
Type:
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.
channelGroupRef
Type:
Channel
A reference to this Channel Group resource.
Required by the auto-generated IChannelGroupRef interface.
egressDomain
Type:
string
The egress domain where packaged content is available.
Use this as the origin domain when configuring a CDN such as Amazon CloudFront.
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.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
createdAt?
Type:
string
(optional)
The date and time the channel group was created.
modifiedAt?
Type:
string
(optional)
The date and time the channel group was modified.
static PROPERTY_INJECTION_ID
Type:
string
Uniquely identifies this class.
Methods
| Name | Description |
|---|---|
| add | Add Channel for this Channel Group. |
| apply | Apply the given removal policy to this resource. |
| metric(metricName, props?) | Create a CloudWatch metric. |
| metric | Returns Metric for Egress Bytes. |
| metric | Returns Metric for Egress Request Count. |
| metric | Returns Metric for Egress Response time. |
| metric | Returns Metric for Ingress Bytes. |
| metric | Returns Metric for Ingress Request Count. |
| metric | Returns Metric for Ingress response time. |
| to | Returns a string representation of this construct. |
| with(...mixins) | Applies one or more mixins to this construct. |
| static from | Creates a Channel Group construct that represents an external (imported) Channel Group. |
addChannel(id, options?)
public addChannel(id: string, options?: ChannelOptions): Channel
Parameters
- id
string - options
ChannelOptions
Returns
Add Channel for this Channel Group.
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, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
stringโ name of the metric. - props
Metricโ metric options.Options
Returns
Create a CloudWatch metric.
metricEgressBytes(props?)
public metricEgressBytes(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Egress Bytes.
metricEgressRequestCount(props?)
public metricEgressRequestCount(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Egress Request Count.
metricEgressResponseTime(props?)
public metricEgressResponseTime(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Egress Response time.
metricIngressBytes(props?)
public metricIngressBytes(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Ingress Bytes.
metricIngressRequestCount(props?)
public metricIngressRequestCount(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Ingress Request Count.
metricIngressResponseTime(props?)
public metricIngressResponseTime(props?: MetricOptions): Metric
Parameters
- props
MetricOptions
Returns
Returns Metric for Ingress response time.
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 fromChannelGroupAttributes(scope, id, attrs)
public static fromChannelGroupAttributes(scope: Construct, id: string, attrs: ChannelGroupAttributes): IChannelGroup
Parameters
- scope
Construct - id
string - attrs
ChannelGroup Attributes
Returns
Creates a Channel Group construct that represents an external (imported) Channel Group.

.NET
Go
Java
Python
TypeScript (