什么是 AWS SDK V2 相当于设置 SdkClient ExecutionTimeout

Whats The AWS SDKV2 equivalent of setSdkClientExecutionTimeout

我有一个客户端在此处设置了保证执行超时(可以根据请求进行配置)

https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/AmazonWebServiceRequest.html#setSdkClientExecutionTimeout-int-

但我找不到 SDKV2、同步或异步的等效项。

我想知道 SO 或 AWS 中是否有人知道这件事。这是故意的功能下降吗?还是我遗漏了一些其他设置。

找到解决方案:https://github.com/aws/aws-sdk-java-v2/pull/657#pullrequestreview-799397170. This is for async clients and at client level. if you want to do request level (for async clients), use the orComplete functionality of completable future instead. https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/CompletableFuture.html#orTimeout-long-java.util.concurrent.TimeUnit-