Skip to content
v2.278.0

EncryptionAtRestOptionsProperty Struct ​

Whether the domain should encrypt data at rest, and if so, the AWS Key Management Service key to use.

The AWS::Elasticsearch::Domain resource is being replaced by the AWS::OpenSearchService::Domain resource. While the legacy Elasticsearch resource and options are still supported, we recommend modifying your existing Cloudformation templates to use the new OpenSearch Service resource, which supports both OpenSearch and Elasticsearch. For more information about the service rename, see New resource types in the Amazon OpenSearch Service Developer Guide .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticsearch as elasticsearch } from 'aws-cdk-lib';
const encryptionAtRestOptionsProperty: elasticsearch.CfnDomain.EncryptionAtRestOptionsProperty = {
  enabled: false,
  kmsKeyId: 'kmsKeyId',
};
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_elasticsearch as elasticsearch

encryption_at_rest_options_property = elasticsearch.CfnDomain.EncryptionAtRestOptionsProperty(
    enabled=False,
    kms_key_id="kmsKeyId"
)
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.elasticsearch.*;

EncryptionAtRestOptionsProperty encryptionAtRestOptionsProperty = EncryptionAtRestOptionsProperty.builder()
        .enabled(false)
        .kmsKeyId("kmsKeyId")
        .build();
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.Elasticsearch;

var encryptionAtRestOptionsProperty = new EncryptionAtRestOptionsProperty {
    Enabled = false,
    KmsKeyId = "kmsKeyId"
};
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"

encryptionAtRestOptionsProperty := &EncryptionAtRestOptionsProperty{
	Enabled: jsii.Boolean(false),
	KmsKeyId: jsii.String("kmsKeyId"),
}

Properties ​

enabledoptionalboolean | IResolvableenabledoptionaltyping.Union[bool, IResolvable]enabledoptionalBooleanEnabledoptionalboolEnabledoptionalinterface{} #
Specify `true` to enable encryption at rest.
kmsKeyIdoptionalstringkms_key_idoptionalstrkmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptional*string #
The KMS key ID.

Takes the form 1a2a3a4-1a2a-3a4a-5a6a-1a2a3a4a5a6a . Required if you enable encryption at rest.