Class: AWSCDK::DynamoDB::TableEncryptionV2

Inherits:
Jsii::Object
  • Object
show all
Defined in:
dynamo_db/table_encryption_v2.rb

Overview

Represents server-side encryption for a DynamoDB table.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ TableEncryptionV2

Returns a new instance of TableEncryptionV2.

Raises:

  • (NoMethodError)


8
9
10
# File 'dynamo_db/table_encryption_v2.rb', line 8

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_dynamodb.TableEncryptionV2 does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.aws_managed_keyAWSCDK::DynamoDB::TableEncryptionV2

Configure server-side encryption using an AWS managed key.

Returns:

  • (AWSCDK::DynamoDB::TableEncryptionV2)


23
24
25
# File 'dynamo_db/table_encryption_v2.rb', line 23

def self.aws_managed_key()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_dynamodb.TableEncryptionV2", "awsManagedKey", [])
end

.customer_managed_key(table_key, replica_key_arns = nil) ⇒ AWSCDK::DynamoDB::TableEncryptionV2

Configure server-side encryption using customer managed keys.

Parameters:

  • table_key (AWSCDK::KMS::IKey)

    the KMS key for the primary table.

  • replica_key_arns (Hash{String => String}, nil) (defaults to: nil)

    an object containing the ARN of the KMS key to use for each replica table.

Returns:

  • (AWSCDK::DynamoDB::TableEncryptionV2)


32
33
34
35
36
# File 'dynamo_db/table_encryption_v2.rb', line 32

def self.customer_managed_key(table_key, replica_key_arns = nil)
  Jsii::Type.check_type(table_key, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa21zLklLZXkifQ==")), "tableKey")
  Jsii::Type.check_type(replica_key_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "replicaKeyArns") unless replica_key_arns.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_dynamodb.TableEncryptionV2", "customerManagedKey", [table_key, replica_key_arns])
end

.dynamo_owned_keyAWSCDK::DynamoDB::TableEncryptionV2

Configure server-side encryption using a DynamoDB owned key.

Returns:

  • (AWSCDK::DynamoDB::TableEncryptionV2)


41
42
43
# File 'dynamo_db/table_encryption_v2.rb', line 41

def self.dynamo_owned_key()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_dynamodb.TableEncryptionV2", "dynamoOwnedKey", [])
end

.jsii_overridable_methodsObject



12
13
14
15
16
17
18
# File 'dynamo_db/table_encryption_v2.rb', line 12

def self.jsii_overridable_methods
  {
    :type => { kind: :property, name: "type", is_optional: false },
    :replica_key_arns => { kind: :property, name: "replicaKeyArns", is_optional: true },
    :table_key => { kind: :property, name: "tableKey", is_optional: true },
  }
end

Instance Method Details

#replica_key_arnsHash{String => String}?

Returns:

  • (Hash{String => String}, nil)


51
52
53
# File 'dynamo_db/table_encryption_v2.rb', line 51

def replica_key_arns()
  jsii_get_property("replicaKeyArns")
end

#table_keyAWSCDK::KMS::IKey?

Returns:



56
57
58
# File 'dynamo_db/table_encryption_v2.rb', line 56

def table_key()
  jsii_get_property("tableKey")
end

#typeAWSCDK::DynamoDB::TableEncryption



46
47
48
# File 'dynamo_db/table_encryption_v2.rb', line 46

def type()
  jsii_get_property("type")
end