Skip to content

Commit 5a323df

Browse files
Merge pull request #3081 from aws/staging/d8286b01-2315-4af6-b61d-16600ebc6ac1
Pull request: release <- staging/d8286b01-2315-4af6-b61d-16600ebc6ac1
2 parents fc264e8 + 7edfc9f commit 5a323df

File tree

529 files changed

+6387
-4331
lines changed

Some content is hidden

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

529 files changed

+6387
-4331
lines changed

.changes/2.26.6.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "2.26.6",
3+
"date": "2024-06-19",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "AWS SDK for Java v2",
8+
"contributor": "",
9+
"description": "Fix a bug that prevented users from overriding retry strategies"
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS Artifact",
14+
"contributor": "",
15+
"description": "This release adds an acceptanceType field to the ReportSummary structure (used in the ListReports API response)."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS Cost and Usage Report Service",
20+
"contributor": "",
21+
"description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing."
22+
},
23+
{
24+
"type": "feature",
25+
"category": "AWS Direct Connect",
26+
"contributor": "",
27+
"description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing."
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon Athena",
32+
"contributor": "",
33+
"description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "Amazon Elastic Transcoder",
38+
"contributor": "",
39+
"description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "Amazon OpenSearch Service",
44+
"contributor": "",
45+
"description": "This release enables customers to use JSON Web Tokens (JWT) for authentication on their Amazon OpenSearch Service domains."
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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
11
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
2+
# __2.26.6__ __2024-06-19__
3+
## __AWS Artifact__
4+
- ### Features
5+
- This release adds an acceptanceType field to the ReportSummary structure (used in the ListReports API response).
6+
7+
## __AWS Cost and Usage Report Service__
8+
- ### Features
9+
- Add v2 smoke tests and smithy smokeTests trait for SDK testing.
10+
11+
## __AWS Direct Connect__
12+
- ### Features
13+
- Add v2 smoke tests and smithy smokeTests trait for SDK testing.
14+
15+
## __AWS SDK for Java v2__
16+
- ### Features
17+
- Updated endpoint and partition metadata.
18+
19+
- ### Bugfixes
20+
- Fix a bug that prevented users from overriding retry strategies
21+
22+
## __Amazon Athena__
23+
- ### Features
24+
- Add v2 smoke tests and smithy smokeTests trait for SDK testing.
25+
26+
## __Amazon Elastic Transcoder__
27+
- ### Features
28+
- Add v2 smoke tests and smithy smokeTests trait for SDK testing.
29+
30+
## __Amazon OpenSearch Service__
31+
- ### Features
32+
- This release enables customers to use JSON Web Tokens (JWT) for authentication on their Amazon OpenSearch Service domains.
33+
234
# __2.26.5__ __2024-06-18__
335
## __AWS CloudTrail__
436
- ### 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.26.5</version>
55+
<version>2.26.6</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.26.5</version>
89+
<version>2.26.6</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.26.5</version>
94+
<version>2.26.6</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.26.5</version>
106+
<version>2.26.6</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.26.5</version>
23+
<version>2.26.6</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.26.5</version>
23+
<version>2.26.6</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.26.5</version>
23+
<version>2.26.6</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.26.5</version>
23+
<version>2.26.6</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.26.5</version>
20+
<version>2.26.6</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.26.5</version>
23+
<version>2.26.6</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.26.5</version>
20+
<version>2.26.6</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

bundle-logging-bridge/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.26.5</version>
24+
<version>2.26.6</version>
2525
</parent>
2626
<artifactId>bundle-logging-bridge</artifactId>
2727
<packaging>jar</packaging>

bundle-sdk/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.26.5</version>
24+
<version>2.26.6</version>
2525
</parent>
2626
<artifactId>bundle-sdk</artifactId>
2727
<packaging>jar</packaging>

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

codegen/pom.xml

Lines changed: 6 additions & 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.26.5</version>
24+
<version>2.26.6</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>
@@ -97,6 +97,11 @@
9797
<artifactId>http-auth-aws</artifactId>
9898
<version>${awsjavasdk.version}</version>
9999
</dependency>
100+
<dependency>
101+
<groupId>software.amazon.awssdk</groupId>
102+
<artifactId>retries-spi</artifactId>
103+
<version>${awsjavasdk.version}</version>
104+
</dependency>
100105
<dependency>
101106
<groupId>software.amazon.awssdk</groupId>
102107
<artifactId>arns</artifactId>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
import software.amazon.awssdk.codegen.poet.PoetUtils;
5353
import software.amazon.awssdk.codegen.poet.auth.scheme.AuthSchemeSpecUtils;
5454
import software.amazon.awssdk.codegen.poet.auth.scheme.ModelAuthSchemeClassesKnowledgeIndex;
55+
import software.amazon.awssdk.codegen.poet.client.ClientClassUtils;
5556
import software.amazon.awssdk.codegen.poet.model.ServiceClientConfigurationUtils;
5657
import software.amazon.awssdk.codegen.poet.rules.EndpointParamsKnowledgeIndex;
5758
import software.amazon.awssdk.codegen.poet.rules.EndpointRulesSpecUtils;
@@ -180,6 +181,7 @@ public TypeSpec poetSpec() {
180181
}
181182
addServiceHttpConfigIfNeeded(builder, model);
182183
builder.addMethod(invokePluginsMethod());
184+
builder.addMethod(ClientClassUtils.updateRetryStrategyClientConfigurationMethod());
183185
builder.addMethod(internalPluginsMethod());
184186

185187
endpointParamsKnowledgeIndex.resolveAccountIdEndpointModeMethod().ifPresent(builder::addMethod);
@@ -783,6 +785,7 @@ private MethodSpec invokePluginsMethod() {
783785
.beginControlFlow("for ($T plugin : plugins)", SdkPlugin.class)
784786
.addStatement("plugin.configureClient(serviceConfigBuilder)")
785787
.endControlFlow()
788+
.addStatement("updateRetryStrategyClientConfiguration(configuration)")
786789
.addStatement("return configuration.build()");
787790
return builder.build();
788791
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ protected void addAdditionalMethods(TypeSpec.Builder type) {
173173
type.addMethod(isSignerOverriddenOnClientMethod());
174174
}
175175
}
176+
type.addMethod(ClientClassUtils.updateRetryStrategyClientConfigurationMethod());
176177
type.addMethod(updateSdkClientConfigurationMethod(configurationUtils.serviceClientConfigurationBuilderClassName()));
177178
protocolSpec.createErrorResponseHandler().ifPresent(type::addMethod);
178179
}
@@ -313,8 +314,9 @@ protected static MethodSpec updateSdkClientConfigurationMethod(
313314
.addStatement("$1T serviceConfigBuilder = new $1T(configuration)", serviceClientConfigurationBuilderClassName)
314315
.beginControlFlow("for ($T plugin : plugins)", SdkPlugin.class)
315316
.addStatement("plugin.configureClient(serviceConfigBuilder)")
316-
.endControlFlow()
317-
.addStatement("return configuration.build()");
317+
.endControlFlow();
318+
builder.addStatement("updateRetryStrategyClientConfiguration(configuration)");
319+
builder.addStatement("return configuration.build()");
318320

319321
return builder.build();
320322
}

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

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import software.amazon.awssdk.arns.Arn;
3333
import software.amazon.awssdk.auth.signer.EventStreamAws4Signer;
3434
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
35+
import software.amazon.awssdk.awscore.retry.AwsRetryStrategy;
3536
import software.amazon.awssdk.codegen.model.config.customization.S3ArnableFieldConfig;
3637
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
3738
import software.amazon.awssdk.codegen.model.intermediate.MemberModel;
@@ -40,12 +41,17 @@
4041
import software.amazon.awssdk.codegen.model.service.HostPrefixProcessor;
4142
import software.amazon.awssdk.codegen.poet.PoetExtension;
4243
import software.amazon.awssdk.codegen.poet.PoetUtils;
44+
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration;
45+
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
46+
import software.amazon.awssdk.core.client.config.SdkClientOption;
47+
import software.amazon.awssdk.core.retry.RetryMode;
4348
import software.amazon.awssdk.core.signer.Signer;
49+
import software.amazon.awssdk.retries.api.RetryStrategy;
4450
import software.amazon.awssdk.utils.HostnameValidator;
4551
import software.amazon.awssdk.utils.StringUtils;
4652
import software.amazon.awssdk.utils.Validate;
4753

48-
final class ClientClassUtils {
54+
public final class ClientClassUtils {
4955

5056
private ClientClassUtils() {
5157
}
@@ -243,4 +249,35 @@ private static String inputShapeMemberGetter(OperationModel opModel, String c2jN
243249
return opModel.getInput().getVariableName() + "." +
244250
opModel.getInputShape().getMemberByC2jName(c2jName).getFluentGetterMethodName() + "()";
245251
}
252+
253+
public static MethodSpec updateRetryStrategyClientConfigurationMethod() {
254+
MethodSpec.Builder builder = MethodSpec.methodBuilder("updateRetryStrategyClientConfiguration")
255+
.addModifiers(Modifier.PRIVATE)
256+
.addParameter(SdkClientConfiguration.Builder.class, "configuration");
257+
builder.addStatement("$T builder = configuration.asOverrideConfigurationBuilder()",
258+
ClientOverrideConfiguration.Builder.class);
259+
builder.addStatement("$T retryMode = builder.retryMode()", RetryMode.class);
260+
builder.beginControlFlow("if (retryMode != null)")
261+
.addStatement("configuration.option($T.RETRY_STRATEGY, $T.forRetryMode(retryMode))", SdkClientOption.class,
262+
AwsRetryStrategy.class);
263+
builder.nextControlFlow("else");
264+
builder.addStatement("$T<$T<?, ?>> configurator = builder.retryStrategyConfigurator()", Consumer.class,
265+
RetryStrategy.Builder.class);
266+
builder.beginControlFlow("if (configurator != null)")
267+
.addStatement("$T<?, ?> defaultBuilder = $T.defaultRetryStrategy().toBuilder()", RetryStrategy.Builder.class,
268+
AwsRetryStrategy.class)
269+
.addStatement("configurator.accept(defaultBuilder)")
270+
.addStatement("configuration.option($T.RETRY_STRATEGY, defaultBuilder.build())", SdkClientOption.class);
271+
builder.nextControlFlow("else");
272+
builder.addStatement("$T retryStrategy = builder.retryStrategy()", RetryStrategy.class);
273+
builder.beginControlFlow("if (retryStrategy != null)")
274+
.addStatement("configuration.option($T.RETRY_STRATEGY, retryStrategy)", SdkClientOption.class)
275+
.endControlFlow();
276+
builder.endControlFlow();
277+
builder.endControlFlow();
278+
builder.addStatement("configuration.option($T.CONFIGURED_RETRY_MODE, null)", SdkClientOption.class);
279+
builder.addStatement("configuration.option($T.CONFIGURED_RETRY_STRATEGY, null)", SdkClientOption.class);
280+
builder.addStatement("configuration.option($T.CONFIGURED_RETRY_CONFIGURATOR, null)", SdkClientOption.class);
281+
return builder.build();
282+
}
246283
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ protected void addAdditionalMethods(TypeSpec.Builder type) {
152152
.addMethod(resolveMetricPublishersMethod());
153153

154154
protocolSpec.createErrorResponseHandler().ifPresent(type::addMethod);
155+
type.addMethod(ClientClassUtils.updateRetryStrategyClientConfigurationMethod());
155156
type.addMethod(updateSdkClientConfigurationMethod(configurationUtils.serviceClientConfigurationBuilderClassName()));
156157
type.addMethod(protocolSpec.initProtocolFactory(model));
157158
}
@@ -478,6 +479,7 @@ protected MethodSpec updateSdkClientConfigurationMethod(
478479

479480
if (model.getCustomizationConfig() == null ||
480481
CollectionUtils.isNullOrEmpty(model.getCustomizationConfig().getCustomClientContextParams())) {
482+
builder.addStatement("updateRetryStrategyClientConfiguration(configuration)");
481483
builder.addStatement("return configuration.build()");
482484
return builder.build();
483485
}
@@ -499,7 +501,7 @@ protected MethodSpec updateSdkClientConfigurationMethod(
499501
Validate.class, Objects.class, endpointRulesSpecUtils.clientContextParamsName(), keyName,
500502
keyName + " cannot be modified by request level plugins");
501503
});
502-
504+
builder.addStatement("updateRetryStrategyClientConfiguration(configuration)");
503505
builder.addStatement("return configuration.build()");
504506
return builder.build();
505507
}

0 commit comments

Comments
 (0)