# EncryptionConfigProperty

Encryption settings for the collection.

- Source: Generated at build time
- Type last changed: v2.234.0 · 8 Jan 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_opensearchserverless as opensearchserverless } from 'aws-cdk-lib';
const encryptionConfigProperty: opensearchserverless.CfnCollection.EncryptionConfigProperty = {
  awsOwnedKey: false,
  kmsKeyArn: 'kmsKeyArn',
};
```

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_opensearchserverless as opensearchserverless

encryption_config_property = opensearchserverless.CfnCollection.EncryptionConfigProperty(
    aws_owned_key=False,
    kms_key_arn="kmsKeyArn"
)
```

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

EncryptionConfigProperty encryptionConfigProperty = EncryptionConfigProperty.builder()
        .awsOwnedKey(false)
        .kmsKeyArn("kmsKeyArn")
        .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.OpenSearchServerless;

var encryptionConfigProperty = new EncryptionConfigProperty {
    AwsOwnedKey = false,
    KmsKeyArn = "kmsKeyArn"
};
```

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"

encryptionConfigProperty := &EncryptionConfigProperty{
	AwsOwnedKey: jsii.Boolean(false),
	KmsKeyArn: jsii.String("kmsKeyArn"),
}
```

## Properties

- `awsOwnedKey`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether to use an AWS owned key for encryption.

- `kmsKeyArn`: string — Key Management Service key used to encrypt the collection.
