Skip to content

Commit 9661139

Browse files
Merge pull request #1919 from aws/staging/56e1a48d-153f-4137-babf-942d689900b9
Pull request: release <- staging/56e1a48d-153f-4137-babf-942d689900b9
2 parents dbabbfe + 222c308 commit 9661139

File tree

413 files changed

+3415
-758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+3415
-758
lines changed

.changes/2.17.122.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"version": "2.17.122",
3+
"date": "2022-02-02",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS IoT",
8+
"contributor": "",
9+
"description": "This release adds support for configuring AWS IoT logging level per client ID, source IP, or principal ID."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS Cost Explorer Service",
14+
"contributor": "",
15+
"description": "Doc-only update for Cost Explorer API that adds INVOICING_ENTITY dimensions"
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS Glue",
20+
"contributor": "",
21+
"description": "Launch Protobuf support for AWS Glue Schema Registry"
22+
},
23+
{
24+
"type": "feature",
25+
"category": "Amazon Elasticsearch Service",
26+
"contributor": "",
27+
"description": "Allows customers to get progress updates for blue/green deployments"
28+
},
29+
{
30+
"type": "documentation",
31+
"category": "AWS SDK for Java v2",
32+
"contributor": "",
33+
"description": "Improve documentation & add warnings for FUTURE_COMPLETION_EXECUTOR"
34+
},
35+
{
36+
"type": "feature",
37+
"category": "AWS Fault Injection Simulator",
38+
"contributor": "",
39+
"description": "Added GetTargetResourceType and ListTargetResourceTypesAPI actions. These actions return additional details about resource types and parameters that can be targeted by FIS actions. Added a parameters field for the targets that can be specified in experiment templates."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "Amazon EMR",
44+
"contributor": "",
45+
"description": "Documentation updates for Amazon EMR."
46+
},
47+
{
48+
"type": "feature",
49+
"category": "Amazon ElastiCache",
50+
"contributor": "",
51+
"description": "Documentation update for AWS ElastiCache"
52+
},
53+
{
54+
"type": "feature",
55+
"category": "Amazon DynamoDB",
56+
"contributor": "",
57+
"description": "Documentation update for DynamoDB Java SDK."
58+
},
59+
{
60+
"type": "feature",
61+
"category": "AWS SDK for Java v2",
62+
"contributor": "",
63+
"description": "Only include non-null Extended Request IDs in exception messages"
64+
},
65+
{
66+
"type": "feature",
67+
"category": "AWS SDK for Java v2",
68+
"contributor": "",
69+
"description": "Add new AsyncResponseTransformer: toPublisher(). This transformer makes it more convenient for users to directly consume a streaming-response payload (i.e., S3 GetObject) with async clients. This also allows users of Reactor/RxJava to more easily consume a streaming response (e.g., via Flux#from(Publisher))."
70+
},
71+
{
72+
"type": "feature",
73+
"category": "Amazon Appflow",
74+
"contributor": "",
75+
"description": "Launching Amazon AppFlow Custom Connector SDK."
76+
},
77+
{
78+
"type": "feature",
79+
"category": "Amazon Personalize",
80+
"contributor": "",
81+
"description": "Adding minRecommendationRequestsPerSecond attribute to recommender APIs."
82+
},
83+
{
84+
"type": "feature",
85+
"category": "Amazon Comprehend",
86+
"contributor": "",
87+
"description": "Amazon Comprehend now supports sharing and importing custom trained models from one AWS account to another within the same region."
88+
}
89+
]
90+
}

CHANGELOG.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
# __2.17.122__ __2022-02-02__
2+
## __AWS Cost Explorer Service__
3+
- ### Features
4+
- Doc-only update for Cost Explorer API that adds INVOICING_ENTITY dimensions
5+
6+
## __AWS Fault Injection Simulator__
7+
- ### Features
8+
- Added GetTargetResourceType and ListTargetResourceTypesAPI actions. These actions return additional details about resource types and parameters that can be targeted by FIS actions. Added a parameters field for the targets that can be specified in experiment templates.
9+
10+
## __AWS Glue__
11+
- ### Features
12+
- Launch Protobuf support for AWS Glue Schema Registry
13+
14+
## __AWS IoT__
15+
- ### Features
16+
- This release adds support for configuring AWS IoT logging level per client ID, source IP, or principal ID.
17+
18+
## __AWS SDK for Java v2__
19+
- ### Features
20+
- Add new AsyncResponseTransformer: toPublisher(). This transformer makes it more convenient for users to directly consume a streaming-response payload (i.e., S3 GetObject) with async clients. This also allows users of Reactor/RxJava to more easily consume a streaming response (e.g., via Flux#from(Publisher)).
21+
- Only include non-null Extended Request IDs in exception messages
22+
23+
- ### Documentations
24+
- Improve documentation & add warnings for FUTURE_COMPLETION_EXECUTOR
25+
26+
## __Amazon Appflow__
27+
- ### Features
28+
- Launching Amazon AppFlow Custom Connector SDK.
29+
30+
## __Amazon Comprehend__
31+
- ### Features
32+
- Amazon Comprehend now supports sharing and importing custom trained models from one AWS account to another within the same region.
33+
34+
## __Amazon DynamoDB__
35+
- ### Features
36+
- Documentation update for DynamoDB Java SDK.
37+
38+
## __Amazon EMR__
39+
- ### Features
40+
- Documentation updates for Amazon EMR.
41+
42+
## __Amazon ElastiCache__
43+
- ### Features
44+
- Documentation update for AWS ElastiCache
45+
46+
## __Amazon Elasticsearch Service__
47+
- ### Features
48+
- Allows customers to get progress updates for blue/green deployments
49+
50+
## __Amazon Personalize__
51+
- ### Features
52+
- Adding minRecommendationRequestsPerSecond attribute to recommender APIs.
53+
154
# __2.17.121__ __2022-01-28__
255
## __AWS AppConfig Data__
356
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
5252
<dependency>
5353
<groupId>software.amazon.awssdk</groupId>
5454
<artifactId>bom</artifactId>
55-
<version>2.17.121</version>
55+
<version>2.17.122</version>
5656
<type>pom</type>
5757
<scope>import</scope>
5858
</dependency>
@@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
8686
<dependency>
8787
<groupId>software.amazon.awssdk</groupId>
8888
<artifactId>ec2</artifactId>
89-
<version>2.17.121</version>
89+
<version>2.17.122</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.121</version>
94+
<version>2.17.122</version>
9595
</dependency>
9696
```
9797

@@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
103103
<dependency>
104104
<groupId>software.amazon.awssdk</groupId>
105105
<artifactId>aws-sdk-java</artifactId>
106-
<version>2.17.121</version>
106+
<version>2.17.122</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.121</version>
23+
<version>2.17.122</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.121</version>
23+
<version>2.17.122</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.121</version>
23+
<version>2.17.122</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.121</version>
23+
<version>2.17.122</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.17.121</version>
20+
<version>2.17.122</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.17.121</version>
23+
<version>2.17.122</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.17.121</version>
20+
<version>2.17.122</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.17.121</version>
24+
<version>2.17.122</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.17.121</version>
25+
<version>2.17.122</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.17.121</version>
24+
<version>2.17.122</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.17.121</version>
25+
<version>2.17.122</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.17.121</version>
24+
<version>2.17.122</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/AsyncClientClass.java

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import java.nio.ByteBuffer;
3737
import java.util.Collections;
3838
import java.util.List;
39+
import java.util.concurrent.CompletableFuture;
3940
import java.util.concurrent.Executor;
4041
import java.util.concurrent.ScheduledExecutorService;
4142
import java.util.stream.Collectors;
@@ -64,6 +65,8 @@
6465
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamUtils;
6566
import software.amazon.awssdk.codegen.poet.model.EventStreamSpecHelper;
6667
import software.amazon.awssdk.core.RequestOverrideConfiguration;
68+
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
69+
import software.amazon.awssdk.core.async.AsyncResponseTransformerUtils;
6770
import software.amazon.awssdk.core.async.SdkPublisher;
6871
import software.amazon.awssdk.core.client.config.SdkAdvancedAsyncClientOption;
6972
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
@@ -78,6 +81,7 @@
7881
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
7982
import software.amazon.awssdk.utils.CompletableFutureUtils;
8083
import software.amazon.awssdk.utils.FunctionalUtils;
84+
import software.amazon.awssdk.utils.Pair;
8185

8286
public final class AsyncClientClass extends AsyncClientInterface {
8387
private final IntermediateModel model;
@@ -244,7 +248,31 @@ protected MethodSpec.Builder operationBody(MethodSpec.Builder builder, Operation
244248
CoreMetric.class, "SERVICE_ID", model.getMetadata().getServiceId());
245249
builder.addStatement("apiCallMetricCollector.reportMetric($T.$L, $S)",
246250
CoreMetric.class, "OPERATION_NAME", opModel.getOperationName());
247-
251+
252+
if (opModel.hasStreamingOutput()) {
253+
ClassName responseType = poetExtensions.getModelClass(opModel.getReturnType().getReturnType());
254+
255+
builder.addStatement("$T<$T<$T, ReturnT>, $T<$T>> $N = $T.wrapWithEndOfStreamFuture($N)",
256+
Pair.class,
257+
AsyncResponseTransformer.class,
258+
responseType,
259+
CompletableFuture.class,
260+
Void.class,
261+
"pair",
262+
AsyncResponseTransformerUtils.class,
263+
"asyncResponseTransformer");
264+
265+
builder.addStatement("$N = $N.left()",
266+
"asyncResponseTransformer",
267+
"pair");
268+
269+
builder.addStatement("$T<$T> $N = $N.right()",
270+
CompletableFuture.class,
271+
Void.class,
272+
"endOfStreamFuture",
273+
"pair");
274+
}
275+
248276
if (shouldUseAsyncWithBodySigner(opModel)) {
249277
builder.addCode(applyAsyncWithBodyV4SignerOverride(opModel));
250278
} else {
@@ -312,8 +340,14 @@ protected MethodSpec.Builder operationBody(MethodSpec.Builder builder, Operation
312340
.beginControlFlow("catch ($T t)", Throwable.class);
313341

314342
// For streaming operations we also want to notify the response handler of any exception.
343+
if (opModel.hasStreamingOutput()) {
344+
ClassName responseType = poetExtensions.getModelClass(opModel.getReturnType().getReturnType());
345+
builder.addStatement("$T<$T, ReturnT> finalAsyncResponseTransformer = asyncResponseTransformer",
346+
AsyncResponseTransformer.class,
347+
responseType);
348+
}
315349
if (opModel.hasStreamingOutput() || opModel.hasEventStreamOutput()) {
316-
String paramName = opModel.hasStreamingOutput() ? "asyncResponseTransformer" : "asyncResponseHandler";
350+
String paramName = opModel.hasStreamingOutput() ? "finalAsyncResponseTransformer" : "asyncResponseHandler";
317351
builder.addStatement("runAndLogError(log, \"Exception thrown in exceptionOccurred callback, ignoring\",\n" +
318352
"() -> $N.exceptionOccurred(t))", paramName);
319353
}

codegen/src/main/java/software/amazon/awssdk/codegen/poet/client/specs/JsonProtocolSpec.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import software.amazon.awssdk.core.SdkPojoBuilder;
4646
import software.amazon.awssdk.core.SdkResponse;
4747
import software.amazon.awssdk.core.async.AsyncRequestBody;
48+
import software.amazon.awssdk.core.async.AsyncResponseTransformer;
4849
import software.amazon.awssdk.core.client.handler.AttachHttpMetadataResponseHandler;
4950
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
5051
import software.amazon.awssdk.core.http.HttpResponseHandler;
@@ -223,7 +224,6 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
223224

224225
boolean isStreaming = opModel.hasStreamingOutput() || opModel.hasEventStreamOutput();
225226
String protocolFactory = protocolFactoryLiteral(intermediateModel, opModel);
226-
String customerResponseHandler = opModel.hasEventStreamOutput() ? "asyncResponseHandler" : "asyncResponseTransformer";
227227
TypeName responseType = opModel.hasEventStreamOutput() && !isRestJson ? ClassName.get(SdkResponse.class)
228228
: pojoResponseType;
229229
TypeName executeFutureValueType = executeFutureValueType(opModel, poetExtensions);
@@ -245,7 +245,13 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
245245
.add(".withInput($L)$L);",
246246
opModel.getInput().getVariableName(), asyncResponseTransformerVariable(isStreaming, isRestJson, opModel));
247247

248-
248+
if (opModel.hasStreamingOutput()) {
249+
builder.addStatement("$T<$T, ReturnT> finalAsyncResponseTransformer = asyncResponseTransformer",
250+
AsyncResponseTransformer.class,
251+
pojoResponseType);
252+
}
253+
String customerResponseHandler = opModel.hasEventStreamOutput() ?
254+
"asyncResponseHandler" : "finalAsyncResponseTransformer";
249255
String whenComplete = whenCompleteBody(opModel, customerResponseHandler);
250256
if (!whenComplete.isEmpty()) {
251257
String whenCompletedFutureName = "whenCompleted";

0 commit comments

Comments
 (0)