Skip to content

Commit d663e4a

Browse files
Merge pull request #1586 from aws/staging/8d00501b-0523-4e5f-b2b4-9c9cfd44c44d
Pull request: release <- staging/8d00501b-0523-4e5f-b2b4-9c9cfd44c44d
2 parents e3fb1f4 + cbad007 commit d663e4a

File tree

379 files changed

+2809
-1676
lines changed

Some content is hidden

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

379 files changed

+2809
-1676
lines changed

.changes/2.17.12.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "2.17.12",
3+
"date": "2021-08-04",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "EC2 Image Builder",
8+
"contributor": "",
9+
"description": "Updated list actions to include a list of valid filters that can be used in the request."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS SDK for Java v2",
14+
"contributor": "",
15+
"description": "Updated service endpoint metadata."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "Amazon Transcribe Service",
20+
"contributor": "",
21+
"description": "This release adds support for call analytics (batch) within Amazon Transcribe."
22+
},
23+
{
24+
"type": "feature",
25+
"category": "AWS SDK for Java v2",
26+
"contributor": "",
27+
"description": "Add customization.config support for setting default RetryMode"
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon EventBridge",
32+
"contributor": "",
33+
"description": "Documentation updates to add EC2 Image Builder as a target on PutTargets."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "AWS Systems Manager Incident Manager",
38+
"contributor": "",
39+
"description": "Documentation updates for Incident Manager."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "Amazon Relational Database Service",
44+
"contributor": "",
45+
"description": "This release adds AutomaticRestartTime to the DescribeDBInstances and DescribeDBClusters operations. AutomaticRestartTime indicates the time when a stopped DB instance or DB cluster is restarted automatically."
46+
},
47+
{
48+
"type": "bugfix",
49+
"category": "AWS SDK for Java v2",
50+
"contributor": "",
51+
"description": "Fixed an issue where a bean-based marshallers for request and response models would fail for fluent setters that happened to start with \"set\", like \"settings\"."
52+
}
53+
]
54+
}

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# __2.17.12__ __2021-08-04__
2+
## __AWS SDK for Java v2__
3+
- ### Features
4+
- Add customization.config support for setting default RetryMode
5+
- Updated service endpoint metadata.
6+
7+
- ### Bugfixes
8+
- Fixed an issue where a bean-based marshallers for request and response models would fail for fluent setters that happened to start with "set", like "settings".
9+
10+
## __AWS Systems Manager Incident Manager__
11+
- ### Features
12+
- Documentation updates for Incident Manager.
13+
14+
## __Amazon EventBridge__
15+
- ### Features
16+
- Documentation updates to add EC2 Image Builder as a target on PutTargets.
17+
18+
## __Amazon Relational Database Service__
19+
- ### Features
20+
- This release adds AutomaticRestartTime to the DescribeDBInstances and DescribeDBClusters operations. AutomaticRestartTime indicates the time when a stopped DB instance or DB cluster is restarted automatically.
21+
22+
## __Amazon Transcribe Service__
23+
- ### Features
24+
- This release adds support for call analytics (batch) within Amazon Transcribe.
25+
26+
## __EC2 Image Builder__
27+
- ### Features
28+
- Updated list actions to include a list of valid filters that can be used in the request.
29+
130
# __2.17.11__ __2021-08-03__
231
## __AWS Elemental MediaConvert__
332
- ### Features

README.md

+4-4
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.11</version>
55+
<version>2.17.12</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.11</version>
89+
<version>2.17.12</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.11</version>
94+
<version>2.17.12</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.11</version>
106+
<version>2.17.12</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/pom.xml

+1-1
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.11</version>
23+
<version>2.17.12</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

+1-1
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.11</version>
23+
<version>2.17.12</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

+1-1
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.11</version>
23+
<version>2.17.12</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

+1-1
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.11</version>
23+
<version>2.17.12</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

+1-1
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.11</version>
20+
<version>2.17.12</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

+1-1
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.11</version>
23+
<version>2.17.12</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

+1-1
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.11</version>
20+
<version>2.17.12</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

bundle/pom.xml

+1-1
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.11</version>
24+
<version>2.17.12</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

+1-1
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.11</version>
25+
<version>2.17.12</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

+1-1
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.11</version>
24+
<version>2.17.12</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

+1-1
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.11</version>
25+
<version>2.17.12</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

+1-1
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.11</version>
24+
<version>2.17.12</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/model/config/customization/CustomizationConfig.java

+16
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@
1919
import java.util.HashMap;
2020
import java.util.List;
2121
import java.util.Map;
22+
import software.amazon.awssdk.core.retry.RetryMode;
2223
import software.amazon.awssdk.core.traits.PayloadTrait;
2324
import software.amazon.awssdk.utils.AttributeMap;
2425

26+
/**
27+
* {@code service-2.json} models can be manually modified via defining properties in an associated {@code customization.config}
28+
* file. This class defines the Java bean representation that will be used to parse the JSON customization file. The bean can
29+
* then be later queried in the misc. codegen steps.
30+
*/
2531
public class CustomizationConfig {
2632

2733
/**
@@ -188,6 +194,8 @@ public class CustomizationConfig {
188194
private UnderscoresInNameBehavior underscoresInNameBehavior;
189195

190196
private String userAgent;
197+
198+
private RetryMode defaultRetryMode;
191199

192200
private CustomizationConfig() {
193201
}
@@ -485,4 +493,12 @@ public CustomizationConfig withUserAgent(String userAgent) {
485493
this.userAgent = userAgent;
486494
return this;
487495
}
496+
497+
public RetryMode getDefaultRetryMode() {
498+
return defaultRetryMode;
499+
}
500+
501+
public void setDefaultRetryMode(RetryMode defaultRetryMode) {
502+
this.defaultRetryMode = defaultRetryMode;
503+
}
488504
}

codegen/src/main/java/software/amazon/awssdk/codegen/poet/builder/BaseClientBuilderClass.java

+21-9
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.squareup.javapoet.TypeVariableName;
3030
import java.util.Collections;
3131
import java.util.List;
32+
import java.util.Optional;
3233
import javax.lang.model.element.Modifier;
3334
import software.amazon.awssdk.annotations.SdkInternalApi;
3435
import software.amazon.awssdk.auth.signer.Aws4Signer;
@@ -45,6 +46,7 @@
4546
import software.amazon.awssdk.core.endpointdiscovery.providers.DefaultEndpointDiscoveryProviderChain;
4647
import software.amazon.awssdk.core.interceptor.ClasspathInterceptorChainFactory;
4748
import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
49+
import software.amazon.awssdk.core.retry.RetryMode;
4850
import software.amazon.awssdk.core.signer.Signer;
4951
import software.amazon.awssdk.http.Protocol;
5052
import software.amazon.awssdk.http.SdkHttpConfigurationOption;
@@ -92,9 +94,7 @@ public TypeSpec poetSpec() {
9294
builder.addMethod(serviceNameMethod());
9395
builder.addMethod(mergeServiceDefaultsMethod());
9496

95-
if (model.getCustomizationConfig().getUserAgent() != null) {
96-
builder.addMethod(mergeInternalDefaultsMethod());
97-
}
97+
mergeInternalDefaultsMethod().ifPresent(builder::addMethod);
9898

9999
builder.addMethod(finalizeServiceConfigurationMethod());
100100
builder.addMethod(defaultSignerMethod());
@@ -175,19 +175,31 @@ private MethodSpec mergeServiceDefaultsMethod() {
175175
return builder.build();
176176
}
177177

178-
private MethodSpec mergeInternalDefaultsMethod() {
178+
private Optional<MethodSpec> mergeInternalDefaultsMethod() {
179179
String userAgent = model.getCustomizationConfig().getUserAgent();
180+
RetryMode defaultRetryMode = model.getCustomizationConfig().getDefaultRetryMode();
181+
182+
// If none of the options are customized, then we do not need to bother overriding the method
183+
if (userAgent == null && defaultRetryMode == null) {
184+
return Optional.empty();
185+
}
180186

181187
MethodSpec.Builder builder = MethodSpec.methodBuilder("mergeInternalDefaults")
182188
.addAnnotation(Override.class)
183189
.addModifiers(PROTECTED, FINAL)
184190
.returns(SdkClientConfiguration.class)
185191
.addParameter(SdkClientConfiguration.class, "config")
186-
.addCode("return config.merge(c -> c.option($T.INTERNAL_USER_AGENT, $S)\n",
187-
SdkClientOption.class, userAgent);
188-
189-
builder.addCode(");");
190-
return builder.build();
192+
.addCode("return config.merge(c -> {\n");
193+
if (userAgent != null) {
194+
builder.addCode("c.option($T.INTERNAL_USER_AGENT, $S);\n",
195+
SdkClientOption.class, userAgent);
196+
}
197+
if (defaultRetryMode != null) {
198+
builder.addCode("c.option($T.DEFAULT_RETRY_MODE, $T.$L);\n",
199+
SdkClientOption.class, RetryMode.class, defaultRetryMode.name());
200+
}
201+
builder.addCode("});\n");
202+
return Optional.of(builder.build());
191203
}
192204

193205
private MethodSpec finalizeServiceConfigurationMethod() {

codegen/src/main/java/software/amazon/awssdk/codegen/poet/model/AbstractMemberSetters.java

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.squareup.javapoet.MethodSpec;
2323
import com.squareup.javapoet.ParameterSpec;
2424
import com.squareup.javapoet.TypeName;
25+
import java.beans.Transient;
2526
import java.util.Optional;
2627
import java.util.stream.Collectors;
2728
import javax.lang.model.element.Modifier;
@@ -84,6 +85,7 @@ protected MethodSpec.Builder fluentSetterBuilder(String methodName, ParameterSpe
8485
return MethodSpec.methodBuilder(methodName)
8586
.addParameter(setterParam)
8687
.addAnnotation(Override.class)
88+
.addAnnotation(Transient.class)
8789
.returns(returnType)
8890
.addModifiers(Modifier.PUBLIC, Modifier.FINAL);
8991
}

codegen/src/main/java/software/amazon/awssdk/codegen/poet/model/ModelBuilderSpecs.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ private List<MethodSpec> accessors() {
216216
shapeModel.getNonStreamingMembers()
217217
.forEach(m -> {
218218
accessors.add(checkDeprecated(m, accessorsFactory.beanStyleGetter(m)));
219-
accessors.addAll(checkDeprecated(m, accessorsFactory.fluentSetters(m, builderInterfaceName())));
220219
accessors.addAll(checkDeprecated(m, accessorsFactory.beanStyleSetters(m)));
220+
accessors.addAll(checkDeprecated(m, accessorsFactory.fluentSetters(m, builderInterfaceName())));
221221
accessors.addAll(checkDeprecated(m, accessorsFactory.convenienceSetters(m, builderInterfaceName())));
222222
});
223223

codegen/src/test/java/software/amazon/awssdk/codegen/poet/builder/BuilderClassTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void baseClientBuilderClass() throws Exception {
4040

4141
@Test
4242
public void baseClientBuilderClassWithInternalUserAgent() throws Exception {
43-
assertThat(new BaseClientBuilderClass(ClientTestModels.internalConfigModels()), generatesTo("test-client-builder-internal-user-agent-class.java"));
43+
assertThat(new BaseClientBuilderClass(ClientTestModels.internalConfigModels()), generatesTo("test-client-builder-internal-defaults-class.java"));
4444
}
4545

4646
@Test
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import software.amazon.awssdk.core.client.config.SdkClientOption;
1111
import software.amazon.awssdk.core.interceptor.ClasspathInterceptorChainFactory;
1212
import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
13+
import software.amazon.awssdk.core.retry.RetryMode;
1314
import software.amazon.awssdk.core.signer.Signer;
1415
import software.amazon.awssdk.utils.CollectionUtils;
1516

@@ -37,7 +38,10 @@ protected final SdkClientConfiguration mergeServiceDefaults(SdkClientConfigurati
3738

3839
@Override
3940
protected final SdkClientConfiguration mergeInternalDefaults(SdkClientConfiguration config) {
40-
return config.merge(c -> c.option(SdkClientOption.INTERNAL_USER_AGENT, "md/foobar"));
41+
return config.merge(c -> {
42+
c.option(SdkClientOption.INTERNAL_USER_AGENT, "md/foobar");
43+
c.option(SdkClientOption.DEFAULT_RETRY_MODE, RetryMode.STANDARD);
44+
});
4145
}
4246

4347
@Override

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/client/c2j/internalconfig/customization.config

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"authPolicyActions" : {
33
"skip" : true
44
},
5-
"userAgent": "md/foobar"
5+
"userAgent": "md/foobar",
6+
"defaultRetryMode": "STANDARD"
67
}

0 commit comments

Comments
 (0)