Skip to content

Commit

Permalink
Merge pull request #2864 from aws/staging/c5f1ee70-76c3-4f8b-812b-07c…
Browse files Browse the repository at this point in the history
…00e667a8b

Pull request: release <- staging/c5f1ee70-76c3-4f8b-812b-07c00e667a8b
  • Loading branch information
aws-sdk-java-automation authored Jan 19, 2024
2 parents 1b262a1 + f1121ce commit 4c0949b
Show file tree
Hide file tree
Showing 473 changed files with 1,316 additions and 498 deletions.
42 changes: 42 additions & 0 deletions .changes/2.23.7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"version": "2.23.7",
"date": "2024-01-19",
"entries": [
{
"type": "feature",
"category": "AWS CodeBuild",
"contributor": "",
"description": "Release CodeBuild Reserved Capacity feature"
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "anirudh9391",
"description": "Allowing SDK plugins to read and modify S3's crossRegionEnabled and SQS's checksumValidationEnabled"
},
{
"type": "feature",
"category": "Amazon Athena",
"contributor": "",
"description": "Introducing new NotebookS3LocationUri parameter to Athena ImportNotebook API. Payload is no longer required and either Payload or NotebookS3LocationUri needs to be provided (not both) for a successful ImportNotebook API call. If both are provided, an InvalidRequestException will be thrown."
},
{
"type": "feature",
"category": "Amazon DynamoDB",
"contributor": "",
"description": "This release adds support for including ApproximateCreationDateTimePrecision configurations in EnableKinesisStreamingDestination API, adds the same as an optional field in the response of DescribeKinesisStreamingDestination, and adds support for a new UpdateKinesisStreamingDestination API."
},
{
"type": "feature",
"category": "Amazon Q Connect",
"contributor": "",
"description": "Increased Quick Response name max length to 100"
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
29 changes: 28 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# __2.23.7__ __2024-01-19__
## __AWS CodeBuild__
- ### Features
- Release CodeBuild Reserved Capacity feature

## __AWS SDK for Java v2__
- ### Features
- Allowing SDK plugins to read and modify S3's crossRegionEnabled and SQS's checksumValidationEnabled
- Contributed by: [@anirudh9391](https://github.com/anirudh9391)
- Updated endpoint and partition metadata.

## __Amazon Athena__
- ### Features
- Introducing new NotebookS3LocationUri parameter to Athena ImportNotebook API. Payload is no longer required and either Payload or NotebookS3LocationUri needs to be provided (not both) for a successful ImportNotebook API call. If both are provided, an InvalidRequestException will be thrown.

## __Amazon DynamoDB__
- ### Features
- This release adds support for including ApproximateCreationDateTimePrecision configurations in EnableKinesisStreamingDestination API, adds the same as an optional field in the response of DescribeKinesisStreamingDestination, and adds support for a new UpdateKinesisStreamingDestination API.

## __Amazon Q Connect__
- ### Features
- Increased Quick Response name max length to 100

## __Contributors__
Special thanks to the following contributors to this release:

[@anirudh9391](https://github.com/anirudh9391)
# __2.23.6__ __2024-01-18__
## __AWS B2B Data Interchange__
- ### Features
Expand Down Expand Up @@ -2863,7 +2890,7 @@ Special thanks to the following contributors to this release:
## __Contributors__
Special thanks to the following contributors to this release:

[@psnilesh](https://github.com/psnilesh), [@faucct](https://github.com/faucct)
[@faucct](https://github.com/faucct), [@psnilesh](https://github.com/psnilesh)
# __2.20.146__ __2023-09-12__
## __AWS CRT-based S3 Client__
- ### Bugfixes
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</dependency>
```

Expand All @@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-app-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-lambda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetype-lambda</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetypes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundle-logging-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<artifactId>bundle-logging-bridge</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bundle-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<artifactId>bundle-sdk</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.6</version>
<version>2.23.7</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private MethodSpec buildClientMethod() {
builder.addStatement("$1T client = new $2T(clientConfiguration)",
clientInterfaceName, clientClassName);
if (model.asyncClientDecoratorClassName().isPresent()) {
builder.addStatement("return new $T().decorate(client, clientConfiguration, clientContextParams.copy().build())",
builder.addStatement("return new $T().decorate(client, clientConfiguration)",
PoetUtils.classNameFromFqcn(model.asyncClientDecoratorClassName().get()));
} else {
builder.addStatement("return client");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private MethodSpec buildClientMethod() {
builder.addStatement("$1T client = new $2T(clientConfiguration)",
clientInterfaceName, clientClassName);
if (model.syncClientDecoratorClassName().isPresent()) {
builder.addStatement("return new $T().decorate(client, clientConfiguration, clientContextParams.copy().build())",
builder.addStatement("return new $T().decorate(client, clientConfiguration)",
PoetUtils.classNameFromFqcn(model.syncClientDecoratorClassName().get()));
} else {
builder.addStatement("return client");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand All @@ -47,6 +49,7 @@
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
import software.amazon.awssdk.codegen.model.intermediate.Protocol;
import software.amazon.awssdk.codegen.model.service.ClientContextParam;
import software.amazon.awssdk.codegen.poet.PoetExtension;
import software.amazon.awssdk.codegen.poet.PoetUtils;
import software.amazon.awssdk.codegen.poet.auth.scheme.AuthSchemeSpecUtils;
Expand All @@ -56,6 +59,7 @@
import software.amazon.awssdk.codegen.poet.client.specs.QueryProtocolSpec;
import software.amazon.awssdk.codegen.poet.client.specs.XmlProtocolSpec;
import software.amazon.awssdk.codegen.poet.model.ServiceClientConfigurationUtils;
import software.amazon.awssdk.codegen.poet.rules.EndpointRulesSpecUtils;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkPlugin;
import software.amazon.awssdk.core.SdkRequest;
Expand All @@ -69,8 +73,11 @@
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.utils.AttributeMap;
import software.amazon.awssdk.utils.CollectionUtils;
import software.amazon.awssdk.utils.CompletableFutureUtils;
import software.amazon.awssdk.utils.Logger;
import software.amazon.awssdk.utils.Validate;

public class SyncClientClass extends SyncClientInterface {

Expand Down Expand Up @@ -418,7 +425,7 @@ protected MethodSpec.Builder waiterOperationBody(MethodSpec.Builder builder) {
poetExtensions.getSyncWaiterInterface());
}

protected static MethodSpec updateSdkClientConfigurationMethod(
protected MethodSpec updateSdkClientConfigurationMethod(
TypeName serviceClientConfigurationBuilderClassName,
boolean shouldAddClientReference) {
MethodSpec.Builder builder = MethodSpec.methodBuilder("updateSdkClientConfiguration")
Expand All @@ -442,9 +449,34 @@ protected static MethodSpec updateSdkClientConfigurationMethod(
.addStatement("$1T serviceConfigBuilder = new $1T(configuration)", serviceClientConfigurationBuilderClassName)
.beginControlFlow("for ($T plugin : plugins)", SdkPlugin.class)
.addStatement("plugin.configureClient(serviceConfigBuilder)")
.endControlFlow()
.addStatement("return configuration.build()");
.endControlFlow();
EndpointRulesSpecUtils endpointRulesSpecUtils = new EndpointRulesSpecUtils(this.model);

if (model.getCustomizationConfig() == null ||
CollectionUtils.isNullOrEmpty(model.getCustomizationConfig().getCustomClientContextParams())) {
builder.addStatement("return configuration.build()");
return builder.build();
}

Map<String, ClientContextParam> customClientConfigParams = model.getCustomizationConfig().getCustomClientContextParams();

builder.addCode("$1T newContextParams = configuration.option($2T.CLIENT_CONTEXT_PARAMS);\n"
+ "$1T originalContextParams = clientConfiguration.option($2T.CLIENT_CONTEXT_PARAMS);",
AttributeMap.class, SdkClientOption.class);

builder.addCode("newContextParams = (newContextParams != null) ? newContextParams : $1T.empty();\n"
+ "originalContextParams = originalContextParams != null ? originalContextParams : $1T.empty();",
AttributeMap.class);

customClientConfigParams.forEach((n, m) -> {
String keyName = model.getNamingStrategy().getEnumValueName(n);
builder.addStatement("$1T.validState($2T.equals(originalContextParams.get($3T.$4N), newContextParams.get($3T.$4N)),"
+ " $5S)",
Validate.class, Objects.class, endpointRulesSpecUtils.clientContextParamsName(), keyName,
keyName + " cannot be modified by request level plugins");
});

builder.addStatement("return configuration.build()");
return builder.build();
}
}
Loading

0 comments on commit 4c0949b

Please sign in to comment.