Skip to content

Commit 373bc93

Browse files
auto commit
1 parent 315c509 commit 373bc93

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Examples/runtimes/net/src/migration/PlaintextToAWSDBE/awsdbe/Common.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public static Dictionary<string, DynamoDbTableEncryptionConfig> CreateTableConfi
2323
// - ENCRYPT_AND_SIGN: The attribute is encrypted and included in the signature
2424
// - SIGN_ONLY: The attribute not encrypted, but is still included in the signature
2525
// - DO_NOTHING: The attribute is not encrypted and not included in the signature
26-
var partitionKeyName = "partition_key";
27-
var sortKeyName = "sort_key";
26+
string partitionKeyName = "partition_key";
27+
string sortKeyName = "sort_key";
2828
var attributeActionsOnEncrypt = new Dictionary<string, CryptoAction>
2929
{
3030
[partitionKeyName] = CryptoAction.SIGN_ONLY,

Examples/runtimes/net/src/migration/PlaintextToAWSDBE/awsdbe/MigrationStep1.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ public static async Task<bool> MigrationStep1Example(string kmsKeyId, string ddb
4545

4646
// 2. Put an item into our table using the above client.
4747
// This item will be stored in plaintext due to our PlaintextOverride configuration.
48+
string partitionKeyName = "partition_key";
49+
string sortKeyName = "sort_key";
4850
string encryptedAndSignedValue = MigrationUtils.ENCRYPTED_AND_SIGNED_VALUE;
4951
string signOnlyValue = MigrationUtils.SIGN_ONLY_VALUE;
5052
string doNothingValue = MigrationUtils.DO_NOTHING_VALUE;
5153
var item = new Dictionary<string, AttributeValue>
5254
{
53-
["partition_key"] = new AttributeValue { S = partitionKeyValue },
54-
["sort_key"] = new AttributeValue { N = sortKeyWriteValue },
55+
[partitionKeyName] = new AttributeValue { S = partitionKeyValue },
56+
[sortKeyName] = new AttributeValue { N = sortKeyWriteValue },
5557
["attribute1"] = new AttributeValue { S = encryptedAndSignedValue },
5658
["attribute2"] = new AttributeValue { S = signOnlyValue },
5759
["attribute3"] = new AttributeValue { S = doNothingValue }
@@ -74,8 +76,8 @@ public static async Task<bool> MigrationStep1Example(string kmsKeyId, string ddb
7476
// and surfaced as a plaintext item.
7577
var key = new Dictionary<string, AttributeValue>
7678
{
77-
["partition_key"] = new AttributeValue { S = partitionKeyValue },
78-
["sort_key"] = new AttributeValue { N = sortKeyReadValue }
79+
[partitionKeyName] = new AttributeValue { S = partitionKeyValue },
80+
[sortKeyName] = new AttributeValue { N = sortKeyReadValue }
7981
};
8082

8183
var getRequest = new GetItemRequest

0 commit comments

Comments
 (0)