# DashEncryptionProperty

Struct · External

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

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```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 dashEncryptionProperty: mediapackage.CfnOriginEndpoint.DashEncryptionProperty = {
  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
  keyRotationIntervalSeconds: 123,
};
```

Python:

```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

dash_encryption_property = mediapackage.CfnOriginEndpoint.DashEncryptionProperty(
    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
    key_rotation_interval_seconds=123
)
```

Java:

```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.*;

DashEncryptionProperty dashEncryptionProperty = DashEncryptionProperty.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
        .keyRotationIntervalSeconds(123)
        .build();
```

C#:

```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 dashEncryptionProperty = new DashEncryptionProperty {
    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
    KeyRotationIntervalSeconds = 123
};
```

Go:

```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"

dashEncryptionProperty := &DashEncryptionProperty{
	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
	KeyRotationIntervalSeconds: jsii.Number(123),
}
```

## Properties

- `keyRotationIntervalSeconds`: number — 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.

- `spekeKeyProvider`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnOriginEndpoint.SpekeKeyProviderProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_mediapackage.CfnOriginEndpoint.SpekeKeyProviderProperty.html) (required) — Parameters for the SPEKE key provider.
