Class TableEncryptionV2
Represents server-side encryption for a DynamoDB table.
Inheritance
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class TableEncryptionV2 : DeputyBase
Syntax (vb)
Public MustInherit Class TableEncryptionV2
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK;
using Amazon.CDK.AWS.KMS;
var app = new App();
var stack = new Stack(app, "Stack", new StackProps { Env = new Environment { Region = "us-west-2" } });
var tableKey = new Key(stack, "Key");
IDictionary<string, string> replicaKeyArns = new Dictionary<string, string> {
{ "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" }
};
var globalTable = new TableV2(stack, "GlobalTable", new TablePropsV2 {
PartitionKey = new Attribute { Name = "pk", Type = AttributeType.STRING },
Encryption = TableEncryptionV2.CustomerManagedKey(tableKey, replicaKeyArns),
Replicas = new [] { new ReplicaTableProps { Region = "us-east-1" }, new ReplicaTableProps { Region = "us-east-2" } }
});
Synopsis
Constructors
TableEncryptionV2(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
TableEncryptionV2(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ReplicaKeyArns | |
TableKey | |
Type |
Methods
AwsManagedKey() | Configure server-side encryption using a DynamoDB owned key. |
CustomerManagedKey(IKey, IDictionary<String, String>) | Configure server-side encryption using customer managed keys. |
DynamoOwnedKey() | Configure server-side encryption using a DynamoDB owned key. |
Constructors
TableEncryptionV2(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected TableEncryptionV2(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
TableEncryptionV2(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected TableEncryptionV2(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ReplicaKeyArns
public virtual IDictionary<string, string> ReplicaKeyArns { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
TableKey
Type
Methods
AwsManagedKey()
Configure server-side encryption using a DynamoDB owned key.
public static TableEncryptionV2 AwsManagedKey()
Returns
CustomerManagedKey(IKey, IDictionary<String, String>)
Configure server-side encryption using customer managed keys.
public static TableEncryptionV2 CustomerManagedKey(IKey tableKey, IDictionary<string, string> replicaKeyArns = null)
Parameters
- tableKey IKey
the KMS key for the primary table.
- replicaKeyArns System.Collections.Generic.IDictionary<System.String, System.String>
an object containing the ARN of the KMS key to use for each replica table.
Returns
DynamoOwnedKey()
Configure server-side encryption using a DynamoDB owned key.
public static TableEncryptionV2 DynamoOwnedKey()
Returns