Skip to content
v2.278.0

Experimental

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

CmafSpekeEncryptionProps Struct ​

Properties for CMAF SPEKE encryption configuration.

Example ​

ts
declare const channel: Channel;
declare const spekeRole: iam.IRole;
declare const certificate: certificatemanager.ICertificate;

new OriginEndpoint(this, 'Endpoint', {
  channel,
  segment: Segment.cmaf({
    encryption: CmafEncryption.speke({
      method: CmafEncryptionMethod.CBCS,
      drmSystems: [CmafDrmSystem.FAIRPLAY],
      resourceId: 'my-content-id',
      url: 'https://example.com/speke',
      role: spekeRole,
      certificate,
    }),
  }),
  manifests: [Manifest.hls({ manifestName: 'index' })],
});
python
# channel: Channel
# speke_role: iam.IRole
# certificate: certificatemanager.ICertificate


OriginEndpoint(self, "Endpoint",
    channel=channel,
    segment=Segment.cmaf(
        encryption=CmafEncryption.speke(
            method=CmafEncryptionMethod.CBCS,
            drm_systems=[CmafDrmSystem.FAIRPLAY],
            resource_id="my-content-id",
            url="https://example.com/speke",
            role=speke_role,
            certificate=certificate
        )
    ),
    manifests=[Manifest.hls(manifest_name="index")]
)
java
Channel channel;
IRole spekeRole;
ICertificate certificate;


OriginEndpoint.Builder.create(this, "Endpoint")
        .channel(channel)
        .segment(Segment.cmaf(CmafSegmentProps.builder()
                .encryption(CmafEncryption.speke(CmafSpekeEncryptionProps.builder()
                        .method(CmafEncryptionMethod.CBCS)
                        .drmSystems(List.of(CmafDrmSystem.FAIRPLAY))
                        .resourceId("my-content-id")
                        .url("https://example.com/speke")
                        .role(spekeRole)
                        .certificate(certificate)
                        .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;
ICertificate certificate;


new OriginEndpoint(this, "Endpoint", new OriginEndpointProps {
    Channel = channel,
    Segment = Segment.Cmaf(new CmafSegmentProps {
        Encryption = CmafEncryption.Speke(new CmafSpekeEncryptionProps {
            Method = CmafEncryptionMethod.CBCS,
            DrmSystems = new [] { CmafDrmSystem.FAIRPLAY },
            ResourceId = "my-content-id",
            Url = "https://example.com/speke",
            Role = spekeRole,
            Certificate = certificate
        })
    }),
    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
var certificate ICertificate


awsmediapackagev2alpha.NewOriginEndpoint(this, jsii.String("Endpoint"), &OriginEndpointProps{
	Channel: Channel,
	Segment: awsmediapackagev2alpha.Segment_Cmaf(&CmafSegmentProps{
		Encryption: awsmediapackagev2alpha.CmafEncryption_Speke(&CmafSpekeEncryptionProps{
			Method: awsmediapackagev2alpha.CmafEncryptionMethod_CBCS,
			DrmSystems: []CmafDrmSystem{
				awsmediapackagev2alpha.CmafDrmSystem_FAIRPLAY,
			},
			ResourceId: jsii.String("my-content-id"),
			Url: jsii.String("https://example.com/speke"),
			Role: spekeRole,
			Certificate: *Certificate,
		}),
	}),
	Manifests: []Manifest{
		awsmediapackagev2alpha.Manifest_Hls(&HlsManifestConfiguration{
			ManifestName: jsii.String("index"),
		}),
	},
})

Properties ​

audioPresetoptionalPresetSpeke20Audioaudio_presetoptionalPresetSpeke20AudioaudioPresetoptionalPresetSpeke20AudioAudioPresetoptionalPresetSpeke20AudioAudioPresetoptionalPresetSpeke20Audio #
Audio encryption preset.

Default: PresetSpeke20Audio.PRESET_AUDIO_1

certificateoptionalICertificatecertificateoptionalICertificatecertificateoptionalICertificateCertificateoptionalICertificateCertificateoptionalICertificate #
The ARN of the certificate that you imported to AWS Certificate Manager to add content key encryption to this endpoint.

Default: no content key encryption

For this feature to work, your DRM key provider must support content key encryption.

constantInitializationVectoroptionalstringconstant_initialization_vectoroptionalstrconstantInitializationVectoroptionalStringConstantInitializationVectoroptionalstringConstantInitializationVectoroptional*string #
Constant initialization vector (32-character hex string).

Default: MediaPackage generates the IV

A 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting content.

drmSystemsCmafDrmSystem[]drm_systemstyping.List[CmafDrmSystem]drmSystemsList<CmafDrmSystem>DrmSystemsCmafDrmSystem[]DrmSystems*[]CmafDrmSystem required #
The DRM systems to use for content protection.

CENC supports PlayReady, Widevine, and Irdeto. CBCS supports PlayReady, Widevine, and FairPlay.

excludeSegmentDrmMetadataoptionalbooleanexclude_segment_drm_metadataoptionalboolexcludeSegmentDrmMetadataoptionalBooleanExcludeSegmentDrmMetadataoptionalboolExcludeSegmentDrmMetadataoptional*bool = false #
When enabled, DRM metadata is excluded from CMAF segments.
keyRotationIntervaloptionalDurationkey_rotation_intervaloptionalDurationkeyRotationIntervaloptionalDurationKeyRotationIntervaloptionalDurationKeyRotationIntervaloptionalDuration #
Key rotation interval.

Default: no rotation

The encryption method to use.
resourceIdstringresource_idstrresourceIdStringResourceIdstringResourceId*string required #
The unique identifier for the content.
notes

The service sends this identifier to the key server to identify the current endpoint. How unique you make this identifier depends on how fine-grained you want access controls to be. The service does not permit you to use the same ID for two simultaneous encryption processes.

roleIRoleroleIRoleroleIRoleRoleIRoleRoleIRole required #
IAM role for accessing the key provider API.

This role must have a trust policy that allows MediaPackage to assume the role, and it must have sufficient permissions to access the key retrieval URL.

urlstringurlstrurlStringUrlstringUrl*string required #
URL of the SPEKE key provider.
videoPresetoptionalPresetSpeke20Videovideo_presetoptionalPresetSpeke20VideovideoPresetoptionalPresetSpeke20VideoVideoPresetoptionalPresetSpeke20VideoVideoPresetoptionalPresetSpeke20Video #
Video encryption preset.

Default: PresetSpeke20Video.PRESET_VIDEO_1