Skip to content

Commit 37e015b

Browse files
authored
Merge branch 'master' into zoewang/reenableCodingConventionTest
2 parents e7f154d + 89e0e75 commit 37e015b

File tree

561 files changed

+5593
-4306
lines changed

Some content is hidden

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

561 files changed

+5593
-4306
lines changed

.changes/2.29.32.json

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"version": "2.29.32",
3+
"date": "2024-12-11",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS Artifact",
8+
"contributor": "",
9+
"description": "Add support for listing active customer agreements for the calling AWS Account."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS CloudTrail",
14+
"contributor": "",
15+
"description": "Doc-only updates for CloudTrail."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS Control Catalog",
20+
"contributor": "",
21+
"description": "Minor documentation updates to the content of ImplementationDetails object part of the Control Catalog GetControl API"
22+
},
23+
{
24+
"type": "feature",
25+
"category": "AWS Migration Hub",
26+
"contributor": "",
27+
"description": "API and documentation updates for AWS MigrationHub related to adding support for listing migration task updates and associating, disassociating and listing source resources"
28+
},
29+
{
30+
"type": "feature",
31+
"category": "Amazon Cognito Identity Provider",
32+
"contributor": "",
33+
"description": "Updated descriptions for some API operations and parameters, corrected some errors in Cognito user pools"
34+
},
35+
{
36+
"type": "feature",
37+
"category": "Amazon Simple Email Service",
38+
"contributor": "",
39+
"description": "Introduces support for multi-region endpoint."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "EMR Serverless",
44+
"contributor": "",
45+
"description": "This release adds support for accessing system profile logs in Lake Formation-enabled jobs."
46+
},
47+
{
48+
"type": "feature",
49+
"category": "Timestream InfluxDB",
50+
"contributor": "",
51+
"description": "Adds networkType parameter to CreateDbInstance API which allows IPv6 support to the InfluxDB endpoint"
52+
},
53+
{
54+
"type": "feature",
55+
"category": "AWS SDK for Java v2",
56+
"contributor": "",
57+
"description": "Updated endpoint and partition metadata."
58+
}
59+
]
60+
}

CHANGELOG.md

+37
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
2+
# __2.29.32__ __2024-12-11__
3+
## __AWS Artifact__
4+
- ### Features
5+
- Add support for listing active customer agreements for the calling AWS Account.
6+
7+
## __AWS CloudTrail__
8+
- ### Features
9+
- Doc-only updates for CloudTrail.
10+
11+
## __AWS Control Catalog__
12+
- ### Features
13+
- Minor documentation updates to the content of ImplementationDetails object part of the Control Catalog GetControl API
14+
15+
## __AWS Migration Hub__
16+
- ### Features
17+
- API and documentation updates for AWS MigrationHub related to adding support for listing migration task updates and associating, disassociating and listing source resources
18+
19+
## __AWS SDK for Java v2__
20+
- ### Features
21+
- Updated endpoint and partition metadata.
22+
23+
## __Amazon Cognito Identity Provider__
24+
- ### Features
25+
- Updated descriptions for some API operations and parameters, corrected some errors in Cognito user pools
26+
27+
## __Amazon Simple Email Service__
28+
- ### Features
29+
- Introduces support for multi-region endpoint.
30+
31+
## __EMR Serverless__
32+
- ### Features
33+
- This release adds support for accessing system profile logs in Lake Formation-enabled jobs.
34+
35+
## __Timestream InfluxDB__
36+
- ### Features
37+
- Adds networkType parameter to CreateDbInstance API which allows IPv6 support to the InfluxDB endpoint
38+
239
# __2.29.31__ __2024-12-10__
340
## __AWS Billing and Cost Management Pricing Calculator__
441
- ### Features

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To automatically manage module versions (currently all modules have the same ver
5151
<dependency>
5252
<groupId>software.amazon.awssdk</groupId>
5353
<artifactId>bom</artifactId>
54-
<version>2.29.31</version>
54+
<version>2.29.32</version>
5555
<type>pom</type>
5656
<scope>import</scope>
5757
</dependency>
@@ -85,12 +85,12 @@ Alternatively you can add dependencies for the specific services you use only:
8585
<dependency>
8686
<groupId>software.amazon.awssdk</groupId>
8787
<artifactId>ec2</artifactId>
88-
<version>2.29.31</version>
88+
<version>2.29.32</version>
8989
</dependency>
9090
<dependency>
9191
<groupId>software.amazon.awssdk</groupId>
9292
<artifactId>s3</artifactId>
93-
<version>2.29.31</version>
93+
<version>2.29.32</version>
9494
</dependency>
9595
```
9696

@@ -102,7 +102,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
102102
<dependency>
103103
<groupId>software.amazon.awssdk</groupId>
104104
<artifactId>aws-sdk-java</artifactId>
105-
<version>2.29.31</version>
105+
<version>2.29.32</version>
106106
</dependency>
107107
```
108108

archetypes/archetype-app-quickstart/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
23+
<version>2.29.33-SNAPSHOT</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/archetype-lambda/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
23+
<version>2.29.33-SNAPSHOT</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetype-lambda</artifactId>

archetypes/archetype-tools/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
23+
<version>2.29.33-SNAPSHOT</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

archetypes/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
23+
<version>2.29.33-SNAPSHOT</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626
<artifactId>archetypes</artifactId>

aws-sdk-java/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
20+
<version>2.29.33-SNAPSHOT</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
23+
<version>2.29.33-SNAPSHOT</version>
2424
</parent>
2525
<modelVersion>4.0.0</modelVersion>
2626

bom/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
20+
<version>2.29.33-SNAPSHOT</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

bundle-logging-bridge/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
24+
<version>2.29.33-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>bundle-logging-bridge</artifactId>
2727
<packaging>jar</packaging>

bundle-sdk/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
24+
<version>2.29.33-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>bundle-sdk</artifactId>
2727
<packaging>jar</packaging>

bundle/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
24+
<version>2.29.33-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>bundle</artifactId>
2727
<packaging>jar</packaging>

codegen-lite-maven-plugin/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
25+
<version>2.29.33-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
24+
<version>2.29.33-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>codegen-lite</artifactId>
2727
<name>AWS Java SDK :: Code Generator Lite</name>

codegen-maven-plugin/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
25+
<version>2.29.33-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-maven-plugin</artifactId>

codegen/pom.xml

+1-1
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.29.32-SNAPSHOT</version>
24+
<version>2.29.33-SNAPSHOT</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

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

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public TypeSpec poetSpec() {
113113
.addMethod(addModifier(sdkFieldNameToFieldMethod(), FINAL))
114114
.addTypes(nestedModelClassTypes());
115115

116+
shapeModelSpec.additionalMethods().forEach(specBuilder::addMethod);
117+
116118
if (shapeModel.isUnion()) {
117119
specBuilder.addField(unionTypeField());
118120
}

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

+39-11
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.squareup.javapoet.ClassName;
1919
import com.squareup.javapoet.CodeBlock;
2020
import com.squareup.javapoet.FieldSpec;
21+
import com.squareup.javapoet.MethodSpec;
2122
import com.squareup.javapoet.ParameterizedTypeName;
2223
import com.squareup.javapoet.WildcardTypeName;
2324
import java.util.ArrayList;
@@ -128,7 +129,7 @@ public Iterable<FieldSpec> staticFields(Modifier... modifiers) {
128129
sdkFieldType),
129130
"SDK_NAME_TO_FIELD",
130131
Modifier.PRIVATE, Modifier.STATIC, Modifier.FINAL)
131-
.initializer(memberNameToFieldInitializer(nameToField))
132+
.initializer(memberNameToFieldInitializer())
132133
.build());
133134
return fields;
134135
}
@@ -150,6 +151,22 @@ private CodeBlock sdkFieldInitializer(MemberModel m) {
150151
.build();
151152
}
152153

154+
public List<MethodSpec> additionalMethods() {
155+
return Collections.singletonList(memberNameToFieldInitializerMethod(nameToField()));
156+
}
157+
158+
public Map<String, String> nameToField() {
159+
Map<String, String> nameToField = new LinkedHashMap<>();
160+
shapeModel.getNonStreamingMembers().stream()
161+
.filter(m -> m.getShape() == null || m.getShape().getShapeType() != ShapeType.Exception)
162+
.filter(m -> !m.isSynthetic())
163+
.forEach(m -> {
164+
String name = m.getHttp().getMarshallLocationName();
165+
nameToField.put(name, namingStrategy.getSdkFieldFieldName(m));
166+
});
167+
return nameToField;
168+
}
169+
153170
private CodeBlock containerSdkFieldInitializer(MemberModel m) {
154171
ClassName sdkFieldType = ClassName.get(SdkField.class);
155172
return CodeBlock.builder()
@@ -392,18 +409,29 @@ private CodeBlock sdkFieldsInitializer(List<FieldSpec> fields) {
392409
return builder.build();
393410
}
394411

395-
private CodeBlock memberNameToFieldInitializer(Map<String, String> nameToField) {
396-
CodeBlock.Builder builder = CodeBlock.builder();
412+
private CodeBlock memberNameToFieldInitializer() {
413+
return CodeBlock.builder()
414+
.add("memberNameToFieldInitializer()")
415+
.build();
416+
}
417+
418+
private MethodSpec memberNameToFieldInitializerMethod(Map<String, String> nameToField) {
419+
ParameterizedTypeName sdkFieldT = ParameterizedTypeName.get(ClassName.get(SdkField.class),
420+
WildcardTypeName.subtypeOf(Object.class));
421+
ParameterizedTypeName mapT = ParameterizedTypeName.get(ClassName.get(Map.class), ClassName.get(String.class),
422+
sdkFieldT);
423+
MethodSpec.Builder builder = MethodSpec.methodBuilder("memberNameToFieldInitializer")
424+
.addModifiers(Modifier.PRIVATE, Modifier.STATIC)
425+
.returns(mapT);
426+
397427
if (nameToField.isEmpty()) {
398-
builder.add("$T.emptyMap()", Collections.class);
399-
return builder.build();
428+
builder.addStatement("return $T.emptyMap()", Collections.class);
429+
} else {
430+
builder.addStatement("$T map = new $T<>()", mapT, HashMap.class);
431+
nameToField.forEach((name, field) -> builder.addStatement("map.put($S, $L)", name, field));
432+
builder.addStatement("return $T.unmodifiableMap(map)", Collections.class);
400433
}
401-
builder.add("$T.unmodifiableMap(", Collections.class);
402-
builder.add("new $T<$T, $T<?>>() {{\n", HashMap.class, String.class, SdkField.class);
403-
nameToField.forEach((name, field) -> builder.add("put($S, $L);\n", name, field));
404-
builder.add("}}");
405-
builder.add(")");
434+
406435
return builder.build();
407436
}
408-
409437
}

0 commit comments

Comments
 (0)