# EncryptionProperty

Encryption information.

- 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_mediaconnect as mediaconnect } from 'aws-cdk-lib';
const encryptionProperty: mediaconnect.CfnFlowSource.EncryptionProperty = {
  roleArn: 'roleArn',

  // the properties below are optional
  algorithm: 'algorithm',
  constantInitializationVector: 'constantInitializationVector',
  deviceId: 'deviceId',
  keyType: 'keyType',
  region: 'region',
  resourceId: 'resourceId',
  secretArn: 'secretArn',
  url: 'url',
};
```

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_mediaconnect as mediaconnect

encryption_property = mediaconnect.CfnFlowSource.EncryptionProperty(
    role_arn="roleArn",

    # the properties below are optional
    algorithm="algorithm",
    constant_initialization_vector="constantInitializationVector",
    device_id="deviceId",
    key_type="keyType",
    region="region",
    resource_id="resourceId",
    secret_arn="secretArn",
    url="url"
)
```

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

EncryptionProperty encryptionProperty = EncryptionProperty.builder()
        .roleArn("roleArn")

        // the properties below are optional
        .algorithm("algorithm")
        .constantInitializationVector("constantInitializationVector")
        .deviceId("deviceId")
        .keyType("keyType")
        .region("region")
        .resourceId("resourceId")
        .secretArn("secretArn")
        .url("url")
        .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.MediaConnect;

var encryptionProperty = new EncryptionProperty {
    RoleArn = "roleArn",

    // the properties below are optional
    Algorithm = "algorithm",
    ConstantInitializationVector = "constantInitializationVector",
    DeviceId = "deviceId",
    KeyType = "keyType",
    Region = "region",
    ResourceId = "resourceId",
    SecretArn = "secretArn",
    Url = "url"
};
```

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"

encryptionProperty := &EncryptionProperty{
	RoleArn: jsii.String("roleArn"),

	// the properties below are optional
	Algorithm: jsii.String("algorithm"),
	ConstantInitializationVector: jsii.String("constantInitializationVector"),
	DeviceId: jsii.String("deviceId"),
	KeyType: jsii.String("keyType"),
	Region: jsii.String("region"),
	ResourceId: jsii.String("resourceId"),
	SecretArn: jsii.String("secretArn"),
	Url: jsii.String("url"),
}
```

## Properties

- `algorithm`: string — The type of algorithm that is used for static key encryption (such as aes128, aes192, or aes256).

  If you are using SPEKE or SRT-password encryption, this property must be left blank.

- `constantInitializationVector`: string — A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content.

  This parameter is not valid for static key encryption.

- `deviceId`: string — The value of one of the devices that you configured with your digital rights management (DRM) platform key provider.

  This parameter is required for SPEKE encryption and is not valid for static key encryption.

- `keyType`: string = "static-key" — The type of key that is used for the encryption.

  If you don't specify a `keyType` value, the service uses the default setting ( `static-key` ). Valid key types are: `static-key` , `speke` , and `srt-password` .

- `region`: string — The AWS Region that the API Gateway proxy endpoint was created in.

  This parameter is required for SPEKE encryption and is not valid for static key encryption.

- `resourceId`: string — An identifier for the content.

  The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.

- `roleArn`: string (required) — The ARN of the role that you created during setup (when you set up MediaConnect as a trusted entity).

- `secretArn`: string — The ARN of the secret that you created in AWS Secrets Manager to store the encryption key.

  This parameter is required for static key encryption and is not valid for SPEKE encryption.

- `url`: string — The URL from the API Gateway proxy that you set up to talk to your key server.

  This parameter is required for SPEKE encryption and is not valid for static key encryption.
