Class TableEncryptionV2

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.dynamodb.TableEncryptionV2
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:17.323Z") @Stability(Stable) public abstract class TableEncryptionV2 extends software.amazon.jsii.JsiiObject
Represents server-side encryption for a DynamoDB table.

Example:

 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.kms.*;
 App app = new App();
 Stack stack = Stack.Builder.create(app, "Stack").env(Environment.builder().region("us-west-2").build()).build();
 Key tableKey = new Key(stack, "Key");
 Map<String, String> replicaKeyArns = Map.of(
         "us-east-1", "arn:aws:kms:us-east-1:123456789012:key/g24efbna-az9b-42ro-m3bp-cq249l94fca6",
         "us-east-2", "arn:aws:kms:us-east-2:123456789012:key/h90bkasj-bs1j-92wp-s2ka-bh857d60bkj8");
 TableV2 globalTable = TableV2.Builder.create(stack, "GlobalTable")
         .partitionKey(Attribute.builder().name("pk").type(AttributeType.STRING).build())
         .encryption(TableEncryptionV2.customerManagedKey(tableKey, replicaKeyArns))
         .replicas(List.of(ReplicaTableProps.builder().region("us-east-1").build(), ReplicaTableProps.builder().region("us-east-2").build()))
         .build();
 
  • Constructor Details

    • TableEncryptionV2

      protected TableEncryptionV2(software.amazon.jsii.JsiiObjectRef objRef)
    • TableEncryptionV2

      protected TableEncryptionV2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • awsManagedKey

      @Stability(Stable) @NotNull public static TableEncryptionV2 awsManagedKey()
      Configure server-side encryption using a DynamoDB owned key.
    • customerManagedKey

      @Stability(Stable) @NotNull public static TableEncryptionV2 customerManagedKey(@NotNull IKey tableKey, @Nullable Map<String,String> replicaKeyArns)
      Configure server-side encryption using customer managed keys.

      Parameters:
      tableKey - the KMS key for the primary table. This parameter is required.
      replicaKeyArns - an object containing the ARN of the KMS key to use for each replica table.
    • customerManagedKey

      @Stability(Stable) @NotNull public static TableEncryptionV2 customerManagedKey(@NotNull IKey tableKey)
      Configure server-side encryption using customer managed keys.

      Parameters:
      tableKey - the KMS key for the primary table. This parameter is required.
    • dynamoOwnedKey

      @Stability(Stable) @NotNull public static TableEncryptionV2 dynamoOwnedKey()
      Configure server-side encryption using a DynamoDB owned key.
    • getType

      @Stability(Stable) @NotNull public TableEncryption getType()
    • getReplicaKeyArns

      @Stability(Stable) @Nullable public Map<String,String> getReplicaKeyArns()
    • getTableKey

      @Stability(Stable) @Nullable public IKey getTableKey()