Skip to content

Commit cb8c281

Browse files
Merge pull request #2224 from aws/staging/79885027-09e2-43a5-bcb3-073d672eba38
Pull request: release <- staging/79885027-09e2-43a5-bcb3-073d672eba38
2 parents ca81dba + a4f0e9e commit cb8c281

File tree

423 files changed

+2243
-1962
lines changed

Some content is hidden

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

423 files changed

+2243
-1962
lines changed

.changes/2.18.5.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "2.18.5",
3+
"date": "2022-10-27",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "AWs SDK for Java v2",
8+
"contributor": "",
9+
"description": "We are only enabling rules based endpoints for S3, S3Control, and EventBridge for now in order to roll back incorrect hostprefix handling in the Java SDK. EventBridge are unaffected by this issue because it does not have a `hostPrefix` in its service model. S3 and S3Control have `hostPrefix` in the model, it is handled by the rule set."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS Glue",
14+
"contributor": "",
15+
"description": "Added support for custom datatypes when using custom csv classifier."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS WAFV2",
20+
"contributor": "",
21+
"description": "This release adds the following: Challenge rule action, to silently verify client browsers; rule group rule action override to any valid rule action, not just Count; token sharing between protected applications for challenge/CAPTCHA token; targeted rules option for Bot Control managed rule group."
22+
},
23+
{
24+
"type": "feature",
25+
"category": "Amazon Elastic Compute Cloud",
26+
"contributor": "",
27+
"description": "Feature supports the replacement of instance root volume using an updated AMI without requiring customers to stop their instance."
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon Redshift",
32+
"contributor": "",
33+
"description": "This release clarifies use for the ElasticIp parameter of the CreateCluster and RestoreFromClusterSnapshot APIs."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "Amazon SageMaker Service",
38+
"contributor": "",
39+
"description": "This change allows customers to provide a custom entrypoint script for the docker container to be run while executing training jobs, and provide custom arguments to the entrypoint script."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "Firewall Management Service",
44+
"contributor": "",
45+
"description": "Add support NetworkFirewall Managed Rule Group Override flag in GetViolationDetails API"
46+
},
47+
{
48+
"type": "feature",
49+
"category": "AWS SDK for Java v2",
50+
"contributor": "",
51+
"description": "Updated endpoint and partition metadata."
52+
}
53+
]
54+
}

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# __2.18.5__ __2022-10-27__
2+
## __AWS Glue__
3+
- ### Features
4+
- Added support for custom datatypes when using custom csv classifier.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- Updated endpoint and partition metadata.
9+
10+
## __AWS WAFV2__
11+
- ### Features
12+
- This release adds the following: Challenge rule action, to silently verify client browsers; rule group rule action override to any valid rule action, not just Count; token sharing between protected applications for challenge/CAPTCHA token; targeted rules option for Bot Control managed rule group.
13+
14+
## __AWs SDK for Java v2__
15+
- ### Bugfixes
16+
- We are only enabling rules based endpoints for S3, S3Control, and EventBridge for now in order to roll back incorrect hostprefix handling in the Java SDK. EventBridge are unaffected by this issue because it does not have a `hostPrefix` in its service model. S3 and S3Control have `hostPrefix` in the model, it is handled by the rule set.
17+
18+
## __Amazon Elastic Compute Cloud__
19+
- ### Features
20+
- Feature supports the replacement of instance root volume using an updated AMI without requiring customers to stop their instance.
21+
22+
## __Amazon Redshift__
23+
- ### Features
24+
- This release clarifies use for the ElasticIp parameter of the CreateCluster and RestoreFromClusterSnapshot APIs.
25+
26+
## __Amazon SageMaker Service__
27+
- ### Features
28+
- This change allows customers to provide a custom entrypoint script for the docker container to be run while executing training jobs, and provide custom arguments to the entrypoint script.
29+
30+
## __Firewall Management Service__
31+
- ### Features
32+
- Add support NetworkFirewall Managed Rule Group Override flag in GetViolationDetails API
33+
134
# __2.18.4__ __2022-10-26__
235
## __AWS Identity and Access Management__
336
- ### 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.18.4</version>
55+
<version>2.18.5</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.18.4</version>
89+
<version>2.18.5</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.18.4</version>
94+
<version>2.18.5</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.18.4</version>
106+
<version>2.18.5</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.18.4</version>
23+
<version>2.18.5</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.18.4</version>
23+
<version>2.18.5</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.18.4</version>
23+
<version>2.18.5</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.18.4</version>
23+
<version>2.18.5</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.18.4</version>
20+
<version>2.18.5</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.18.4</version>
23+
<version>2.18.5</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.18.4</version>
20+
<version>2.18.5</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.18.4</version>
24+
<version>2.18.5</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.18.4</version>
25+
<version>2.18.5</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.18.4</version>
24+
<version>2.18.5</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.18.4</version>
25+
<version>2.18.5</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.18.4</version>
24+
<version>2.18.5</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/emitters/tasks/EndpointProviderTasks.java

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.ArrayList;
1919
import java.util.Arrays;
2020
import java.util.Collection;
21+
import java.util.Collections;
2122
import java.util.List;
2223
import java.util.Map;
2324
import software.amazon.awssdk.codegen.emitters.GeneratorTask;
@@ -45,6 +46,10 @@ public EndpointProviderTasks(GeneratorTaskParams dependencies) {
4546

4647
@Override
4748
protected List<GeneratorTask> createTasks() throws Exception {
49+
if (!generatorTaskParams.getModel().getCustomizationConfig().useRuleBasedEndpoints()) {
50+
return Collections.emptyList();
51+
}
52+
4853
List<GeneratorTask> tasks = new ArrayList<>();
4954
tasks.add(generateInterface());
5055
tasks.add(generateParams());

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

+12
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ public class CustomizationConfig {
213213

214214
private boolean useGlobalEndpoint;
215215

216+
/**
217+
* Whether Endpoints 2.0/rule based endpoints should be used for endpoint resolution.
218+
*/
219+
private boolean useRuleBasedEndpoints = false;
220+
216221
private CustomizationConfig() {
217222
}
218223

@@ -550,4 +555,11 @@ public void setSkipEndpointTests(Map<String, String> skipEndpointTests) {
550555
this.skipEndpointTests = skipEndpointTests;
551556
}
552557

558+
public boolean useRuleBasedEndpoints() {
559+
return useRuleBasedEndpoints;
560+
}
561+
562+
public void setUseRuleBasedEndpoints(boolean useRuleBasedEndpoints) {
563+
this.useRuleBasedEndpoints = useRuleBasedEndpoints;
564+
}
553565
}

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public TypeSpec poetSpec() {
6868
}
6969
}
7070

71-
builder.addMethod(endpointProviderMethod());
71+
if (endpointRulesSpecUtils.isEndpointRulesEnabled()) {
72+
builder.addMethod(endpointProviderMethod());
73+
}
7274

7375
if (BearerAuthUtils.usesBearerAuth(model)) {
7476
builder.addMethod(bearerTokenProviderMethod());

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

+14-8
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ public TypeSpec poetSpec() {
110110
builder.addMethod(finalizeServiceConfigurationMethod());
111111
defaultAwsAuthSignerMethod().ifPresent(builder::addMethod);
112112
builder.addMethod(signingNameMethod());
113-
builder.addMethod(defaultEndpointProviderMethod());
113+
if (endpointRulesSpecUtils.isEndpointRulesEnabled()) {
114+
builder.addMethod(defaultEndpointProviderMethod());
115+
}
114116

115-
if (hasClientContextParams()) {
117+
if (hasClientContextParams() && endpointRulesSpecUtils.isEndpointRulesEnabled()) {
116118
model.getClientContextParams().forEach((n, m) -> {
117119
builder.addMethod(clientContextParamSetter(n, m));
118120
});
@@ -184,9 +186,11 @@ private MethodSpec mergeServiceDefaultsMethod() {
184186
.addModifiers(PROTECTED, FINAL)
185187
.returns(SdkClientConfiguration.class)
186188
.addParameter(SdkClientConfiguration.class, "config")
187-
.addCode("return config.merge(c -> c")
188-
.addCode(".option($T.ENDPOINT_PROVIDER, defaultEndpointProvider())",
189-
SdkClientOption.class);
189+
.addCode("return config.merge(c -> c");
190+
191+
if (endpointRulesSpecUtils.isEndpointRulesEnabled()) {
192+
builder.addCode(".option($T.ENDPOINT_PROVIDER, defaultEndpointProvider())", SdkClientOption.class);
193+
}
190194

191195
if (defaultAwsAuthSignerMethod().isPresent()) {
192196
builder.addCode(".option($T.SIGNER, defaultSigner())\n", SdkAdvancedClientOption.class);
@@ -252,9 +256,11 @@ private MethodSpec finalizeServiceConfigurationMethod() {
252256
ParameterizedTypeName.get(List.class, ExecutionInterceptor.class),
253257
ArrayList.class);
254258

255-
builder.addStatement("endpointInterceptors.add(new $T())", endpointRulesSpecUtils.resolverInterceptorName());
256-
builder.addStatement("endpointInterceptors.add(new $T())", endpointRulesSpecUtils.authSchemesInterceptorName());
257-
builder.addStatement("endpointInterceptors.add(new $T())", endpointRulesSpecUtils.requestModifierInterceptorName());
259+
if (endpointRulesSpecUtils.isEndpointRulesEnabled()) {
260+
builder.addStatement("endpointInterceptors.add(new $T())", endpointRulesSpecUtils.resolverInterceptorName());
261+
builder.addStatement("endpointInterceptors.add(new $T())", endpointRulesSpecUtils.authSchemesInterceptorName());
262+
builder.addStatement("endpointInterceptors.add(new $T())", endpointRulesSpecUtils.requestModifierInterceptorName());
263+
}
258264

259265
builder.addCode("$1T interceptorFactory = new $1T();\n", ClasspathInterceptorChainFactory.class)
260266
.addCode("$T<$T> interceptors = interceptorFactory.getInterceptors($S);\n",

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

+7-5
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ public TypeSpec poetSpec() {
7373
builder.addMethod(serviceConfigurationConsumerBuilderMethod());
7474
}
7575

76-
builder.addMethod(endpointProviderMethod());
76+
if (endpointRulesSpecUtils.isEndpointRulesEnabled()) {
77+
builder.addMethod(endpointProviderMethod());
7778

78-
if (hasClientContextParams()) {
79-
model.getClientContextParams().forEach((n, m) -> {
80-
builder.addMethod(clientContextParamSetter(n, m));
81-
});
79+
if (hasClientContextParams()) {
80+
model.getClientContextParams().forEach((n, m) -> {
81+
builder.addMethod(clientContextParamSetter(n, m));
82+
});
83+
}
8284
}
8385

8486
if (generateTokenProviderMethod()) {

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ public TypeSpec poetSpec() {
6868
}
6969
}
7070

71-
builder.addMethod(endpointProviderMethod());
71+
if (endpointRulesSpecUtils.isEndpointRulesEnabled()) {
72+
builder.addMethod(endpointProviderMethod());
73+
}
7274

7375
if (BearerAuthUtils.usesBearerAuth(model)) {
7476
builder.addMethod(tokenProviderMethodImpl());

codegen/src/main/java/software/amazon/awssdk/codegen/poet/rules/EndpointRulesSpecUtils.java

+4
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,8 @@ public boolean isS3Control() {
182182
public TypeName resolverReturnType() {
183183
return ParameterizedTypeName.get(CompletableFuture.class, Endpoint.class);
184184
}
185+
186+
public boolean isEndpointRulesEnabled() {
187+
return intermediateModel.getCustomizationConfig().useRuleBasedEndpoints();
188+
}
185189
}

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/builder/test-async-client-builder-class.java

-8
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import software.amazon.awssdk.annotations.SdkInternalApi;
55
import software.amazon.awssdk.auth.token.credentials.SdkTokenProvider;
66
import software.amazon.awssdk.awscore.client.config.AwsClientOption;
7-
import software.amazon.awssdk.core.client.config.SdkClientOption;
8-
import software.amazon.awssdk.services.json.endpoints.JsonEndpointProvider;
97

108
/**
119
* Internal implementation of {@link JsonAsyncClientBuilder}.
@@ -14,12 +12,6 @@
1412
@SdkInternalApi
1513
final class DefaultJsonAsyncClientBuilder extends DefaultJsonBaseClientBuilder<JsonAsyncClientBuilder, JsonAsyncClient> implements
1614
JsonAsyncClientBuilder {
17-
@Override
18-
public DefaultJsonAsyncClientBuilder endpointProvider(JsonEndpointProvider endpointProvider) {
19-
clientConfiguration.option(SdkClientOption.ENDPOINT_PROVIDER, endpointProvider);
20-
return this;
21-
}
22-
2315
@Override
2416
public DefaultJsonAsyncClientBuilder tokenProvider(SdkTokenProvider tokenProvider) {
2517
clientConfiguration.option(AwsClientOption.TOKEN_PROVIDER, tokenProvider);

0 commit comments

Comments
 (0)