Class: AWSCDK::OpenSearchService::EncryptionAtRestOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
open_search_service/encryption_at_rest_options.rb

Overview

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

Can only be used to create a new domain, not update an existing one. Requires Elasticsearch version 5.1 or later or OpenSearch version 1.0 or later.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled: nil, kms_key: nil) ⇒ EncryptionAtRestOptions

Returns a new instance of EncryptionAtRestOptions.

Parameters:

  • enabled (Boolean, nil) (defaults to: nil)

    Specify true to enable encryption at rest.

  • kms_key (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    Supply if using KMS key for encryption at rest.



12
13
14
15
16
17
# File 'open_search_service/encryption_at_rest_options.rb', line 12

def initialize(enabled: nil, kms_key: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
  @kms_key = kms_key
  Jsii::Type.check_type(@kms_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "kmsKey") unless @kms_key.nil?
end

Instance Attribute Details

#enabledBoolean? (readonly)

Note:

Default: - encryption at rest is disabled.

Specify true to enable encryption at rest.

Returns:

  • (Boolean, nil)


23
24
25
# File 'open_search_service/encryption_at_rest_options.rb', line 23

def enabled
  @enabled
end

#kms_keyAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - uses default aws/es KMS key.

Supply if using KMS key for encryption at rest.



28
29
30
# File 'open_search_service/encryption_at_rest_options.rb', line 28

def kms_key
  @kms_key
end

Class Method Details

.jsii_propertiesObject



30
31
32
33
34
35
# File 'open_search_service/encryption_at_rest_options.rb', line 30

def self.jsii_properties
  {
    :enabled => "enabled",
    :kms_key => "kmsKey",
  }
end

Instance Method Details

#to_jsiiObject



37
38
39
40
41
42
43
44
# File 'open_search_service/encryption_at_rest_options.rb', line 37

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "kmsKey" => @kms_key,
  })
  result.compact
end