> **Experimental**
>
> `@aws-cdk/aws-mediapackagev2-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# IsmSpekeEncryptionProps

Properties for ISM SPEKE encryption configuration.

ISM only supports CENC encryption with PlayReady DRM.
Key rotation and constant initialization vectors are not supported.
Audio and video presets default to SHARED.

Used as argument in: [IsmEncryption.speke](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.IsmEncryption.html#speke)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/endpoint.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-mediapackagev2-alpha/lib/endpoint.ts#L2110)

## Example

TypeScript:

```ts
declare const channel: Channel;
declare const spekeRole: iam.IRole;

new OriginEndpoint(this, 'IsmEndpoint', {
  channel,
  segment: Segment.ism({
    encryption: IsmEncryption.speke({
      resourceId: 'my-content-id',
      url: 'https://example.com/speke',
      role: spekeRole,
    }),
  }),
  manifests: [Manifest.mss({ manifestName: 'index' })],
});
```

Python:

```python
# channel: Channel
# speke_role: iam.IRole

OriginEndpoint(self, "IsmEndpoint",
    channel=channel,
    segment=Segment.ism(
        encryption=IsmEncryption.speke(
            resource_id="my-content-id",
            url="https://example.com/speke",
            role=speke_role
        )
    ),
    manifests=[Manifest.mss(manifest_name="index")]
)
```

Java:

```java
Channel channel;
IRole spekeRole;

OriginEndpoint.Builder.create(this, "IsmEndpoint")
        .channel(channel)
        .segment(Segment.ism(IsmSegmentProps.builder()
                .encryption(IsmEncryption.speke(IsmSpekeEncryptionProps.builder()
                        .resourceId("my-content-id")
                        .url("https://example.com/speke")
                        .role(spekeRole)
                        .build()))
                .build()))
        .manifests(List.of(Manifest.mss(MssManifestConfiguration.builder().manifestName("index").build())))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaPackageV2.Alpha
Channel channel;
IRole spekeRole;

new OriginEndpoint(this, "IsmEndpoint", new OriginEndpointProps {
    Channel = channel,
    Segment = Segment.Ism(new IsmSegmentProps {
        Encryption = IsmEncryption.Speke(new IsmSpekeEncryptionProps {
            ResourceId = "my-content-id",
            Url = "https://example.com/speke",
            Role = spekeRole
        })
    }),
    Manifests = new [] { Manifest.Mss(new MssManifestConfiguration { ManifestName = "index" }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsmediapackagev2alpha/v2
var channel Channel
var spekeRole IRole

awsmediapackagev2alpha.NewOriginEndpoint(this, jsii.String("IsmEndpoint"), &OriginEndpointProps{
	Channel: Channel,
	Segment: awsmediapackagev2alpha.Segment_Ism(&IsmSegmentProps{
		Encryption: awsmediapackagev2alpha.IsmEncryption_Speke(&IsmSpekeEncryptionProps{
			ResourceId: jsii.String("my-content-id"),
			Url: jsii.String("https://example.com/speke"),
			Role: spekeRole,
		}),
	}),
	Manifests: []Manifest{
		awsmediapackagev2alpha.Manifest_Mss(&MssManifestConfiguration{
			ManifestName: jsii.String("index"),
		}),
	},
})
```

## Properties

- `certificate`: [ICertificate](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_certificatemanager.ICertificate.html) — 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

- `drmSystems`: [IsmDrmSystem](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-mediapackagev2-alpha.IsmDrmSystem.html)[] = [IsmDrmSystem.PLAYREADY] — The DRM systems to use for content protection.

- `resourceId`: string (required) — The unique identifier for the content.

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) (required) — IAM role for accessing the key provider API.

- `url`: string (required) — URL of the SPEKE key provider.
