Skip to content

Commit

Permalink
Merge pull request #3282 from aws/staging/c5e0a6eb-3c46-4806-a826-a5a…
Browse files Browse the repository at this point in the history
…5f6cbf5ef

Pull request: release <- staging/c5e0a6eb-3c46-4806-a826-a5a5f6cbf5ef
  • Loading branch information
aws-sdk-java-automation authored Sep 25, 2024
2 parents 555864f + 950b631 commit f614efe
Show file tree
Hide file tree
Showing 647 changed files with 11,877 additions and 2,372 deletions.
1 change: 1 addition & 0 deletions .brazil.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"aws-json-protocol": { "packageName": "AwsJavaSdk-Core-AwsJsonProtocol" },
"aws-query-protocol": { "packageName": "AwsJavaSdk-Core-AwsQueryProtocol" },
"aws-xml-protocol": { "packageName": "AwsJavaSdk-Core-AwsXmlProtocol" },
"smithy-rpcv2-protocol": { "packageName": "AwsJavaSdk-Core-SmithyRpcV2Protocol" },
"cloudwatch-metric-publisher": { "packageName": "AwsJavaSdk-MetricPublisher-CloudWatch" },
"codegen": { "packageName": "AwsJavaSdk-Codegen" },
"dynamodb-enhanced": { "packageName": "AwsJavaSdk-DynamoDb-Enhanced" },
Expand Down
36 changes: 36 additions & 0 deletions .changes/2.28.9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "2.28.9",
"date": "2024-09-25",
"entries": [
{
"type": "feature",
"category": "AWS CloudTrail",
"contributor": "",
"description": "Doc-only update for CloudTrail network activity events release (in preview)"
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "sugmanue",
"description": "Added support for the Smithy RPCv2 CBOR protocol, a new RPC protocol with better performance characteristics than AWS Json."
},
{
"type": "feature",
"category": "Amazon Elastic Compute Cloud",
"contributor": "",
"description": "Updates to documentation for the transit gateway security group referencing feature."
},
{
"type": "feature",
"category": "Amazon FSx",
"contributor": "",
"description": "Doc-only update to address Lustre S3 hard-coded names."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
# __2.28.9__ __2024-09-25__
## __AWS CloudTrail__
- ### Features
- Doc-only update for CloudTrail network activity events release (in preview)

## __AWS SDK for Java v2__
- ### Features
- Added support for the Smithy RPCv2 CBOR protocol, a new RPC protocol with better performance characteristics than AWS Json.
- Contributed by: [@sugmanue](https://github.com/sugmanue)
- Updated endpoint and partition metadata.

## __Amazon Elastic Compute Cloud__
- ### Features
- Updates to documentation for the transit gateway security group referencing feature.

## __Amazon FSx__
- ### Features
- Doc-only update to address Lustre S3 hard-coded names.

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

[@sugmanue](https://github.com/sugmanue)
# __2.28.8__ __2024-09-24__
## __AWS Budgets__
- ### 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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
7 changes: 6 additions & 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.28.8</version>
<version>2.28.9</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down Expand Up @@ -112,6 +112,11 @@
<artifactId>aws-xml-protocol</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>smithy-rpcv2-protocol</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>protocol-core</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</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.28.8</version>
<version>2.28.9</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
7 changes: 6 additions & 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.28.8</version>
<version>2.28.9</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down Expand Up @@ -142,6 +142,11 @@
<artifactId>aws-xml-protocol</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>smithy-rpcv2-protocol</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>protocol-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

package software.amazon.awssdk.codegen;

import static software.amazon.awssdk.codegen.internal.Utils.createInputShapeMarshaller;
import static software.amazon.awssdk.codegen.internal.Utils.createSyntheticInputShapeMarshaller;
import static software.amazon.awssdk.codegen.internal.Utils.unCapitalize;

import java.util.HashMap;
Expand Down Expand Up @@ -75,7 +75,7 @@ private Map<String, ShapeModel> addEmptyInputShapes(
shape.setVariable(inputVariable);

shape.setMarshaller(
createInputShapeMarshaller(serviceModel.getMetadata(), operation));
createSyntheticInputShapeMarshaller(serviceModel.getMetadata(), operation));

emptyInputShapes.put(inputShape, shape);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static CodegenCustomizationProcessor getProcessorFor(
new ShapeSubstitutionsProcessor(config.getShapeSubstitutions()),
new CustomSdkShapesProcessor(config.getCustomSdkShapes()),
new OperationModifiersProcessor(config.getOperationModifiers()),
new SmithyRpcV2CborProtocolProcessor(),
new RemoveExceptionMessagePropertyProcessor(),
new UseLegacyEventGenerationSchemeProcessor(),
new NewAndLegacyEventStreamProcessor(),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package software.amazon.awssdk.codegen.customization.processors;

import software.amazon.awssdk.codegen.customization.CodegenCustomizationProcessor;
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
import software.amazon.awssdk.codegen.model.service.Http;
import software.amazon.awssdk.codegen.model.service.Operation;
import software.amazon.awssdk.codegen.model.service.ServiceModel;
import software.amazon.awssdk.utils.StringUtils;

/**
* This processor only runs for services using the <code>smithy-rpc-v2-cbor</code> protocol.
*
* Adds a request URI that conform to the Smithy RPCv2 protocol to each operation in the model, if there's no URI already
* defined.
*/
public class SmithyRpcV2CborProtocolProcessor implements CodegenCustomizationProcessor {
@Override
public void preprocess(ServiceModel serviceModel) {
if (!"smithy-rpc-v2-cbor".equals(serviceModel.getMetadata().getProtocol())) {
return;
}
serviceModel.getOperations().forEach((name, op) -> setRequestUri(serviceModel, name, op));
}

private void setRequestUri(ServiceModel service, String name, Operation op) {
Http http = op.getHttp();
String requestUri = http.getRequestUri();
if (StringUtils.isNotBlank(requestUri) && !"/".equals(requestUri)) {
return;
}
String uri = String.format("/service/%s/operation/%s", service.getMetadata().getTargetPrefix(), op.getName());
op.getHttp().setRequestUri(uri);
}

@Override
public void postprocess(IntermediateModel intermediateModel) {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package software.amazon.awssdk.codegen.internal;

import java.util.AbstractMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import software.amazon.awssdk.protocols.core.OperationMetadataAttribute;
import software.amazon.awssdk.utils.AttributeMap;

/**
* Default implementation of {@link ProtocolMetadataConstants}.
*/
public final class DefaultProtocolMetadataConstants implements ProtocolMetadataConstants {
private final Set<Map.Entry<Class<?>, OperationMetadataAttribute<?>>> knownKeys = new LinkedHashSet<>();
private final AttributeMap.Builder map = AttributeMap.builder();

@Override
public List<Map.Entry<Class<?>, OperationMetadataAttribute<?>>> keys() {
return knownKeys.stream().filter(x -> map.get(x.getValue()) != null).collect(Collectors.toList());
}

@Override
public <T> T put(Class<?> containingClass, OperationMetadataAttribute<T> key, T value) {
knownKeys.add(new AbstractMap.SimpleEntry<>(containingClass, key));
T oldValue = map.get(key);
map.put(key, value);
return oldValue;
}

@Override
public <T> T get(OperationMetadataAttribute<T> key) {
return map.get(key);
}
}
Loading

0 comments on commit f614efe

Please sign in to comment.