Skip to content
v2.277.0

Experimental

@aws-cdk/aws-mediapackagev2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ChannelProps Struct ​

Properties to set on a Channel.

Example ​

ts
declare const stack: Stack;
const group = new ChannelGroup(stack, 'MyChannelGroup', {
    channelGroupName: 'my-test-channel-group',
});

const channel = new Channel(stack, 'MyChannel', {
    channelGroup: group,
    channelName: 'my-testchannel',
    input: InputConfiguration.cmaf(),
});

const endpoint = new OriginEndpoint(stack, 'MyOriginEndpoint', {
    channel,
    originEndpointName: 'my-test-endpoint',
    segment: Segment.cmaf(),
    manifests: [Manifest.hls({
        manifestName: 'index',
    })],
});
python
# stack: Stack

group = ChannelGroup(stack, "MyChannelGroup",
    channel_group_name="my-test-channel-group"
)

channel = Channel(stack, "MyChannel",
    channel_group=group,
    channel_name="my-testchannel",
    input=InputConfiguration.cmaf()
)

endpoint = OriginEndpoint(stack, "MyOriginEndpoint",
    channel=channel,
    origin_endpoint_name="my-test-endpoint",
    segment=Segment.cmaf(),
    manifests=[Manifest.hls(
        manifest_name="index"
    )]
)
java
Stack stack;

ChannelGroup group = ChannelGroup.Builder.create(stack, "MyChannelGroup")
        .channelGroupName("my-test-channel-group")
        .build();

Channel channel = Channel.Builder.create(stack, "MyChannel")
        .channelGroup(group)
        .channelName("my-testchannel")
        .input(InputConfiguration.cmaf())
        .build();

OriginEndpoint endpoint = OriginEndpoint.Builder.create(stack, "MyOriginEndpoint")
        .channel(channel)
        .originEndpointName("my-test-endpoint")
        .segment(Segment.cmaf())
        .manifests(List.of(Manifest.hls(HlsManifestConfiguration.builder()
                .manifestName("index")
                .build())))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Stack stack;

var group = new ChannelGroup(stack, "MyChannelGroup", new ChannelGroupProps {
    ChannelGroupName = "my-test-channel-group"
});

var channel = new Channel(stack, "MyChannel", new ChannelProps {
    ChannelGroup = group,
    ChannelName = "my-testchannel",
    Input = InputConfiguration.Cmaf()
});

var endpoint = new OriginEndpoint(stack, "MyOriginEndpoint", new OriginEndpointProps {
    Channel = channel,
    OriginEndpointName = "my-test-endpoint",
    Segment = Segment.Cmaf(),
    Manifests = new [] { Manifest.Hls(new HlsManifestConfiguration {
        ManifestName = "index"
    }) }
});
go
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var stack Stack

group := awsmediapackagev2alpha.NewChannelGroup(stack, jsii.String("MyChannelGroup"), &ChannelGroupProps{
	ChannelGroupName: jsii.String("my-test-channel-group"),
})

channel := awsmediapackagev2alpha.NewChannel(stack, jsii.String("MyChannel"), &ChannelProps{
	ChannelGroup: group,
	ChannelName: jsii.String("my-testchannel"),
	Input: awsmediapackagev2alpha.InputConfiguration_Cmaf(),
})

endpoint := awsmediapackagev2alpha.NewOriginEndpoint(stack, jsii.String("MyOriginEndpoint"), &OriginEndpointProps{
	Channel: Channel,
	OriginEndpointName: jsii.String("my-test-endpoint"),
	Segment: awsmediapackagev2alpha.Segment_Cmaf(),
	Manifests: []Manifest{
		awsmediapackagev2alpha.Manifest_Hls(&HlsManifestConfiguration{
			ManifestName: jsii.String("index"),
		}),
	},
})

Properties ​

channelGroupIChannelGroupchannel_groupIChannelGroupchannelGroupIChannelGroupChannelGroupIChannelGroupChannelGroupIChannelGrouprequired#
Channel Group to add this Channel to.
channelNameoptionalstringchannel_nameoptionalstrchannelNameoptionalStringChannelNameoptionalstringChannelNameoptional*string= autogenerated#
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.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string#
Enter any descriptive text that helps you to identify the channel.

Default: no description

inputoptionalInputConfigurationinputoptionalInputConfigurationinputoptionalInputConfigurationInputoptionalInputConfigurationInputoptionalInputConfiguration= InputConfiguration.cmaf()#
Input configuration for the channel.

Use InputConfiguration.hls() or InputConfiguration.cmaf() to create the configuration.

removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy= RemovalPolicy.DESTROY#
Policy to apply when the channel is removed from the stack.
notes

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.

tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string#
Tags to add to the Channel.

Default: No tagging