Experimental
@aws-cdk/aws-mediapackagev2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
OriginEndpointProps Struct
Properties to set on an Origin Endpoint.
| Stability | Experimental |
|---|---|
| Source | lib/endpoint.ts |
Example
declare const channel: Channel;
declare const spekeRole: iam.IRole;
new OriginEndpoint(this, 'TsEndpoint', {
channel,
segment: Segment.ts({
encryption: TsEncryption.speke({
method: TsEncryptionMethod.SAMPLE_AES,
resourceId: 'my-content-id',
url: 'https://example.com/speke',
role: spekeRole,
}),
}),
manifests: [Manifest.hls({ manifestName: 'index' })],
});
# channel: Channel
# speke_role: iam.IRole
OriginEndpoint(self, "TsEndpoint",
channel=channel,
segment=Segment.ts(
encryption=TsEncryption.speke(
method=TsEncryptionMethod.SAMPLE_AES,
resource_id="my-content-id",
url="https://example.com/speke",
role=speke_role
)
),
manifests=[Manifest.hls(manifest_name="index")]
)
Channel channel;
IRole spekeRole;
OriginEndpoint.Builder.create(this, "TsEndpoint")
.channel(channel)
.segment(Segment.ts(TsSegmentProps.builder()
.encryption(TsEncryption.speke(TsSpekeEncryptionProps.builder()
.method(TsEncryptionMethod.SAMPLE_AES)
.resourceId("my-content-id")
.url("https://example.com/speke")
.role(spekeRole)
.build()))
.build()))
.manifests(List.of(Manifest.hls(HlsManifestConfiguration.builder().manifestName("index").build())))
.build();
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Channel channel;
IRole spekeRole;
new OriginEndpoint(this, "TsEndpoint", new OriginEndpointProps {
Channel = channel,
Segment = Segment.Ts(new TsSegmentProps {
Encryption = TsEncryption.Speke(new TsSpekeEncryptionProps {
Method = TsEncryptionMethod.SAMPLE_AES,
ResourceId = "my-content-id",
Url = "https://example.com/speke",
Role = spekeRole
})
}),
Manifests = new [] { Manifest.Hls(new HlsManifestConfiguration { ManifestName = "index" }) }
});
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var channel Channel
var spekeRole IRole
awsmediapackagev2alpha.NewOriginEndpoint(this, jsii.String("TsEndpoint"), &OriginEndpointProps{
Channel: Channel,
Segment: awsmediapackagev2alpha.Segment_Ts(&TsSegmentProps{
Encryption: awsmediapackagev2alpha.TsEncryption_Speke(&TsSpekeEncryptionProps{
Method: awsmediapackagev2alpha.TsEncryptionMethod_SAMPLE_AES,
ResourceId: jsii.String("my-content-id"),
Url: jsii.String("https://example.com/speke"),
Role: spekeRole,
}),
}),
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