# CmafEncryptionProperty

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 cmafEncryptionProperty: mediapackage.CfnPackagingConfiguration.CmafEncryptionProperty = {
  spekeKeyProvider: {
    roleArn: 'roleArn',
    systemIds: ['systemIds'],
    url: 'url',

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

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

cmaf_encryption_property = mediapackage.CfnPackagingConfiguration.CmafEncryptionProperty(
    speke_key_provider=mediapackage.CfnPackagingConfiguration.SpekeKeyProviderProperty(
        role_arn="roleArn",
        system_ids=["systemIds"],
        url="url",

        # the properties below are optional
        encryption_contract_configuration=mediapackage.CfnPackagingConfiguration.EncryptionContractConfigurationProperty(
            preset_speke20_audio="presetSpeke20Audio",
            preset_speke20_video="presetSpeke20Video"
        )
    )
)
```

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

CmafEncryptionProperty cmafEncryptionProperty = CmafEncryptionProperty.builder()
        .spekeKeyProvider(SpekeKeyProviderProperty.builder()
                .roleArn("roleArn")
                .systemIds(List.of("systemIds"))
                .url("url")

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

C# / .NET:

```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 cmafEncryptionProperty = new CmafEncryptionProperty {
    SpekeKeyProvider = new SpekeKeyProviderProperty {
        RoleArn = "roleArn",
        SystemIds = new [] { "systemIds" },
        Url = "url",

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

Golang:

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

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

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

## Properties

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