Skip to content
v2.278.0

HlsEncryptionProperty Struct ​

Holds encryption information so that access to the content can be controlled by a DRM solution.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_mediapackage as mediapackage } from 'aws-cdk-lib';
const hlsEncryptionProperty: mediapackage.CfnOriginEndpoint.HlsEncryptionProperty = {
  spekeKeyProvider: {
    resourceId: 'resourceId',
    roleArn: 'roleArn',
    systemIds: ['systemIds'],
    url: 'url',

    // the properties below are optional
    certificateArn: 'certificateArn',
    encryptionContractConfiguration: {
      presetSpeke20Audio: 'presetSpeke20Audio',
      presetSpeke20Video: 'presetSpeke20Video',
    },
  },

  // the properties below are optional
  constantInitializationVector: 'constantInitializationVector',
  encryptionMethod: 'encryptionMethod',
  keyRotationIntervalSeconds: 123,
  repeatExtXKey: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_mediapackage as mediapackage

hls_encryption_property = mediapackage.CfnOriginEndpoint.HlsEncryptionProperty(
    speke_key_provider=mediapackage.CfnOriginEndpoint.SpekeKeyProviderProperty(
        resource_id="resourceId",
        role_arn="roleArn",
        system_ids=["systemIds"],
        url="url",

        # the properties below are optional
        certificate_arn="certificateArn",
        encryption_contract_configuration=mediapackage.CfnOriginEndpoint.EncryptionContractConfigurationProperty(
            preset_speke20_audio="presetSpeke20Audio",
            preset_speke20_video="presetSpeke20Video"
        )
    ),

    # the properties below are optional
    constant_initialization_vector="constantInitializationVector",
    encryption_method="encryptionMethod",
    key_rotation_interval_seconds=123,
    repeat_ext_x_key=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.mediapackage.*;

HlsEncryptionProperty hlsEncryptionProperty = HlsEncryptionProperty.builder()
        .spekeKeyProvider(SpekeKeyProviderProperty.builder()
                .resourceId("resourceId")
                .roleArn("roleArn")
                .systemIds(List.of("systemIds"))
                .url("url")

                // the properties below are optional
                .certificateArn("certificateArn")
                .encryptionContractConfiguration(EncryptionContractConfigurationProperty.builder()
                        .presetSpeke20Audio("presetSpeke20Audio")
                        .presetSpeke20Video("presetSpeke20Video")
                        .build())
                .build())

        // the properties below are optional
        .constantInitializationVector("constantInitializationVector")
        .encryptionMethod("encryptionMethod")
        .keyRotationIntervalSeconds(123)
        .repeatExtXKey(false)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaPackage;

var hlsEncryptionProperty = new HlsEncryptionProperty {
    SpekeKeyProvider = new SpekeKeyProviderProperty {
        ResourceId = "resourceId",
        RoleArn = "roleArn",
        SystemIds = new [] { "systemIds" },
        Url = "url",

        // the properties below are optional
        CertificateArn = "certificateArn",
        EncryptionContractConfiguration = new EncryptionContractConfigurationProperty {
            PresetSpeke20Audio = "presetSpeke20Audio",
            PresetSpeke20Video = "presetSpeke20Video"
        }
    },

    // the properties below are optional
    ConstantInitializationVector = "constantInitializationVector",
    EncryptionMethod = "encryptionMethod",
    KeyRotationIntervalSeconds = 123,
    RepeatExtXKey = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

hlsEncryptionProperty := &HlsEncryptionProperty{
	SpekeKeyProvider: &SpekeKeyProviderProperty{
		ResourceId: jsii.String("resourceId"),
		RoleArn: jsii.String("roleArn"),
		SystemIds: []*string{
			jsii.String("systemIds"),
		},
		Url: jsii.String("url"),

		// the properties below are optional
		CertificateArn: jsii.String("certificateArn"),
		EncryptionContractConfiguration: &EncryptionContractConfigurationProperty{
			PresetSpeke20Audio: jsii.String("presetSpeke20Audio"),
			PresetSpeke20Video: jsii.String("presetSpeke20Video"),
		},
	},

	// the properties below are optional
	ConstantInitializationVector: jsii.String("constantInitializationVector"),
	EncryptionMethod: jsii.String("encryptionMethod"),
	KeyRotationIntervalSeconds: jsii.Number(123),
	RepeatExtXKey: jsii.Boolean(false),
}

Properties ​

constantInitializationVectoroptionalstringconstant_initialization_vectoroptionalstrconstantInitializationVectoroptionalStringConstantInitializationVectoroptionalstringConstantInitializationVectoroptional*string #
A 128-bit, 16-byte hex value represented by a 32-character string, used with the key for encrypting blocks.
encryptionMethodoptionalstringencryption_methodoptionalstrencryptionMethodoptionalStringEncryptionMethodoptionalstringEncryptionMethodoptional*string #
HLS encryption type.
keyRotationIntervalSecondsoptionalnumberkey_rotation_interval_secondsoptionalint | floatkeyRotationIntervalSecondsoptionalNumberKeyRotationIntervalSecondsoptionaldoubleKeyRotationIntervalSecondsoptional*float64 #
Number of seconds before AWS Elemental MediaPackage rotates to a new key.

By default, rotation is set to 60 seconds. Set to 0 to disable key rotation.

repeatExtXKeyoptionalboolean | IResolvablerepeat_ext_x_keyoptionaltyping.Union[bool, IResolvable]repeatExtXKeyoptionalBooleanRepeatExtXKeyoptionalboolRepeatExtXKeyoptionalinterface{} #
Repeat the `EXT-X-KEY` directive for every media segment.

This might result in an increase in client requests to the DRM server.

spekeKeyProviderIResolvable | CfnOriginEndpoint.SpekeKeyProviderPropertyspeke_key_providertyping.Union[IResolvable, SpekeKeyProviderProperty]spekeKeyProviderIResolvableSpekeKeyProviderIResolvableSpekeKeyProviderinterface{} required #
Parameters for the SPEKE key provider.