Skip to content

Commit

Permalink
Merge pull request #3033 from aws/staging/6a0e079b-f6a4-43c6-bfd8-2ff…
Browse files Browse the repository at this point in the history
…6657017b9

Pull request: release <- staging/6a0e079b-f6a4-43c6-bfd8-2ff6657017b9
  • Loading branch information
aws-sdk-java-automation committed May 13, 2024
2 parents 64f2c10 + b6b7ab4 commit a6e7d1d
Show file tree
Hide file tree
Showing 528 changed files with 3,527 additions and 1,166 deletions.
30 changes: 30 additions & 0 deletions .changes/2.25.51.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "2.25.51",
"date": "2024-05-13",
"entries": [
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Adds capability to resolve endpoint and auth scheme parameters of type list of string as well as new functions to JmesPath runtime (keys and wildcard)"
},
{
"type": "feature",
"category": "Amazon EventBridge",
"contributor": "",
"description": "Amazon EventBridge introduces KMS customer-managed key (CMK) encryption support for custom and partner events published on EventBridge Event Bus (including default bus) and UpdateEventBus API."
},
{
"type": "feature",
"category": "Amazon VPC Lattice",
"contributor": "",
"description": "This release adds TLS Passthrough support. It also increases max number of target group per rule to 10."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
# __2.25.51__ __2024-05-13__
## __AWS SDK for Java v2__
- ### Features
- Adds capability to resolve endpoint and auth scheme parameters of type list of string as well as new functions to JmesPath runtime (keys and wildcard)
- Updated endpoint and partition metadata.

## __Amazon EventBridge__
- ### Features
- Amazon EventBridge introduces KMS customer-managed key (CMK) encryption support for custom and partner events published on EventBridge Event Bus (including default bus) and UpdateEventBus API.

## __Amazon VPC Lattice__
- ### Features
- This release adds TLS Passthrough support. It also increases max number of target group per rule to 10.

# __2.25.50__ __2024-05-10__
## __AWS Application Discovery Service__
- ### Features
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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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.25.50</version>
<version>2.25.51</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 @@ -104,7 +104,8 @@ private static void configurePackageName(Metadata metadata,
.withPaginatorsPackageName(namingStrategy.getPaginatorsPackageName(service))
.withWaitersPackageName(namingStrategy.getWaitersPackageName(service))
.withEndpointRulesPackageName(namingStrategy.getEndpointRulesPackageName(service))
.withAuthSchemePackageName(namingStrategy.getAuthSchemePackageName(service));
.withAuthSchemePackageName(namingStrategy.getAuthSchemePackageName(service))
.withJmesPathPackageName(namingStrategy.getJmesPathPackageName(service));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ public Map<String, OperationModel> constructOperations() {
operationModel.setHttpChecksum(op.getHttpChecksum());
operationModel.setRequestcompression(op.getRequestcompression());
operationModel.setStaticContextParams(op.getStaticContextParams());
operationModel.setOperationContextParams(op.getOperationContextParams());
operationModel.setAuth(getAuthFromOperation(op));

Input input = op.getInput();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import software.amazon.awssdk.codegen.model.intermediate.ShapeModel;
import software.amazon.awssdk.codegen.model.rules.endpoints.EndpointTestSuiteModel;
import software.amazon.awssdk.codegen.model.service.AuthType;
import software.amazon.awssdk.codegen.model.service.CustomOperationContextParam;
import software.amazon.awssdk.codegen.model.service.EndpointRuleSetModel;
import software.amazon.awssdk.codegen.model.service.Operation;
import software.amazon.awssdk.codegen.model.service.Paginators;
Expand Down Expand Up @@ -167,10 +168,43 @@ public IntermediateModel build() {
setSimpleMethods(trimmedModel);

namingStrategy.validateCustomerVisibleNaming(trimmedModel);

customizeEndpointParameters(fullModel, endpointRuleSet);
customizeOperationContextParams(trimmedModel, fullModel.getCustomizationConfig().getCustomOperationContextParams());
return trimmedModel;
}

private static void customizeOperationContextParams(IntermediateModel trimmedModel,
List<CustomOperationContextParam> customOperationContextParams) {

if (CollectionUtils.isNullOrEmpty(customOperationContextParams)) {
return;
}
customOperationContextParams.forEach(customOperationContextParam -> {
String operationName = customOperationContextParam.getOperationName();
OperationModel operation = trimmedModel.getOperation(operationName);
if (operation == null) {
throw new IllegalStateException(
"Could not find operation " + operationName + " to customize Operation Context Params.");
}
if (operation.getOperationContextParams() != null) {
throw new IllegalStateException(
"Cannot customize operation " + operationName + " which already has OperationContextParams.");
}
operation.setOperationContextParams(customOperationContextParam.getOperationContextParamsMap());
});
}

private void customizeEndpointParameters(IntermediateModel fullModel, EndpointRuleSetModel endpointRuleSet) {
if (fullModel.getCustomizationConfig().getEndpointParameters() != null) {
fullModel.getCustomizationConfig().getEndpointParameters().keySet().forEach(key -> {
if (endpointRuleSet.getParameters().containsKey(key)) {
throw new IllegalStateException("Duplicate parameters found in customizationConfig");
}
});
fullModel.getCustomizationConfig().getEndpointParameters().forEach(endpointRuleSet.getParameters()::put);
}
}

/**
* Link the member to it's corresponding shape (if it exists).
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ public String getAuthSchemeInternalDirectory() {
return sourceDirectory + "/" + Utils.packageToDirectory(model.getMetadata().getFullInternalAuthSchemePackageName());
}

public String getJmesPathInternalDirectory() {
return sourceDirectory + "/" + Utils.packageToDirectory(model.getMetadata().getFullInternalJmesPathPackageName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import software.amazon.awssdk.codegen.emitters.GeneratorTask;
import software.amazon.awssdk.codegen.emitters.GeneratorTaskParams;
import software.amazon.awssdk.codegen.emitters.PoetGeneratorTask;
import software.amazon.awssdk.codegen.model.config.customization.CustomizationConfig;
import software.amazon.awssdk.codegen.model.rules.endpoints.ParameterModel;
import software.amazon.awssdk.codegen.model.service.ClientContextParam;
import software.amazon.awssdk.codegen.poet.rules.ClientContextParamsClassSpec;
import software.amazon.awssdk.codegen.poet.rules.DefaultPartitionDataProviderSpec;
Expand Down Expand Up @@ -57,6 +59,9 @@ protected List<GeneratorTask> createTasks() throws Exception {
tasks.add(generateDefaultProvider());
tasks.add(new RulesEngineRuntimeGeneratorTask(generatorTaskParams));
}
if (shouldGenerateJmesPathRuntime()) {
tasks.add(new JmesPathRuntimeGeneratorTask(generatorTaskParams));
}
tasks.addAll(generateInterceptors());
if (shouldGenerateEndpointTests()) {
tasks.add(generateProviderTests());
Expand Down Expand Up @@ -149,4 +154,27 @@ private boolean hasClientContextParams() {
(customClientContextParams != null && !customClientContextParams.isEmpty());
}

private boolean shouldGenerateJmesPathRuntime() {
boolean isAlreadyGenerated = model.hasWaiters();
if (isAlreadyGenerated) {
return true;
}

Map<String, ParameterModel> endpointParameters = model.getCustomizationConfig().getEndpointParameters();
if (endpointParameters == null) {
return false;
}

return endpointParameters.values().stream().anyMatch(this::paramRequiresPathParserRuntime);
}

private boolean paramRequiresPathParserRuntime(ParameterModel parameterModel) {
return paramIsOperationalContextParam(parameterModel) &&
"stringarray".equals(parameterModel.getType().toLowerCase(Locale.US));
}

//TODO (string-array-params): resolve this logical test before finalizing coding
private boolean paramIsOperationalContextParam(ParameterModel parameterModel) {
return true;
}
}

0 comments on commit a6e7d1d

Please sign in to comment.