Skip to content

Commit 7a81e26

Browse files
Merge pull request #2280 from aws/staging/b3e668e3-c8f1-4850-936e-abf487d18d85
Pull request: release <- staging/b3e668e3-c8f1-4850-936e-abf487d18d85
2 parents 6e9a2a3 + d6f3f18 commit 7a81e26

File tree

474 files changed

+7229
-756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

474 files changed

+7229
-756
lines changed

.changes/2.18.33.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "2.18.33",
3+
"date": "2022-12-07",
4+
"entries": [
5+
{
6+
"type": "bugfix",
7+
"category": "Amazon S3",
8+
"contributor": "",
9+
"description": "S3 query param validation\n\nThe SDK will raise SdkClientException when a null value is set for a member marked with the required trait."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS Cost Explorer Service",
14+
"contributor": "",
15+
"description": "This release adds the LinkedAccountName field to the GetAnomalies API response under RootCause"
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS Key Management Service",
20+
"contributor": "",
21+
"description": "Updated examples and exceptions for External Key Store (XKS)."
22+
},
23+
{
24+
"type": "feature",
25+
"category": "AWS SDK for Java v2",
26+
"contributor": "",
27+
"description": "Adding utilities for signing CloudFront URLs and cookies"
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon CloudFront",
32+
"contributor": "",
33+
"description": "Introducing UpdateDistributionWithStagingConfig that can be used to promote the staging configuration to the production."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "Amazon Elastic Kubernetes Service",
38+
"contributor": "",
39+
"description": "Adds support for EKS add-ons configurationValues fields and DescribeAddonConfiguration function"
40+
},
41+
{
42+
"type": "feature",
43+
"category": "AWS SDK for Java v2",
44+
"contributor": "",
45+
"description": "Updated endpoint and partition metadata."
46+
}
47+
]
48+
}

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# __2.18.33__ __2022-12-07__
2+
## __AWS Cost Explorer Service__
3+
- ### Features
4+
- This release adds the LinkedAccountName field to the GetAnomalies API response under RootCause
5+
6+
## __AWS Key Management Service__
7+
- ### Features
8+
- Updated examples and exceptions for External Key Store (XKS).
9+
10+
## __AWS SDK for Java v2__
11+
- ### Features
12+
- Adding utilities for signing CloudFront URLs and cookies
13+
- Updated endpoint and partition metadata.
14+
15+
## __Amazon CloudFront__
16+
- ### Features
17+
- Introducing UpdateDistributionWithStagingConfig that can be used to promote the staging configuration to the production.
18+
19+
## __Amazon Elastic Kubernetes Service__
20+
- ### Features
21+
- Adds support for EKS add-ons configurationValues fields and DescribeAddonConfiguration function
22+
23+
## __Amazon S3__
24+
- ### Bugfixes
25+
- S3 query param validation
26+
27+
The SDK will raise SdkClientException when a null value is set for a member marked with the required trait.
28+
129
# __2.18.32__ __2022-12-06__
230
## __AWS SDK for Java v2__
331
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
5252
<dependency>
5353
<groupId>software.amazon.awssdk</groupId>
5454
<artifactId>bom</artifactId>
55-
<version>2.18.32</version>
55+
<version>2.18.33</version>
5656
<type>pom</type>
5757
<scope>import</scope>
5858
</dependency>
@@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
8686
<dependency>
8787
<groupId>software.amazon.awssdk</groupId>
8888
<artifactId>ec2</artifactId>
89-
<version>2.18.32</version>
89+
<version>2.18.33</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.18.32</version>
94+
<version>2.18.33</version>
9595
</dependency>
9696
```
9797

@@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
103103
<dependency>
104104
<groupId>software.amazon.awssdk</groupId>
105105
<artifactId>aws-sdk-java</artifactId>
106-
<version>2.18.32</version>
106+
<version>2.18.33</version>
107107
</dependency>
108108
```
109109

archetypes/archetype-app-quickstart/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.18.32</version>
23+
<version>2.18.33</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.18.32</version>
23+
<version>2.18.33</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>archetypes</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.18.32</version>
23+
<version>2.18.33</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.18.32</version>
23+
<version>2.18.33</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.18.32</version>
20+
<version>2.18.33</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<artifactId>aws-sdk-java-pom</artifactId>
2222
<groupId>software.amazon.awssdk</groupId>
23-
<version>2.18.32</version>
23+
<version>2.18.33</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>software.amazon.awssdk</groupId>
1919
<artifactId>aws-sdk-java-pom</artifactId>
20-
<version>2.18.32</version>
20+
<version>2.18.33</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

buildspecs/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ phases:
77

88
build:
99
commands:
10-
- mvn clean install -T1C
10+
- mvn clean install -T1C $MAVEN_OPTIONS
1111
- JAVA_VERSION=$(java -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1-1)
1212
- echo $JAVA_VERSION
13+
- echo $MAVEN_OPTIONS
1314
- |
1415
if [ "$JAVA_VERSION" -ge "9" ]; then
1516
cd test/module-path-tests

buildspecs/integ-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ phases:
1515
AWS_SESSION_TOKEN=`echo $ASSUME_ROLE_OUTPUT | awk '{ print $3 }'`
1616
echo "Using role $INTEGRATION_TEST_ROLE_ARN with access key $AWS_ACCESS_KEY_ID."
1717
fi
18-
- mvn clean install -Dskip.unit.tests -P integration-tests -Dfindbugs.skip -Dcheckstyle.skip -T1C
18+
- mvn clean install -Dskip.unit.tests -P integration-tests -Dfindbugs.skip -Dcheckstyle.skip -T1C $MAVEN_OPTIONS
1919
- JAVA_VERSION=$(java -version 2>&1 | grep -i version | cut -d'"' -f2 | cut -d'.' -f1-1)
2020
- echo $JAVA_VERSION
21+
- echo $MAVEN_OPTIONS
2122
- |
2223
if [ "$JAVA_VERSION" -ge "9" ]; then
2324
cd test/module-path-tests

buildspecs/stability-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ phases:
77

88
build:
99
commands:
10-
- mvn clean install -P stability-tests -pl :stability-tests --am
10+
- mvn clean install -P stability-tests -pl :stability-tests --am $MAVEN_OPTIONS
11+
- echo $MAVEN_OPTIONS
1112
finally:
1213
- mkdir -p codebuild-test-reports
1314
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;

bundle/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.18.32</version>
24+
<version>2.18.33</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.18.32</version>
25+
<version>2.18.33</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.18.32</version>
24+
<version>2.18.33</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>software.amazon.awssdk</groupId>
2424
<artifactId>aws-sdk-java-pom</artifactId>
25-
<version>2.18.32</version>
25+
<version>2.18.33</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<parent>
2222
<groupId>software.amazon.awssdk</groupId>
2323
<artifactId>aws-sdk-java-pom</artifactId>
24-
<version>2.18.32</version>
24+
<version>2.18.33</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

codegen/src/main/java/software/amazon/awssdk/codegen/AddShapes.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import java.util.List;
2525
import java.util.Map;
26+
import java.util.Optional;
2627
import software.amazon.awssdk.codegen.internal.TypeUtils;
2728
import software.amazon.awssdk.codegen.model.config.customization.CustomizationConfig;
2829
import software.amazon.awssdk.codegen.model.intermediate.EnumModel;
@@ -192,6 +193,7 @@ private MemberModel generateMemberModel(String c2jMemberName, Member c2jMemberDe
192193
memberModel.setXmlAttribute(c2jMemberDefinition.isXmlAttribute());
193194
memberModel.setUnionEnumTypeName(namingStrategy.getUnionEnumTypeName(memberModel));
194195
memberModel.setContextParam(c2jMemberDefinition.getContextParam());
196+
memberModel.setRequired(isRequiredMember(c2jMemberName, parentShape));
195197

196198

197199
// Pass the xmlNameSpace from the member reference
@@ -309,6 +311,12 @@ private boolean isFlattened(Member member, Shape memberShape) {
309311
|| memberShape.isFlattened();
310312
}
311313

314+
private boolean isRequiredMember(String memberName, Shape memberShape) {
315+
return Optional.ofNullable(memberShape.getRequired())
316+
.map(l -> l.contains(memberName))
317+
.orElse(false);
318+
}
319+
312320
/**
313321
* @param parentShape Shape containing the member in question.
314322
* @param allC2jShapes All shapes in the service model.

codegen/src/main/java/software/amazon/awssdk/codegen/model/config/customization/CustomizationConfig.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,11 @@ public class CustomizationConfig {
215215

216216
private List<String> interceptors = new ArrayList<>();
217217

218+
/**
219+
* Whether marshallers perform validations against members marked with RequiredTrait.
220+
*/
221+
private boolean requiredTraitValidationEnabled = false;
222+
218223
private CustomizationConfig() {
219224
}
220225

@@ -559,4 +564,12 @@ public List<String> getInterceptors() {
559564
public void setInterceptors(List<String> interceptors) {
560565
this.interceptors = interceptors;
561566
}
567+
568+
public boolean isRequiredTraitValidationEnabled() {
569+
return requiredTraitValidationEnabled;
570+
}
571+
572+
public void setRequiredTraitValidationEnabled(boolean requiredTraitValidationEnabled) {
573+
this.requiredTraitValidationEnabled = requiredTraitValidationEnabled;
574+
}
562575
}

codegen/src/main/java/software/amazon/awssdk/codegen/model/intermediate/MemberModel.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ public class MemberModel extends DocumentationModel {
5959

6060
private String deprecatedMessage;
6161

62+
private boolean required;
63+
6264
private ListModel listModel;
6365

6466
private MapModel mapModel;
@@ -316,6 +318,14 @@ public void setDeprecatedMessage(String deprecatedMessage) {
316318
this.deprecatedMessage = deprecatedMessage;
317319
}
318320

321+
public boolean isRequired() {
322+
return required;
323+
}
324+
325+
public void setRequired(boolean required) {
326+
this.required = required;
327+
}
328+
319329
public boolean isEventPayload() {
320330
return eventPayload;
321331
}

codegen/src/main/java/software/amazon/awssdk/codegen/poet/model/ShapeModelSpec.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import software.amazon.awssdk.core.traits.LocationTrait;
4646
import software.amazon.awssdk.core.traits.MapTrait;
4747
import software.amazon.awssdk.core.traits.PayloadTrait;
48+
import software.amazon.awssdk.core.traits.RequiredTrait;
4849
import software.amazon.awssdk.core.traits.TimestampFormatTrait;
4950
import software.amazon.awssdk.core.traits.XmlAttributeTrait;
5051
import software.amazon.awssdk.core.traits.XmlAttributesTrait;
@@ -184,6 +185,9 @@ private CodeBlock traits(MemberModel m) {
184185
if (m.isXmlAttribute()) {
185186
traits.add(createXmlAttributeTrait());
186187
}
188+
if (customizationConfig.isRequiredTraitValidationEnabled() && m.isRequired()) {
189+
traits.add(createRequiredTrait());
190+
}
187191

188192
if (!traits.isEmpty()) {
189193
return CodeBlock.builder()
@@ -268,6 +272,12 @@ private CodeBlock createPayloadTrait() {
268272
.build();
269273
}
270274

275+
private CodeBlock createRequiredTrait() {
276+
return CodeBlock.builder()
277+
.add("$T.create()", ClassName.get(RequiredTrait.class))
278+
.build();
279+
}
280+
271281
private CodeBlock createMapTrait(MemberModel m) {
272282
return CodeBlock.builder()
273283
.add("$T.builder()\n"
@@ -306,7 +316,7 @@ private CodeBlock createXmlAttributesTrait(MemberModel model) {
306316
String uri = xmlNamespace.getUri();
307317
String prefix = xmlNamespace.getPrefix();
308318
CodeBlock.Builder codeBlockBuilder = CodeBlock.builder()
309-
.add("$T.create(", ClassName.get(XmlAttributesTrait.class));
319+
.add("$T.create(", ClassName.get(XmlAttributesTrait.class));
310320

311321
String namespacePrefix = "xmlns:" + prefix;
312322
codeBlockBuilder.add("$T.of($S, $T.builder().attributeGetter((ignore) -> $S).build())",

0 commit comments

Comments
 (0)