Skip to content

Commit 6ff41cb

Browse files
Merge pull request #1974 from aws/staging/73f1806e-8a55-47f9-82f0-38cad6539c58
Pull request: release <- staging/73f1806e-8a55-47f9-82f0-38cad6539c58
2 parents 8aabc0c + 4f76c4f commit 6ff41cb

File tree

398 files changed

+6335
-961
lines changed

Some content is hidden

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

398 files changed

+6335
-961
lines changed

.changes/2.17.159.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"version": "2.17.159",
3+
"date": "2022-03-29",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "AWS SDK for Java v2",
8+
"contributor": "",
9+
"description": "Include SDK user-agent in container credential provider calls."
10+
},
11+
{
12+
"type": "feature",
13+
"category": "AWS SDK for Java v2",
14+
"contributor": "",
15+
"description": "Use the client's profile file and name for instance profile credentials when the default credentials provider is not overridden."
16+
},
17+
{
18+
"type": "feature",
19+
"category": "AWS SDK for Java v2",
20+
"contributor": "",
21+
"description": "Improve resilience of instance profile credentials provider to short-term outages. Credentials that are close to expiration or expired can still be used to sign calls when the instance metadata service appears to be having issues. Services are now responsible for determining whether the credentials have actually expired."
22+
},
23+
{
24+
"type": "bugfix",
25+
"category": "AWS SDK for Java v2",
26+
"contributor": "",
27+
"description": "Moved HttpCredentialsProvider (base class of ContainerCredentialsProvider and InstanceProfileCredentialsProvider) from private to public. This fixes an issue where public classes extended an internal class. Some components of this type were modified to allow it to be public."
28+
},
29+
{
30+
"type": "feature",
31+
"category": "AWS SDK for Java v2",
32+
"contributor": "",
33+
"description": "Allow services to model structures with mutually exclusive fields (union types). Such structures have additional static constructors and the ability to query for which field is populated. Services which support this feature at launch: accessanalyzer, appconfig, appconfigdata, appmesh, connect, emrcontainers, evidently, grafana, groundstation, healthlake, inspector2, iottwinmaker, migrationhubstrategy, nimble, panorama, proton, rdsdata, redshiftdata, s3control, snowdevicemanagement, ssmincidents, transcribe, wisdom."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "AWS SDK for Java v2",
38+
"contributor": "",
39+
"description": "Allow specifying the profile file and name used by the instance profile credentials provider."
40+
},
41+
{
42+
"type": "feature",
43+
"category": "AWS Organizations",
44+
"contributor": "",
45+
"description": "This release provides the new CloseAccount API that enables principals in the management account to close any member account within an organization."
46+
}
47+
]
48+
}

.idea/inspectionProfiles/AWS_Java_SDK_2_0.xml

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# __2.17.159__ __2022-03-29__
2+
## __AWS Organizations__
3+
- ### Features
4+
- This release provides the new CloseAccount API that enables principals in the management account to close any member account within an organization.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- Allow services to model structures with mutually exclusive fields (union types). Such structures have additional static constructors and the ability to query for which field is populated. Services which support this feature at launch: accessanalyzer, appconfig, appconfigdata, appmesh, connect, emrcontainers, evidently, grafana, groundstation, healthlake, inspector2, iottwinmaker, migrationhubstrategy, nimble, panorama, proton, rdsdata, redshiftdata, s3control, snowdevicemanagement, ssmincidents, transcribe, wisdom.
9+
- Allow specifying the profile file and name used by the instance profile credentials provider.
10+
- Improve resilience of instance profile credentials provider to short-term outages. Credentials that are close to expiration or expired can still be used to sign calls when the instance metadata service appears to be having issues. Services are now responsible for determining whether the credentials have actually expired.
11+
- Include SDK user-agent in container credential provider calls.
12+
- Use the client's profile file and name for instance profile credentials when the default credentials provider is not overridden.
13+
14+
- ### Bugfixes
15+
- Moved HttpCredentialsProvider (base class of ContainerCredentialsProvider and InstanceProfileCredentialsProvider) from private to public. This fixes an issue where public classes extended an internal class. Some components of this type were modified to allow it to be public.
16+
117
# __2.17.158__ __2022-03-28__
218
## __AWS Certificate Manager Private Certificate Authority__
319
- ### 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.17.158</version>
55+
<version>2.17.159</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.17.158</version>
89+
<version>2.17.159</version>
9090
</dependency>
9191
<dependency>
9292
<groupId>software.amazon.awssdk</groupId>
9393
<artifactId>s3</artifactId>
94-
<version>2.17.158</version>
94+
<version>2.17.159</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.17.158</version>
106+
<version>2.17.159</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.17.158</version>
23+
<version>2.17.159</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.17.158</version>
23+
<version>2.17.159</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.17.158</version>
23+
<version>2.17.159</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.17.158</version>
23+
<version>2.17.159</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.17.158</version>
20+
<version>2.17.159</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.17.158</version>
23+
<version>2.17.159</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.17.158</version>
20+
<version>2.17.159</version>
2121
<relativePath>../pom.xml</relativePath>
2222
</parent>
2323
<artifactId>bom</artifactId>

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.17.158</version>
24+
<version>2.17.159</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.17.158</version>
25+
<version>2.17.159</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.17.158</version>
24+
<version>2.17.159</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.17.158</version>
25+
<version>2.17.159</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.17.158</version>
24+
<version>2.17.159</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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ protected final ShapeModel generateShapeModel(String javaClassName, String shape
8484
shapeModel.withIsEventStream(shape.isEventstream());
8585
shapeModel.withIsEvent(shape.isEvent());
8686
shapeModel.withXmlNamespace(shape.getXmlNamespace());
87+
shapeModel.withIsUnion(shape.isUnion());
8788

8889
boolean hasHeaderMember = false;
8990
boolean hasStatusCodeMember = false;
@@ -188,6 +189,8 @@ private MemberModel generateMemberModel(String c2jMemberName, Member c2jMemberDe
188189
memberModel.setEventHeader(c2jMemberDefinition.isEventheader());
189190
memberModel.setEndpointDiscoveryId(c2jMemberDefinition.isEndpointdiscoveryid());
190191
memberModel.setXmlAttribute(c2jMemberDefinition.isXmlAttribute());
192+
memberModel.setUnionEnumTypeName(namingStrategy.getUnionEnumTypeName(memberModel));
193+
191194

192195
// Pass the xmlNameSpace from the member reference
193196
if (c2jMemberDefinition.getXmlNamespace() != null) {

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public class MemberModel extends DocumentationModel {
8484

8585
private String beanStyleSetterName;
8686

87+
private String unionEnumTypeName;
88+
8789
private boolean isJsonValue;
8890

8991
private String timestampFormat;
@@ -481,7 +483,7 @@ public String getDeprecatedSetterDocumentation() {
481483
public String getDefaultConsumerFluentSetterDocumentation() {
482484
return (StringUtils.isNotBlank(documentation) ? documentation : defaultSetter().replace("%s", name) + "\n")
483485
+ LF
484-
+ "This is a convenience that creates an instance of the {@link "
486+
+ "This is a convenience method that creates an instance of the {@link "
485487
+ variable.getSimpleType()
486488
+ ".Builder} avoiding the need to create one manually via {@link "
487489
+ variable.getSimpleType()
@@ -509,6 +511,13 @@ public String getDefaultConsumerFluentSetterDocumentation() {
509511
+ ")";
510512
}
511513

514+
public String getUnionConstructorDocumentation() {
515+
return "Create an instance of this class with {@link #" + this.getFluentGetterMethodName() +
516+
"()} initialized to the given value." +
517+
LF + LF +
518+
getSetterDocumentation();
519+
}
520+
512521
private String getParamDoc() {
513522
return LF
514523
+ "@param "
@@ -726,4 +735,12 @@ public String getDeprecatedBeanStyleSetterMethodName() {
726735
public void setDeprecatedBeanStyleSetterMethodName(String deprecatedBeanStyleSetterMethodName) {
727736
this.deprecatedBeanStyleSetterMethodName = deprecatedBeanStyleSetterMethodName;
728737
}
738+
739+
public String getUnionEnumTypeName() {
740+
return unionEnumTypeName;
741+
}
742+
743+
public void setUnionEnumTypeName(String unionEnumTypeName) {
744+
this.unionEnumTypeName = unionEnumTypeName;
745+
}
729746
}

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
package software.amazon.awssdk.codegen.model.intermediate;
1717

18+
import static software.amazon.awssdk.codegen.internal.Constant.LF;
1819
import static software.amazon.awssdk.codegen.internal.Constant.REQUEST_CLASS_SUFFIX;
1920
import static software.amazon.awssdk.codegen.internal.Constant.RESPONSE_CLASS_SUFFIX;
2021
import static software.amazon.awssdk.codegen.internal.DocumentationUtils.removeFromEnd;
@@ -71,6 +72,8 @@ public class ShapeModel extends DocumentationModel implements HasDeprecation {
7172

7273
private boolean document;
7374

75+
private boolean union;
76+
7477
public ShapeModel() {
7578
}
7679

@@ -526,6 +529,16 @@ public String getDocumentationShapeName() {
526529
}
527530
}
528531

532+
public String getUnionTypeGetterDocumentation() {
533+
return "Retrieve an enum value representing which member of this object is populated. "
534+
+ LF + LF
535+
+ "When this class is returned in a service response, this will be {@link Type#UNKNOWN_TO_SDK_VERSION} if the "
536+
+ "service returned a member that is only known to a newer SDK version."
537+
+ LF + LF
538+
+ "When this class is created directly in your code, this will be {@link Type#UNKNOWN_TO_SDK_VERSION} if zero "
539+
+ "members are set, and {@code null} if more than one member is set.";
540+
}
541+
529542
@Override
530543
public String toString() {
531544
return shapeName;
@@ -617,4 +630,12 @@ public ShapeModel withIsDocument(boolean document) {
617630
this.document = document;
618631
return this;
619632
}
633+
634+
public boolean isUnion() {
635+
return union;
636+
}
637+
638+
public void withIsUnion(boolean union) {
639+
this.union = union;
640+
}
620641
}

codegen/src/main/java/software/amazon/awssdk/codegen/model/service/Shape.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public class Shape {
7474

7575
private boolean document;
7676

77+
private boolean union;
78+
7779
public boolean isFault() {
7880
return fault;
7981
}
@@ -318,4 +320,11 @@ public void setDocument(boolean document) {
318320
this.document = document;
319321
}
320322

323+
public boolean isUnion() {
324+
return union;
325+
}
326+
327+
public void setUnion(boolean union) {
328+
this.union = union;
329+
}
321330
}

0 commit comments

Comments
 (0)