Skip to content

Commit 35210f6

Browse files
committed
docs: Detail AWS SDK v2 support
Corrects the README to state AWS SDK for Java 2.x support. Updates the JavaDocs for classes that use `KmsClient` interface to state the `KmsAsyncClient` is not supported.
1 parent 12a1dc9 commit 35210f6

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For more details about the design and architecture of the AWS Encryption SDK, se
88

99
[Security issue notifications](./CONTRIBUTING.md#security-issue-notifications)
1010

11-
See [Support Policy](./SUPPORT_POLICY.rst) for for details on the current support status of all major versions of this library.
11+
See [Support Policy](./SUPPORT_POLICY.rst) for details on the current support status of all major versions of this library.
1212

1313
## Getting Started
1414

@@ -37,12 +37,14 @@ To use the AWS Encryption SDK for Java you must have:
3737
### Optional Prerequisites
3838

3939
#### AWS Integration
40-
You don't need an Amazon Web Services (AWS) account to use the AWS Encryption SDK, but some of the [example code][examples] require an AWS account, an AWS KMS key, and the AWS SDK for Java 1.x. (The AWS Encryption SDK for Java does not support the AWS SDK for Java 2.x.)
40+
You don't need an Amazon Web Services (AWS) account to use the AWS Encryption SDK, but some [example code][examples] require an AWS account, an AWS KMS key, and the AWS SDK for Java (either 1.x or 2.x).
4141

4242
* **To create an AWS account**, go to [Sign In or Create an AWS Account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) and then choose **I am a new user.** Follow the instructions to create an AWS account.
4343

4444
* **To create a symmetric encryption KMS key in AWS KMS**, see [Creating Keys](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html).
4545

46+
* **To download and install the AWS SDK for Java 2.x**, see [Installing the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/getting-started.html).
47+
4648
* **To download and install the AWS SDK for Java 1.x**, see [Installing the AWS SDK for Java 1.x](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/getting-started.html).
4749

4850
#### Amazon Corretto Crypto Provider
@@ -133,7 +135,7 @@ public class StringExample {
133135
}
134136
```
135137

136-
You can find more examples in the [examples directory][examples].
138+
You can find more examples in the [example directory][examples].
137139

138140
## Public API
139141

src/main/java/com/amazonaws/encryptionsdk/kmssdkv2/AwsKmsMrkAwareMasterKeyProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ public Builder discoveryMrkRegion(Region discoveryMrkRegion) {
107107
* <p>Because the regional client supplier fully controls the client construction process, it is
108108
* not possible to configure the client through methods such as {@link
109109
* #builderSupplier(Supplier)}; if you try to use these in combination, an {@link
110-
* IllegalStateException} will be thrown.
110+
* IllegalStateException} will be thrown.</p>
111+
*
112+
* <p>Note: The AWS Encryption SDK for Java does not support the {@code KmsAsyncClient} interface.</p>
111113
*
112114
* @see KmsMasterKeyProvider.Builder#customRegionalClientSupplier(RegionalClientSupplier)
113115
*/
@@ -125,6 +127,8 @@ public Builder customRegionalClientSupplier(RegionalClientSupplier regionalClien
125127
* KmsClientBuilder} to configure KMS clients. Note that the region set on this builder will be
126128
* ignored, but all other settings will be propagated into the regional clients.
127129
*
130+
* <p>Note: The AWS Encryption SDK for Java does not support the {@code KmsAsyncClient} interface.</p>
131+
*
128132
* @see KmsMasterKeyProvider.Builder#builderSupplier(Supplier)
129133
*/
130134
public Builder builderSupplier(Supplier<KmsClientBuilder> supplier) {

src/main/java/com/amazonaws/encryptionsdk/kmssdkv2/KmsMasterKeyProvider.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ public Builder defaultRegion(Region defaultRegion) {
8787
* <p>Because the regional client supplier fully controls the client construction process, it is
8888
* not possible to configure the client through methods such as {@link
8989
* #builderSupplier(Supplier)}; if you try to use these in combination, an {@link
90-
* IllegalStateException} will be thrown.
90+
* IllegalStateException} will be thrown.</p>
91+
*
92+
* <p>Note: The AWS Encryption SDK for Java does not support the {@code KmsAsyncClient} interface.</p>
9193
*
9294
* @param regionalClientSupplier
9395
* @return
@@ -108,7 +110,9 @@ public Builder customRegionalClientSupplier(RegionalClientSupplier regionalClien
108110
*
109111
* <p>Trying to use this method in combination with {@link
110112
* #customRegionalClientSupplier(RegionalClientSupplier)} will cause an {@link
111-
* IllegalStateException} to be thrown.
113+
* IllegalStateException} to be thrown.</p>
114+
*
115+
* <p>Note: The AWS Encryption SDK for Java does not support the {@code KmsAsyncClient} interface.</p>
112116
*
113117
* @param supplier Should return a new {@link KmsClientBuilder} on each invocation.
114118
* @return

src/main/java/com/amazonaws/encryptionsdk/kmssdkv2/RegionalClientSupplier.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public interface RegionalClientSupplier {
99
* Supplies an {@link KmsClient} instance to use for a given {@link Region}. The {@link
1010
* KmsMasterKeyProvider} will not cache the result of this function.
1111
*
12+
* <p>Note: The AWS Encryption SDK for Java does not support the {@code KmsAsyncClient} interface.</p>
13+
*
1214
* @param region The region to get a client for
1315
* @return The client to use, or null if this region cannot or should not be used.
1416
*/

0 commit comments

Comments
 (0)