Skip to content

Commit

Permalink
Merge pull request #3401 from aws/staging/b8ce982a-2b35-49fd-8eda-9bd…
Browse files Browse the repository at this point in the history
…280009a15

Pull request: release <- staging/b8ce982a-2b35-49fd-8eda-9bd280009a15
  • Loading branch information
aws-sdk-java-automation authored Oct 31, 2024
2 parents 220d741 + 465330b commit 007e11c
Show file tree
Hide file tree
Showing 516 changed files with 3,677 additions and 2,332 deletions.
60 changes: 60 additions & 0 deletions .changes/2.29.5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"version": "2.29.5",
"date": "2024-10-31",
"entries": [
{
"type": "bugfix",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Fix an issue where the SDK does not properly unmarshall an evenstream exception to the expected exception type."
},
{
"type": "feature",
"category": "AWS Batch",
"contributor": "",
"description": "Add `podNamespace` to `EksAttemptDetail` and `containerID` to `EksAttemptContainerDetail`."
},
{
"type": "feature",
"category": "AWS Glue",
"contributor": "",
"description": "Add schedule support for AWS Glue column statistics"
},
{
"type": "feature",
"category": "Amazon Prometheus Service",
"contributor": "",
"description": "Added support for UpdateScraper API, to enable updating collector configuration in-place"
},
{
"type": "feature",
"category": "Amazon SageMaker Service",
"contributor": "",
"description": "SageMaker HyperPod adds scale-down at instance level via BatchDeleteClusterNodes API and group level via UpdateCluster API. SageMaker Training exposes secondary job status in TrainingJobSummary from ListTrainingJobs API. SageMaker now supports G6, G6e, P5e instances for HyperPod and Training."
},
{
"type": "feature",
"category": "Amazon Simple Email Service",
"contributor": "",
"description": "This release enables customers to provide the email template content in the SESv2 SendEmail and SendBulkEmail APIs instead of the name or the ARN of a stored email template."
},
{
"type": "feature",
"category": "Auto Scaling",
"contributor": "",
"description": "Adds bake time for Auto Scaling group Instance Refresh"
},
{
"type": "feature",
"category": "Elastic Load Balancing",
"contributor": "",
"description": "Add UDP support for AWS PrivateLink and dual-stack Network Load Balancers"
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
# __2.29.5__ __2024-10-31__
## __AWS Batch__
- ### Features
- Add `podNamespace` to `EksAttemptDetail` and `containerID` to `EksAttemptContainerDetail`.

## __AWS Glue__
- ### Features
- Add schedule support for AWS Glue column statistics

## __AWS SDK for Java v2__
- ### Features
- Updated endpoint and partition metadata.

- ### Bugfixes
- Fix an issue where the SDK does not properly unmarshall an evenstream exception to the expected exception type.

## __Amazon Prometheus Service__
- ### Features
- Added support for UpdateScraper API, to enable updating collector configuration in-place

## __Amazon SageMaker Service__
- ### Features
- SageMaker HyperPod adds scale-down at instance level via BatchDeleteClusterNodes API and group level via UpdateCluster API. SageMaker Training exposes secondary job status in TrainingJobSummary from ListTrainingJobs API. SageMaker now supports G6, G6e, P5e instances for HyperPod and Training.

## __Amazon Simple Email Service__
- ### Features
- This release enables customers to provide the email template content in the SESv2 SendEmail and SendBulkEmail APIs instead of the name or the ARN of a stored email template.

## __Auto Scaling__
- ### Features
- Adds bake time for Auto Scaling group Instance Refresh

## __Elastic Load Balancing__
- ### Features
- Add UDP support for AWS PrivateLink and dual-stack Network Load Balancers

# __2.29.4__ __2024-10-30__
## __AWS AppSync__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.29.4</version>
<version>2.29.5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -85,12 +85,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.29.4</version>
<version>2.29.5</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.29.4</version>
<version>2.29.5</version>
</dependency>
```

Expand All @@ -102,7 +102,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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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.29.4</version>
<version>2.29.5</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 @@ -18,13 +18,13 @@
import com.fasterxml.jackson.core.TreeNode;

public class OperationContextParam {
private TreeNode value;
private TreeNode path;

public TreeNode getValue() {
return value;
public TreeNode getPath() {
return path;
}

public void setValue(TreeNode value) {
this.value = value;
public void setPath(TreeNode path) {
this.path = path;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ protected void addAdditionalMethods(TypeSpec.Builder type) {
type.addMethod(ClientClassUtils.updateRetryStrategyClientConfigurationMethod());
type.addMethod(updateSdkClientConfigurationMethod(configurationUtils.serviceClientConfigurationBuilderClassName()));
protocolSpec.createErrorResponseHandler().ifPresent(type::addMethod);
protocolSpec.createEventstreamErrorResponseHandler().ifPresent(type::addMethod);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.squareup.javapoet.WildcardTypeName;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import javax.lang.model.element.Modifier;
import software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer;
import software.amazon.awssdk.awscore.eventstream.EventStreamTaggedUnionPojoSupplier;
Expand Down Expand Up @@ -55,6 +56,7 @@
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.protocol.VoidSdkResponse;
import software.amazon.awssdk.protocols.cbor.AwsCborProtocolFactory;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
Expand Down Expand Up @@ -238,7 +240,7 @@ public CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, Oper
.add(".eventStreamResponseHandler(asyncResponseHandler)\n")
.add(".eventResponseHandler(eventResponseHandler)\n")
.add(".initialResponseHandler(responseHandler)\n")
.add(".exceptionResponseHandler(errorResponseHandler)\n")
.add(".exceptionResponseHandler(errorEventResponseHandler)\n")
.add(".future(future)\n")
.add(".executor(executor)\n")
.add(".serviceName(serviceName())\n")
Expand Down Expand Up @@ -419,6 +421,25 @@ public Optional<MethodSpec> createErrorResponseHandler() {
.build());
}

@Override
public Optional<MethodSpec> createEventstreamErrorResponseHandler() {
ClassName httpResponseHandler = ClassName.get(HttpResponseHandler.class);
ClassName sdkBaseException = ClassName.get(AwsServiceException.class);
TypeName responseHandlerOfException = ParameterizedTypeName.get(httpResponseHandler, sdkBaseException);
ParameterizedTypeName mapperType = ParameterizedTypeName.get(ClassName.get(Function.class),
ClassName.get(String.class), ParameterizedTypeName.get(Optional.class, ExceptionMetadata.class));

return Optional.of(MethodSpec.methodBuilder("createErrorResponseHandler")
.addParameter(BaseAwsJsonProtocolFactory.class, "protocolFactory")
.addParameter(JsonOperationMetadata.class, "operationMetadata")
.addParameter(mapperType, "exceptionMetadataMapper")
.returns(responseHandlerOfException)
.addModifiers(Modifier.PRIVATE)
.addStatement("return protocolFactory.createErrorResponseHandler(operationMetadata, "
+ "exceptionMetadataMapper)")
.build());
}

private String protocolEnumName(software.amazon.awssdk.codegen.model.intermediate.Protocol protocol) {
switch (protocol) {
case CBOR:
Expand Down Expand Up @@ -480,6 +501,37 @@ private void responseHandlersForEventStreaming(OperationModel opModel, TypeName
});
builder.add(".defaultSdkPojoSupplier(() -> new $T($T.UNKNOWN))\n"
+ ".build());\n", SdkPojoBuilder.class, eventStreamBaseClass);

ParameterizedTypeName metadataMapperType = ParameterizedTypeName.get(
ClassName.get(Function.class),
ClassName.get(String.class),
ParameterizedTypeName.get(Optional.class, ExceptionMetadata.class));

builder.add("\n");
builder.add("$T eventstreamExceptionMetadataMapper = errorCode -> {\n", metadataMapperType);
builder.add("switch (errorCode) {\n");
EventStreamUtils.getErrorMembers(eventStream).forEach(m -> {
String errorCode = m.getC2jName();
builder.add("case $S:\n", errorCode);
builder.add("return $T.of($T.builder()", Optional.class, ExceptionMetadata.class);
builder.add(".errorCode($S)", m.getShape().getErrorCode());
builder.add(populateHttpStatusCode(m.getShape(), model));
builder.add(".exceptionBuilderSupplier($T::builder).build());\n",
poetExtensions.getModelClassFromShape(m.getShape()));
});
builder.add("default: return $T.empty();", Optional.class);
builder.add("}\n");
builder.add("};\n");

ParameterizedTypeName errorResponseHandlerType = ParameterizedTypeName.get(HttpResponseHandler.class,
AwsServiceException.class);

builder.add("\n");
builder.addStatement("$T errorEventResponseHandler = createErrorResponseHandler($N, operationMetadata, "
+ "eventstreamExceptionMetadataMapper)",
errorResponseHandlerType,
protocolFactoryLiteral(model, opModel));

}

private String protocolFactoryLiteral(IntermediateModel model, OperationModel opModel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ default Class<? extends SyncClientHandler> getClientHandlerClass() {

Optional<MethodSpec> createErrorResponseHandler();

default Optional<MethodSpec> createEventstreamErrorResponseHandler() {
return Optional.empty();
}

default List<MethodSpec> additionalMethods() {
return new ArrayList<>();
}
Expand Down
Loading

0 comments on commit 007e11c

Please sign in to comment.