Skip to content

Commit 59e5730

Browse files
authored
Merge branch 'master' into aws-crt-latest-api-update
2 parents d421878 + 637bb15 commit 59e5730

File tree

422 files changed

+6791
-1989
lines changed

Some content is hidden

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

422 files changed

+6791
-1989
lines changed

.changes/2.10.55.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"version": "2.10.55",
3+
"date": "2020-01-23",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "Amazon Relational Database Service",
8+
"description": "This SDK release introduces APIs that automate the export of Amazon RDS snapshot data to Amazon S3. The new APIs include: StartExportTask, CancelExportTask, DescribeExportTasks. These APIs automate the extraction of data from an RDS snapshot and export it to an Amazon S3 bucket. The data is stored in a compressed, consistent, and query-able format. After the data is exported, you can query it directly using tools such as Amazon Athena or Redshift Spectrum. You can also consume the data as part of a data lake solution. If you archive the data in S3 Infrequent Access or Glacier, you can reduce long term data storage costs by applying data lifecycle policies."
9+
},
10+
{
11+
"type": "feature",
12+
"category": "AWS SDK for Java v2",
13+
"description": "Updated service endpoint metadata."
14+
},
15+
{
16+
"type": "feature",
17+
"category": "AWS SDK for Java v2",
18+
"description": "Added ServiceMetadata.servicePartitions() to get partition metadata for a specific service"
19+
},
20+
{
21+
"type": "feature",
22+
"category": "AWS Identity and Access Management",
23+
"description": "This release enables the Identity and Access Management policy simulator to simulate permissions boundary policies."
24+
},
25+
{
26+
"type": "feature",
27+
"category": "Amazon DynamoDB Enhanced Client [Preview]",
28+
"description": "Support for non-blocking asynchronous calling of all mapper operations"
29+
},
30+
{
31+
"type": "feature",
32+
"category": "AWS SDK for Java v2",
33+
"description": "Improved error messages on UnknownHostExceptions"
34+
}
35+
]
36+
}

.changes/2.10.56.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"version": "2.10.56",
3+
"date": "2020-01-24",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "Amazon Elastic Kubernetes Service",
8+
"description": "Adding new error codes for Nodegroups in EKS"
9+
},
10+
{
11+
"type": "feature",
12+
"category": "Amazon EC2",
13+
"description": "Adds EC2ThrottledException as a recognized throttling exception to be retried"
14+
},
15+
{
16+
"type": "feature",
17+
"category": "AWS OpsWorks CM",
18+
"description": "AWS OpsWorks for Chef Automate now supports in-place upgrade to Chef Automate 2. Eligible servers can be updated through the management console, CLI and APIs."
19+
},
20+
{
21+
"type": "feature",
22+
"category": "AWS SDK for Java v2",
23+
"description": "Updated service endpoint metadata."
24+
},
25+
{
26+
"type": "feature",
27+
"category": "Amazon WorkSpaces",
28+
"description": "Documentation updates for WorkSpaces"
29+
},
30+
{
31+
"type": "feature",
32+
"category": "Amazon EC2 Container Service",
33+
"description": "This release provides support for tagging Amazon ECS task sets for services using external deployment controllers."
34+
},
35+
{
36+
"type": "bugfix",
37+
"category": "Netty NIO HTTP Client",
38+
"description": "Fix issue where DNS resolution for a host is only made once for the initial request to the host. If the DNS entries change for a hostname, the client will resolve the new address until the client is closed and recreated."
39+
},
40+
{
41+
"type": "feature",
42+
"category": "AWS DataSync",
43+
"description": "AWS DataSync now supports FSx for Windows File Server Locations"
44+
}
45+
]
46+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"category": "Netty NIO HTTP Client",
3+
"type": "bugfix",
4+
"description": "Throws `IOException` for the race condition where an HTTP2 connection gets reused at the same time it gets inactive so that failed requests can be retried"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon DynamoDB Enhanced Client [Preview]",
4+
"description": "Changing usage of typed builders for PutItem, UpdateItem and StaticTableSchema to explicitly provide class type."
5+
}

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
# __2.10.56__ __2020-01-24__
2+
## __AWS DataSync__
3+
- ### Features
4+
- AWS DataSync now supports FSx for Windows File Server Locations
5+
6+
## __AWS OpsWorks CM__
7+
- ### Features
8+
- AWS OpsWorks for Chef Automate now supports in-place upgrade to Chef Automate 2. Eligible servers can be updated through the management console, CLI and APIs.
9+
10+
## __AWS SDK for Java v2__
11+
- ### Features
12+
- Updated service endpoint metadata.
13+
14+
## __Amazon EC2__
15+
- ### Features
16+
- Adds EC2ThrottledException as a recognized throttling exception to be retried
17+
18+
## __Amazon EC2 Container Service__
19+
- ### Features
20+
- This release provides support for tagging Amazon ECS task sets for services using external deployment controllers.
21+
22+
## __Amazon Elastic Kubernetes Service__
23+
- ### Features
24+
- Adding new error codes for Nodegroups in EKS
25+
26+
## __Amazon WorkSpaces__
27+
- ### Features
28+
- Documentation updates for WorkSpaces
29+
30+
## __Netty NIO HTTP Client__
31+
- ### Bugfixes
32+
- Fix issue where DNS resolution for a host is only made once for the initial request to the host. If the DNS entries change for a hostname, the client will resolve the new address until the client is closed and recreated.
33+
34+
# __2.10.55__ __2020-01-23__
35+
## __AWS Identity and Access Management__
36+
- ### Features
37+
- This release enables the Identity and Access Management policy simulator to simulate permissions boundary policies.
38+
39+
## __AWS SDK for Java v2__
40+
- ### Features
41+
- Added ServiceMetadata.servicePartitions() to get partition metadata for a specific service
42+
- Improved error messages on UnknownHostExceptions
43+
- Updated service endpoint metadata.
44+
45+
## __Amazon DynamoDB Enhanced Client [Preview]__
46+
- ### Features
47+
- Support for non-blocking asynchronous calling of all mapper operations
48+
49+
## __Amazon Relational Database Service__
50+
- ### Features
51+
- This SDK release introduces APIs that automate the export of Amazon RDS snapshot data to Amazon S3. The new APIs include: StartExportTask, CancelExportTask, DescribeExportTasks. These APIs automate the extraction of data from an RDS snapshot and export it to an Amazon S3 bucket. The data is stored in a compressed, consistent, and query-able format. After the data is exported, you can query it directly using tools such as Amazon Athena or Redshift Spectrum. You can also consume the data as part of a data lake solution. If you archive the data in S3 Infrequent Access or Glacier, you can reduce long term data storage costs by applying data lifecycle policies.
52+
153
# __2.10.54__ __2020-01-21__
254
## __AWS Application Discovery Service__
355
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To automatically manage module versions (currently all modules have the same ver
4848
<dependency>
4949
<groupId>software.amazon.awssdk</groupId>
5050
<artifactId>bom</artifactId>
51-
<version>2.10.54</version>
51+
<version>2.10.56</version>
5252
<type>pom</type>
5353
<scope>import</scope>
5454
</dependency>
@@ -82,12 +82,12 @@ Alternatively you can add dependencies for the specific services you use only:
8282
<dependency>
8383
<groupId>software.amazon.awssdk</groupId>
8484
<artifactId>ec2</artifactId>
85-
<version>2.10.54</version>
85+
<version>2.10.56</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>software.amazon.awssdk</groupId>
8989
<artifactId>s3</artifactId>
90-
<version>2.10.54</version>
90+
<version>2.10.56</version>
9191
</dependency>
9292
```
9393

@@ -99,7 +99,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
9999
<dependency>
100100
<groupId>software.amazon.awssdk</groupId>
101101
<artifactId>aws-sdk-java</artifactId>
102-
<version>2.10.54</version>
102+
<version>2.10.56</version>
103103
</dependency>
104104
```
105105

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>software.amazon.awssdk</groupId>
2121
<artifactId>aws-sdk-java-pom</artifactId>
22-
<version>2.10.55-SNAPSHOT</version>
22+
<version>2.10.57-SNAPSHOT</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<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.10.55-SNAPSHOT</version>
23+
<version>2.10.57-SNAPSHOT</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
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>software.amazon.awssdk</groupId>
2121
<artifactId>aws-sdk-java-pom</artifactId>
22-
<version>2.10.55-SNAPSHOT</version>
22+
<version>2.10.57-SNAPSHOT</version>
2323
<relativePath>../pom.xml</relativePath>
2424
</parent>
2525
<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.10.55-SNAPSHOT</version>
24+
<version>2.10.57-SNAPSHOT</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.10.55-SNAPSHOT</version>
25+
<version>2.10.57-SNAPSHOT</version>
2626
<relativePath>../pom.xml</relativePath>
2727
</parent>
2828
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite-maven-plugin/src/main/java/software/amazon/awssdk/codegen/lite/maven/plugin/RegionGenerationMojo.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ public void generateServiceMetadata(Path baseSourcesDirectory, Partitions partit
9494
Set<String> services = new HashSet<>();
9595
partitions.getPartitions().forEach(p -> services.addAll(p.getServices().keySet()));
9696

97-
services.stream()
98-
// Use hardcoded file for elasticache until the incorrect fips endpoint is fixed
99-
//TODO Remove once elasticache endpoints are fixed at source
100-
.filter(s -> !"elasticache".equals(s))
101-
.forEach(s -> new CodeGenerator(sourcesDirectory.toString(), new ServiceMetadataGenerator(partitions,
97+
services.forEach(s -> new CodeGenerator(sourcesDirectory.toString(), new ServiceMetadataGenerator(partitions,
10298
s,
10399
SERVICE_METADATA_BASE,
104100
REGION_BASE))

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

codegen-lite/src/main/java/software/amazon/awssdk/codegen/lite/regions/ServiceMetadataGenerator.java

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@
5050
public class ServiceMetadataGenerator implements PoetClass {
5151

5252
private final Partitions partitions;
53-
private final String service;
53+
private final String serviceEndpointPrefix;
5454
private final String basePackage;
5555
private final String regionBasePackage;
5656

5757
public ServiceMetadataGenerator(Partitions partitions,
58-
String service,
58+
String serviceEndpointPrefix,
5959
String basePackage,
6060
String regionBasePackage) {
6161
this.partitions = partitions;
62-
this.service = service;
62+
this.serviceEndpointPrefix = serviceEndpointPrefix;
6363
this.basePackage = basePackage;
6464
this.regionBasePackage = regionBasePackage;
6565
}
@@ -68,6 +68,8 @@ public ServiceMetadataGenerator(Partitions partitions,
6868
public TypeSpec poetClass() {
6969
TypeName listOfRegions = ParameterizedTypeName.get(ClassName.get(List.class), ClassName.get(regionBasePackage, "Region"));
7070
TypeName mapOfStringString = ParameterizedTypeName.get(Map.class, String.class, String.class);
71+
TypeName listOfServicePartitionMetadata =
72+
ParameterizedTypeName.get(ClassName.get(List.class), ClassName.get(regionBasePackage, "ServicePartitionMetadata"));
7173

7274
return TypeSpec.classBuilder(className())
7375
.addModifiers(Modifier.PUBLIC)
@@ -79,7 +81,7 @@ public TypeSpec poetClass() {
7981
.addSuperinterface(ClassName.get(regionBasePackage, "ServiceMetadata"))
8082
.addField(FieldSpec.builder(String.class, "ENDPOINT_PREFIX")
8183
.addModifiers(PRIVATE, FINAL, STATIC)
82-
.initializer("$S", service)
84+
.initializer("$S", serviceEndpointPrefix)
8385
.build())
8486
.addField(FieldSpec.builder(mapOfStringString, "PARTITION_OVERRIDDEN_ENDPOINTS")
8587
.addModifiers(PRIVATE, FINAL, STATIC)
@@ -97,15 +99,20 @@ public TypeSpec poetClass() {
9799
.addModifiers(PRIVATE, FINAL, STATIC)
98100
.initializer(signingRegionOverrides(partitions))
99101
.build())
102+
.addField(FieldSpec.builder(listOfServicePartitionMetadata, "PARTITIONS")
103+
.addModifiers(PRIVATE, FINAL, STATIC)
104+
.initializer(servicePartitions(partitions))
105+
.build())
100106
.addMethod(regions())
101107
.addMethod(endpointFor())
102108
.addMethod(signingRegion())
109+
.addMethod(partitions(listOfServicePartitionMetadata))
103110
.build();
104111
}
105112

106113
@Override
107114
public ClassName className() {
108-
String sanitizedServiceName = service.replace(".", "-");
115+
String sanitizedServiceName = serviceEndpointPrefix.replace(".", "-");
109116
return ClassName.get(basePackage, Stream.of(sanitizedServiceName.split("-"))
110117
.map(Utils::capitalize)
111118
.collect(Collectors.joining()) + "ServiceMetadata");
@@ -150,8 +157,8 @@ private CodeBlock regionsField(Partitions partitions) {
150157

151158
partitions.getPartitions()
152159
.stream()
153-
.filter(p -> p.getServices().containsKey(service))
154-
.forEach(p -> regions.addAll(p.getServices().get(service).getEndpoints().keySet()
160+
.filter(p -> p.getServices().containsKey(serviceEndpointPrefix))
161+
.forEach(p -> regions.addAll(p.getServices().get(serviceEndpointPrefix).getEndpoints().keySet()
155162
.stream()
156163
.filter(r -> RegionValidationUtil.validRegion(r, p.getRegionRegex()))
157164
.collect(Collectors.toList())));
@@ -185,6 +192,39 @@ private CodeBlock signingRegionOverrides(Partitions partitions) {
185192
return builder.add(".build()").build();
186193
}
187194

195+
private CodeBlock servicePartitions(Partitions partitions) {
196+
return CodeBlock.builder()
197+
.add("$T.unmodifiableList($T.asList(", Collections.class, Arrays.class)
198+
.add(commaSeparatedServicePartitions(partitions))
199+
.add("))")
200+
.build();
201+
}
202+
203+
private CodeBlock commaSeparatedServicePartitions(Partitions partitions) {
204+
ClassName defaultServicePartitionMetadata = ClassName.get(regionBasePackage + ".internal",
205+
"DefaultServicePartitionMetadata");
206+
return partitions.getPartitions()
207+
.stream()
208+
.filter(p -> p.getServices().containsKey(serviceEndpointPrefix))
209+
.map(p -> CodeBlock.of("new $T($S, $L)",
210+
defaultServicePartitionMetadata,
211+
p.getPartition(),
212+
globalRegion(p)))
213+
.collect(CodeBlock.joining(","));
214+
}
215+
216+
private CodeBlock globalRegion(Partition partition) {
217+
ClassName region = ClassName.get(regionBasePackage, "Region");
218+
Service service = partition.getServices().get(this.serviceEndpointPrefix);
219+
boolean hasGlobalRegionForPartition = service.isRegionalized() != null &&
220+
!service.isRegionalized() &&
221+
service.isPartitionWideEndpointAvailable();
222+
String globalRegionForPartition = hasGlobalRegionForPartition ? service.getPartitionEndpoint() : null;
223+
return globalRegionForPartition == null
224+
? CodeBlock.of("null")
225+
: CodeBlock.of("$T.of($S)", region, globalRegionForPartition);
226+
}
227+
188228
private MethodSpec regions() {
189229
TypeName listOfRegions = ParameterizedTypeName.get(ClassName.get(List.class),
190230
ClassName.get(regionBasePackage, "Region"));
@@ -219,14 +259,23 @@ private MethodSpec signingRegion() {
219259
.build();
220260
}
221261

262+
private MethodSpec partitions(TypeName listOfServicePartitionMetadata) {
263+
return MethodSpec.methodBuilder("servicePartitions")
264+
.addModifiers(Modifier.PUBLIC)
265+
.addAnnotation(Override.class)
266+
.returns(listOfServicePartitionMetadata)
267+
.addStatement("return $L", "PARTITIONS")
268+
.build();
269+
}
270+
222271
private Map<Partition, Service> getServiceData(Partitions partitions) {
223272
Map<Partition, Service> serviceData = new TreeMap<>(Comparator.comparing(Partition::getPartition));
224273

225274
partitions.getPartitions()
226275
.forEach(p -> p.getServices()
227276
.entrySet()
228277
.stream()
229-
.filter(s -> s.getKey().equalsIgnoreCase(service))
278+
.filter(s -> s.getKey().equalsIgnoreCase(serviceEndpointPrefix))
230279
.forEach(s -> serviceData.put(p, s.getValue())));
231280

232281
return serviceData;

0 commit comments

Comments
 (0)