Experimental
@aws-cdk/aws-mediapackagev2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
OriginEndpointOptions Struct
Configuration parameters for an AWS Elemental MediaPackage V2 Origin Endpoint.
| Stability | Experimental |
|---|---|
| Source | lib/endpoint.ts |
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' })],
});
# stack: Stack
# Create a channel group
group = ChannelGroup(stack, "MyChannelGroup",
channel_group_name="my-channel-group"
)
# Add a channel using the factory method
channel = group.add_channel("MyChannel",
channel_name="my-channel",
input=InputConfiguration.cmaf()
)
# Add an origin endpoint using the factory method
endpoint = channel.add_origin_endpoint("MyEndpoint",
origin_endpoint_name="my-endpoint",
segment=Segment.cmaf(),
manifests=[Manifest.hls(manifest_name="index")]
)
Stack stack;
// Create a channel group
ChannelGroup group = ChannelGroup.Builder.create(stack, "MyChannelGroup")
.channelGroupName("my-channel-group")
.build();
// Add a channel using the factory method
Channel channel = group.addChannel("MyChannel", ChannelOptions.builder()
.channelName("my-channel")
.input(InputConfiguration.cmaf())
.build());
// Add an origin endpoint using the factory method
OriginEndpoint endpoint = channel.addOriginEndpoint("MyEndpoint", OriginEndpointOptions.builder()
.originEndpointName("my-endpoint")
.segment(Segment.cmaf())
.manifests(List.of(Manifest.hls(HlsManifestConfiguration.builder().manifestName("index").build())))
.build());
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Stack stack;
// Create a channel group
var group = new ChannelGroup(stack, "MyChannelGroup", new ChannelGroupProps {
ChannelGroupName = "my-channel-group"
});
// Add a channel using the factory method
var channel = group.AddChannel("MyChannel", new ChannelOptions {
ChannelName = "my-channel",
Input = InputConfiguration.Cmaf()
});
// Add an origin endpoint using the factory method
var endpoint = channel.AddOriginEndpoint("MyEndpoint", new OriginEndpointOptions {
OriginEndpointName = "my-endpoint",
Segment = Segment.Cmaf(),
Manifests = new [] { Manifest.Hls(new HlsManifestConfiguration { ManifestName = "index" }) }
});
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var stack Stack
// Create a channel group
group := awsmediapackagev2alpha.NewChannelGroup(stack, jsii.String("MyChannelGroup"), &ChannelGroupProps{
ChannelGroupName: jsii.String("my-channel-group"),
})
// Add a channel using the factory method
channel := group.addChannel(jsii.String("MyChannel"), &ChannelOptions{
ChannelName: jsii.String("my-channel"),
Input: awsmediapackagev2alpha.InputConfiguration_Cmaf(),
})
// Add an origin endpoint using the factory method
endpoint := channel.addOriginEndpoint(jsii.String("MyEndpoint"), &OriginEndpointOptions{
OriginEndpointName: jsii.String("my-endpoint"),
Segment: awsmediapackagev2alpha.Segment_Cmaf(),
Manifests: []Manifest{
awsmediapackagev2alpha.Manifest_Hls(&HlsManifestConfiguration{
ManifestName: jsii.String("index"),
}),
},
})
Properties
cdnAuthoptionalCdnAuthConfigurationcdn_authoptionalCdnAuthConfigurationcdnAuthoptionalCdnAuthConfigurationCdnAuthoptionalCdnAuthConfigurationCdnAuthoptionalCdnAuthConfiguration #Default: undefined - Not configured on endpoint
notes
Use this when your CDN doesn't support AWS Signature Version 4 (SigV4) authentication. For SigV4-based access with Amazon CloudFront, see MediaPackageV2Origin.
Setting cdnAuth auto-creates the following policy on the OriginEndpoint:
{
"Version":"2012-10-17",
"Statement": [
{
"Sid": "AllowGetObjectAccessForAuthorizedRequest",
"Effect": "Allow",
"Principal": "*",
"Action": "mediapackagev2:GetObject",
"Resource": "arn:aws:mediapackagev2:us-east-1:111122223333:channelGroup/channelGroupName/channel/channelName/originEndpoint/originEndpointName",
"Condition": {
"Bool": {
"mediapackagev2:RequestHasMatchingCdnAuthHeader": "true"
}
}
}
]
}
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #Default: undefined - No description is added to Origin Endpoint
forceEndpointConfigurationConditionsoptionalEndpointErrorConfiguration[]force_endpoint_configuration_conditionsoptionaltyping.List[EndpointErrorConfiguration]forceEndpointConfigurationConditionsoptionalList<EndpointErrorConfiguration>ForceEndpointConfigurationConditionsoptionalEndpointErrorConfiguration[]ForceEndpointConfigurationConditionsoptional*[]EndpointErrorConfiguration #Default: undefined - No force endpoint configuration is configured
manifestsManifest[]manifeststyping.List[Manifest]manifestsList<Manifest>ManifestsManifest[]Manifests*[]Manifest required #originEndpointNameoptionalstringorigin_endpoint_nameoptionalstroriginEndpointNameoptionalStringOriginEndpointNameoptionalstringOriginEndpointNameoptional*string = autogenerated #removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = RemovalPolicy.DESTROY #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.
segmentSegmentConfigurationsegmentSegmentConfigurationsegmentSegmentConfigurationSegmentSegmentConfigurationSegmentSegmentConfiguration required #Inside the segment configuration you can define options such as encryption, SPEKE parameters and other general segment configurations.
Use Segment.ts() or Segment.cmaf() to create the configuration.
startoverWindowoptionalDurationstartover_windowoptionalDurationstartoverWindowoptionalDurationStartoverWindowoptionalDurationStartoverWindowoptionalDuration = 900 #Viewers can start-over or catch-up on content that falls within the window.
tagsoptional{ [key: string]: string }tagsoptionaltyping.Mapping[str, str]tagsoptionalMap<String, String>TagsoptionalIDictionary<string, string>Tagsoptional*map[string]*string #Default: No tagging