@@ -55,17 +55,14 @@ content: |
5555 :tabid: java-sync
5656
5757 .. code-block:: java
58- :emphasize-lines: 7-9, 11
5958
60- BsonString masterKeyRegion = new BsonString("<Master Key AWS Region>"); // e.g. "us-east-2"
6159 BsonString awsAccessKeyId = new BsonString("<IAM User Access Key ID>");
6260 BsonString awsSecretAccessKey = new BsonString("<IAM User Secret Access Key>");
6361 Map<String, Map<String, Object>> kmsProviders = new HashMap<String, Map<String, Object>>();
6462 Map<String, Object> providerDetails = new HashMap<String, Object>();
6563
6664 providerDetails.put("accessKeyId", awsAccessKeyId);
6765 providerDetails.put("secretAccessKey", awsSecretAccessKey);
68- providerDetails.put("region", masterKeyRegion);
6966
7067 kmsProviders.put("aws", providerDetails);
7168 .. tab::
@@ -104,8 +101,7 @@ content: |
104101 in the remote KMS. The original data encryption key was encrypted by
105102 your locally-managed master key.
106103
107- Specify the AWS region and `Amazon Resource Number
108- <https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn>`_
104+ Specify the `Amazon Resource Number <https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn>`_
109105 (ARN) of the new CMK in the CSFLE-enabled client settings. Use the client
110106 to create a new data encryption key as follows:
111107
@@ -118,7 +114,6 @@ content: |
118114 :tabid: java-sync
119115
120116 .. code-block:: Java
121- :emphasize-lines: 9-14, 16-17
122117
123118 ClientEncryption clientEncryption = ClientEncryptions.create(ClientEncryptionSettings.builder()
124119 .keyVaultMongoClientSettings(MongoClientSettings.builder()
@@ -128,11 +123,9 @@ content: |
128123 .kmsProviders(kmsProviders)
129124 .build());
130125
131- BsonString masterKeyRegion = new BsonString("<Master Key AWS Region>"); // e.g. "us-east-2"
132126 BsonString masterKeyArn = new BsonString("<Master Key ARN>"); // e.g. "arn:aws:kms:us-east-2:111122223333:alias/test-key"
133127 DataKeyOptions dataKeyOptions = new DataKeyOptions().masterKey(
134128 new BsonDocument()
135- .append("region", masterKeyRegion)
136129 .append("key", masterKeyArn));
137130
138131 BsonBinary dataKeyId = clientEncryption.createDataKey("aws", dataKeyOptions);
@@ -151,7 +144,6 @@ content: |
151144 const key = await encryption.createDataKey('aws', {
152145 masterKey: {
153146 key: '<Master Key ARN>', // e.g. 'arn:aws:kms:us-east-2:111122223333:alias/test-key'
154- region: '<Master Key AWS Region>', // e.g. 'us-east-1'
155147 }
156148 });
157149
0 commit comments