-
Notifications
You must be signed in to change notification settings - Fork 853
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3282 from aws/staging/c5e0a6eb-3c46-4806-a826-a5a…
…5f6cbf5ef Pull request: release <- staging/c5e0a6eb-3c46-4806-a826-a5a5f6cbf5ef
- Loading branch information
Showing
647 changed files
with
11,877 additions
and
2,372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ware/amazon/awssdk/codegen/customization/processors/SmithyRpcV2CborProtocolProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...c/main/java/software/amazon/awssdk/codegen/internal/DefaultProtocolMetadataConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
Oops, something went wrong.