Experimental
@aws-cdk/aws-mediapackagev2-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
TsEncryption Class
Encryption configuration for TS segments.
Use TsEncryption.speke() to create an instance.
| Stability | Experimental |
|---|---|
| Source | lib/endpoint.ts |
Example
ts
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' })],
});
python
# 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")]
)
java
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();
csharp
// 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" }) }
});
go
// 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"),
}),
},
})
Methods
speke(props: TsSpekeEncryptionProps): TsEncryption // chainable@staticmethod def speke(props: TsSpekeEncryptionProps) -> TsEncryptionpublic static TsEncryption speke(TsSpekeEncryptionProps props)public static TsEncryption Speke(TsSpekeEncryptionProps props)func Speke(Props TsSpekeEncryptionProps) TsEncryption static #Create a SPEKE-based encryption configuration for TS segments.