Skip to content

Commit 488874c

Browse files
Merge pull request #850 from aws/staging/e0d843cb-62f7-420c-b51b-75a90288c685
Pull request: release <- staging/e0d843cb-62f7-420c-b51b-75a90288c685
2 parents b9a14b7 + 96bde0d commit 488874c

File tree

291 files changed

+736
-321
lines changed

Some content is hidden

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

291 files changed

+736
-321
lines changed

.changes/2.13.20.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"version": "2.13.20",
3+
"date": "2020-05-19",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS Health APIs and Notifications",
8+
"description": "Feature: Health: AWS Health added a new field to differentiate Public events from Account-Specific events in the API request and response. Visit https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html to learn more."
9+
},
10+
{
11+
"type": "feature",
12+
"category": "AWS SDK for Java v2",
13+
"description": "Endpoint discovery is now enabled by default for future services that will require it. A new method 'endpointDiscoveryEnabled' has been added to client builders that support endpoint discovery allowing a true or false value to be set. 'enableEndpointDiscovery' has been deprecated on the client builders as it is now superseded by 'endpointDiscoveryEnabled'."
14+
},
15+
{
16+
"type": "feature",
17+
"category": "Amazon Chime",
18+
"description": "You can now receive Voice Connector call events through SNS or SQS."
19+
},
20+
{
21+
"type": "feature",
22+
"category": "AWS SDK for Java v2",
23+
"description": "Updated service endpoint metadata."
24+
},
25+
{
26+
"type": "feature",
27+
"category": "Amazon Elastic Compute Cloud",
28+
"description": "This release adds support for Federated Authentication via SAML-2.0 in AWS ClientVPN."
29+
},
30+
{
31+
"type": "feature",
32+
"category": "Amazon Transcribe Service",
33+
"description": "Documentation updates for Amazon Transcribe."
34+
}
35+
]
36+
}

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# __2.13.20__ __2020-05-19__
2+
## __AWS Health APIs and Notifications__
3+
- ### Features
4+
- Feature: Health: AWS Health added a new field to differentiate Public events from Account-Specific events in the API request and response. Visit https://docs.aws.amazon.com/health/latest/APIReference/API_Event.html to learn more.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- Endpoint discovery is now enabled by default for future services that will require it. A new method 'endpointDiscoveryEnabled' has been added to client builders that support endpoint discovery allowing a true or false value to be set. 'enableEndpointDiscovery' has been deprecated on the client builders as it is now superseded by 'endpointDiscoveryEnabled'.
9+
- Updated service endpoint metadata.
10+
11+
## __Amazon Chime__
12+
- ### Features
13+
- You can now receive Voice Connector call events through SNS or SQS.
14+
15+
## __Amazon Elastic Compute Cloud__
16+
- ### Features
17+
- This release adds support for Federated Authentication via SAML-2.0 in AWS ClientVPN.
18+
19+
## __Amazon Transcribe Service__
20+
- ### Features
21+
- Documentation updates for Amazon Transcribe.
22+
123
# __2.13.19__ __2020-05-18__
224
## __AWS SDK for Java v2__
325
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To automatically manage module versions (currently all modules have the same ver
4949
<dependency>
5050
<groupId>software.amazon.awssdk</groupId>
5151
<artifactId>bom</artifactId>
52-
<version>2.13.19</version>
52+
<version>2.13.20</version>
5353
<type>pom</type>
5454
<scope>import</scope>
5555
</dependency>
@@ -83,12 +83,12 @@ Alternatively you can add dependencies for the specific services you use only:
8383
<dependency>
8484
<groupId>software.amazon.awssdk</groupId>
8585
<artifactId>ec2</artifactId>
86-
<version>2.13.19</version>
86+
<version>2.13.20</version>
8787
</dependency>
8888
<dependency>
8989
<groupId>software.amazon.awssdk</groupId>
9090
<artifactId>s3</artifactId>
91-
<version>2.13.19</version>
91+
<version>2.13.20</version>
9292
</dependency>
9393
```
9494

@@ -100,7 +100,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
100100
<dependency>
101101
<groupId>software.amazon.awssdk</groupId>
102102
<artifactId>aws-sdk-java</artifactId>
103-
<version>2.13.19</version>
103+
<version>2.13.20</version>
104104
</dependency>
105105
```
106106

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

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.13.19</version>
23+
<version>2.13.20</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.13.19</version>
20+
<version>2.13.20</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.13.19</version>
23+
<version>2.13.20</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.13.19</version>
20+
<version>2.13.20</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.13.19</version>
24+
<version>2.13.20</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.13.19</version>
25+
<version>2.13.20</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.13.19</version>
24+
<version>2.13.20</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.13.19</version>
25+
<version>2.13.20</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.13.19</version>
24+
<version>2.13.20</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/IntermediateModelBuilder.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,25 @@ public IntermediateModel build() {
106106
Map<String, AuthorizerModel> authorizers =
107107
new HashMap<>(new AddCustomAuthorizers(this.service, getNamingStrategy()).constructAuthorizers());
108108

109+
// Iterate through every operation and build an 'endpointOperation' if at least one operation that supports
110+
// endpoint discovery is found. If -any operations that require- endpoint discovery are found, then the flag
111+
// 'endpointCacheRequired' will be set on the 'endpointOperation'. This 'endpointOperation' summary is then
112+
// passed directly into the constructor of the intermediate model and is referred to by the codegen.
109113
OperationModel endpointOperation = null;
114+
boolean endpointCacheRequired = false;
110115

111116
for (OperationModel o : operations.values()) {
112117
if (o.isEndpointOperation()) {
113118
endpointOperation = o;
114-
break;
115119
}
120+
121+
if (o.getEndpointDiscovery() != null && o.getEndpointDiscovery().isRequired()) {
122+
endpointCacheRequired = true;
123+
}
124+
}
125+
126+
if (endpointOperation != null) {
127+
endpointOperation.setEndpointCacheRequired(endpointCacheRequired);
116128
}
117129

118130
for (IntermediateModelShapeProcessor processor : shapeProcessors) {

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ public class CustomizationConfig {
159159
*/
160160
private UtilitiesMethod utilitiesMethod;
161161

162+
/**
163+
* Force generation of deprecated client builder method 'enableEndpointDiscovery'. Only services that already had
164+
* this method when it was deprecated require this flag to be set.
165+
*/
166+
private boolean enableEndpointDiscoveryMethodRequired = false;
167+
162168
private CustomizationConfig() {
163169
}
164170

@@ -406,4 +412,12 @@ public UtilitiesMethod getUtilitiesMethod() {
406412
public void setUtilitiesMethod(UtilitiesMethod utilitiesMethod) {
407413
this.utilitiesMethod = utilitiesMethod;
408414
}
415+
416+
public boolean isEnableEndpointDiscoveryMethodRequired() {
417+
return enableEndpointDiscoveryMethodRequired;
418+
}
419+
420+
public void setEnableEndpointDiscoveryMethodRequired(boolean enableEndpointDiscoveryMethodRequired) {
421+
this.enableEndpointDiscoveryMethodRequired = enableEndpointDiscoveryMethodRequired;
422+
}
409423
}

codegen/src/main/java/software/amazon/awssdk/codegen/model/intermediate/OperationModel.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class OperationModel extends DocumentationModel {
5050

5151
private boolean endpointOperation;
5252

53+
private boolean endpointCacheRequired;
54+
5355
private EndpointDiscovery endpointDiscovery;
5456

5557
@JsonIgnore
@@ -207,6 +209,14 @@ public void setEndpointOperation(boolean endpointOperation) {
207209
this.endpointOperation = endpointOperation;
208210
}
209211

212+
public boolean isEndpointCacheRequired() {
213+
return endpointCacheRequired;
214+
}
215+
216+
public void setEndpointCacheRequired(boolean endpointCacheRequired) {
217+
this.endpointCacheRequired = endpointCacheRequired;
218+
}
219+
210220
public boolean isPaginated() {
211221
return isPaginated;
212222
}

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,32 @@ public TypeSpec poetSpec() {
5454
.addJavadoc("Internal implementation of {@link $T}.", builderInterfaceName);
5555

5656
if (model.getEndpointOperation().isPresent()) {
57-
builder.addMethod(enableEndpointDiscovery());
57+
builder.addMethod(endpointDiscoveryEnabled());
58+
59+
if (model.getCustomizationConfig().isEnableEndpointDiscoveryMethodRequired()) {
60+
builder.addMethod(enableEndpointDiscovery());
61+
}
5862
}
5963

6064
return builder.addMethod(buildClientMethod()).build();
6165
}
6266

67+
private MethodSpec endpointDiscoveryEnabled() {
68+
return MethodSpec.methodBuilder("endpointDiscoveryEnabled")
69+
.addAnnotation(Override.class)
70+
.addModifiers(Modifier.PUBLIC)
71+
.returns(builderClassName)
72+
.addParameter(boolean.class, "endpointDiscoveryEnabled")
73+
.addStatement("this.endpointDiscoveryEnabled = endpointDiscoveryEnabled")
74+
.addStatement("return this")
75+
.build();
76+
}
77+
6378
private MethodSpec enableEndpointDiscovery() {
6479
return MethodSpec.methodBuilder("enableEndpointDiscovery")
6580
.addAnnotation(Override.class)
81+
.addAnnotation(Deprecated.class)
82+
.addJavadoc("@deprecated Use {@link #endpointDiscoveryEnabled($T)} instead.", boolean.class)
6683
.addModifiers(Modifier.PUBLIC)
6784
.returns(builderClassName)
6885
.addStatement("endpointDiscoveryEnabled = true")

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import software.amazon.awssdk.awscore.client.builder.AwsDefaultClientBuilder;
3636
import software.amazon.awssdk.codegen.internal.Utils;
3737
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
38+
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
3839
import software.amazon.awssdk.codegen.model.service.AuthType;
3940
import software.amazon.awssdk.codegen.poet.ClassSpec;
4041
import software.amazon.awssdk.codegen.poet.PoetUtils;
@@ -78,10 +79,12 @@ public TypeSpec poetSpec() {
7879
ClassName.get(basePackage, model.getMetadata().getSyncBuilder()),
7980
ClassName.get(basePackage, model.getMetadata().getAsyncBuilder()));
8081

82+
// Only services that require endpoint discovery for at least one of their operations get a default value of
83+
// 'true'
8184
if (model.getEndpointOperation().isPresent()) {
8285
builder.addField(FieldSpec.builder(boolean.class, "endpointDiscoveryEnabled")
8386
.addModifiers(PROTECTED)
84-
.initializer("false")
87+
.initializer(resolveDefaultEndpointDiscovery() ? "true" : "false")
8588
.build());
8689
}
8790

@@ -102,6 +105,12 @@ public TypeSpec poetSpec() {
102105
return builder.build();
103106
}
104107

108+
private boolean resolveDefaultEndpointDiscovery() {
109+
return model.getEndpointOperation()
110+
.map(OperationModel::isEndpointCacheRequired)
111+
.orElse(false);
112+
}
113+
105114
private MethodSpec signingNameMethod() {
106115
return MethodSpec.methodBuilder("signingName")
107116
.addAnnotation(Override.class)

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ public TypeSpec poetSpec() {
5050
.addJavadoc(getJavadoc());
5151

5252
if (model.getEndpointOperation().isPresent()) {
53-
builder.addMethod(enableEndpointDiscovery());
53+
if (model.getCustomizationConfig().isEnableEndpointDiscoveryMethodRequired()) {
54+
builder.addMethod(enableEndpointDiscovery());
55+
}
56+
57+
builder.addMethod(endpointDiscovery());
5458
}
5559

5660
if (model.getCustomizationConfig().getServiceSpecificClientConfigClass() != null) {
@@ -72,6 +76,16 @@ private MethodSpec enableEndpointDiscovery() {
7276
return MethodSpec.methodBuilder("enableEndpointDiscovery")
7377
.addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT)
7478
.returns(TypeVariableName.get("B"))
79+
.addAnnotation(Deprecated.class)
80+
.addJavadoc("@deprecated Use {@link #endpointDiscoveryEnabled($T)} instead.", boolean.class)
81+
.build();
82+
}
83+
84+
private MethodSpec endpointDiscovery() {
85+
return MethodSpec.methodBuilder("endpointDiscoveryEnabled")
86+
.addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT)
87+
.returns(TypeVariableName.get("B"))
88+
.addParameter(boolean.class, "endpointDiscovery")
7589
.build();
7690
}
7791

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,32 @@ public TypeSpec poetSpec() {
5454
.addJavadoc("Internal implementation of {@link $T}.", builderInterfaceName);
5555

5656
if (model.getEndpointOperation().isPresent()) {
57-
builder.addMethod(enableEndpointDiscovery());
57+
builder.addMethod(endpointDiscoveryEnabled());
58+
59+
if (model.getCustomizationConfig().isEnableEndpointDiscoveryMethodRequired()) {
60+
builder.addMethod(enableEndpointDiscovery());
61+
}
5862
}
5963

6064
return builder.addMethod(buildClientMethod()).build();
6165
}
6266

67+
private MethodSpec endpointDiscoveryEnabled() {
68+
return MethodSpec.methodBuilder("endpointDiscoveryEnabled")
69+
.addAnnotation(Override.class)
70+
.addModifiers(Modifier.PUBLIC)
71+
.returns(builderClassName)
72+
.addParameter(boolean.class, "endpointDiscoveryEnabled")
73+
.addStatement("this.endpointDiscoveryEnabled = endpointDiscoveryEnabled")
74+
.addStatement("return this")
75+
.build();
76+
}
77+
6378
private MethodSpec enableEndpointDiscovery() {
6479
return MethodSpec.methodBuilder("enableEndpointDiscovery")
6580
.addAnnotation(Override.class)
81+
.addAnnotation(Deprecated.class)
82+
.addJavadoc("@deprecated Use {@link #endpointDiscoveryEnabled($T)} instead.", boolean.class)
6683
.addModifiers(Modifier.PUBLIC)
6784
.returns(builderClassName)
6885
.addStatement("endpointDiscoveryEnabled = true")

0 commit comments

Comments
 (0)