# EncryptionOptionsProperty

Encryption options for the broker.

- 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_amazonmq as amazonmq } from 'aws-cdk-lib';
const encryptionOptionsProperty: amazonmq.CfnBroker.EncryptionOptionsProperty = {
  useAwsOwnedKey: false,

  // the properties below are optional
  kmsKeyId: 'kmsKeyId',
};
```

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_amazonmq as amazonmq

encryption_options_property = amazonmq.CfnBroker.EncryptionOptionsProperty(
    use_aws_owned_key=False,

    # the properties below are optional
    kms_key_id="kmsKeyId"
)
```

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

EncryptionOptionsProperty encryptionOptionsProperty = EncryptionOptionsProperty.builder()
        .useAwsOwnedKey(false)

        // the properties below are optional
        .kmsKeyId("kmsKeyId")
        .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.AmazonMQ;

var encryptionOptionsProperty = new EncryptionOptionsProperty {
    UseAwsOwnedKey = false,

    // the properties below are optional
    KmsKeyId = "kmsKeyId"
};
```

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"

encryptionOptionsProperty := &EncryptionOptionsProperty{
	UseAwsOwnedKey: jsii.Boolean(false),

	// the properties below are optional
	KmsKeyId: jsii.String("kmsKeyId"),
}
```

## Properties

- `kmsKeyId`: string — The customer master key (CMK) to use for the A AWS (KMS).

  This key is used to encrypt your data at rest. If not provided, Amazon MQ will use a default CMK to encrypt your data.

- `useAwsOwnedKey`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — Enables the use of an AWS owned CMK using AWS (KMS).

  Set to `true` by default, if no value is provided, for example, for RabbitMQ brokers.
