Skip to content

Commit 53c2655

Browse files
Merge pull request #669 from aws/staging/b622329b-da3d-4e3c-b9b6-44ca1cb27ef5
Pull request: release <- staging/b622329b-da3d-4e3c-b9b6-44ca1cb27ef5
2 parents 93f0f47 + 202b79e commit 53c2655

File tree

269 files changed

+3747
-407
lines changed

Some content is hidden

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

269 files changed

+3747
-407
lines changed

.changes/2.10.18.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"version": "2.10.18",
3+
"date": "2019-11-15",
4+
"entries": [
5+
{
6+
"type": "feature",
7+
"category": "Amazon CloudWatch Logs",
8+
"description": "Documentation updates for logs"
9+
},
10+
{
11+
"type": "feature",
12+
"category": "Amazon Simple Systems Manager (SSM)",
13+
"description": "This release updates AWS Systems Manager Parameter Store documentation for the enhanced search capability."
14+
},
15+
{
16+
"type": "feature",
17+
"category": "Amazon Elastic Compute Cloud",
18+
"description": "You can now add tags while copying snapshots. Previously, a user had to first copy the snapshot and then add tags to the copied snapshot manually. Moving forward, you can specify the list of tags you wish to be applied to the copied snapshot as a parameter on the Copy Snapshot API."
19+
},
20+
{
21+
"type": "feature",
22+
"category": "Amazon Chime",
23+
"description": "This release adds support for Chime Room Management APIs"
24+
},
25+
{
26+
"type": "feature",
27+
"category": "AWS SDK for Java v2",
28+
"description": "When SdkException or one of its children is created without a 'message', inherit the message from the exception 'cause' (if any). This should reduce the chance of an exception being raised by the SDK with a null message."
29+
},
30+
{
31+
"type": "feature",
32+
"category": "Amazon Cognito Identity Provider",
33+
"description": "This release adds a new option in the User Pool to allow specifying sender's name in the emails sent by Amazon Cognito. This release also adds support to add SES Configuration Set to the emails sent by Amazon Cognito."
34+
},
35+
{
36+
"type": "feature",
37+
"category": "Amazon WorkSpaces",
38+
"description": "Added APIs to register your directories with Amazon WorkSpaces and to modify directory details."
39+
},
40+
{
41+
"type": "feature",
42+
"category": "Amazon Elastic MapReduce",
43+
"description": "Access to the cluster ARN makes it easier for you to author resource-level permissions policies in AWS Identity and Access Management. To simplify the process of obtaining the cluster ARN, Amazon EMR has added a new field containing the cluster ARN to all API responses that include the cluster ID."
44+
},
45+
{
46+
"type": "feature",
47+
"category": "AWS Elemental MediaConvert",
48+
"description": "AWS Elemental MediaConvert SDK has added support for DolbyVision encoding, and SCTE35 & ESAM insertion to DASH ISO EMSG."
49+
},
50+
{
51+
"type": "feature",
52+
"category": "Amazon Elastic Kubernetes Service",
53+
"description": "Introducing Amazon EKS managed node groups, a new feature that lets you easily provision worker nodes for Amazon EKS clusters and keep them up to date using the Amazon EKS management console, CLI, and APIs."
54+
},
55+
{
56+
"type": "feature",
57+
"category": "Elastic Load Balancing",
58+
"description": "Documentation-only change to the default value of the routing.http.drop_invalid_header_fields.enabled attribute."
59+
},
60+
{
61+
"type": "feature",
62+
"category": "Amazon GuardDuty",
63+
"description": "This release includes new operations related to findings export, including: CreatePublishingDestination, UpdatePublishingDestination, DescribePublishingDestination, DeletePublishingDestination and ListPublishingDestinations."
64+
}
65+
]
66+
}

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
# __2.10.18__ __2019-11-15__
2+
## __AWS Elemental MediaConvert__
3+
- ### Features
4+
- AWS Elemental MediaConvert SDK has added support for DolbyVision encoding, and SCTE35 & ESAM insertion to DASH ISO EMSG.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- When SdkException or one of its children is created without a 'message', inherit the message from the exception 'cause' (if any). This should reduce the chance of an exception being raised by the SDK with a null message.
9+
10+
## __Amazon Chime__
11+
- ### Features
12+
- This release adds support for Chime Room Management APIs
13+
14+
## __Amazon CloudWatch Logs__
15+
- ### Features
16+
- Documentation updates for logs
17+
18+
## __Amazon Cognito Identity Provider__
19+
- ### Features
20+
- This release adds a new option in the User Pool to allow specifying sender's name in the emails sent by Amazon Cognito. This release also adds support to add SES Configuration Set to the emails sent by Amazon Cognito.
21+
22+
## __Amazon Elastic Compute Cloud__
23+
- ### Features
24+
- You can now add tags while copying snapshots. Previously, a user had to first copy the snapshot and then add tags to the copied snapshot manually. Moving forward, you can specify the list of tags you wish to be applied to the copied snapshot as a parameter on the Copy Snapshot API.
25+
26+
## __Amazon Elastic Kubernetes Service__
27+
- ### Features
28+
- Introducing Amazon EKS managed node groups, a new feature that lets you easily provision worker nodes for Amazon EKS clusters and keep them up to date using the Amazon EKS management console, CLI, and APIs.
29+
30+
## __Amazon Elastic MapReduce__
31+
- ### Features
32+
- Access to the cluster ARN makes it easier for you to author resource-level permissions policies in AWS Identity and Access Management. To simplify the process of obtaining the cluster ARN, Amazon EMR has added a new field containing the cluster ARN to all API responses that include the cluster ID.
33+
34+
## __Amazon GuardDuty__
35+
- ### Features
36+
- This release includes new operations related to findings export, including: CreatePublishingDestination, UpdatePublishingDestination, DescribePublishingDestination, DeletePublishingDestination and ListPublishingDestinations.
37+
38+
## __Amazon Simple Systems Manager (SSM)__
39+
- ### Features
40+
- This release updates AWS Systems Manager Parameter Store documentation for the enhanced search capability.
41+
42+
## __Amazon WorkSpaces__
43+
- ### Features
44+
- Added APIs to register your directories with Amazon WorkSpaces and to modify directory details.
45+
46+
## __Elastic Load Balancing__
47+
- ### Features
48+
- Documentation-only change to the default value of the routing.http.drop_invalid_header_fields.enabled attribute.
49+
150
# __2.10.17__ __2019-11-14__
251
## __AWSMarketplace Metering__
352
- ### 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.17</version>
51+
<version>2.10.18</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.17</version>
85+
<version>2.10.18</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>software.amazon.awssdk</groupId>
8989
<artifactId>s3</artifactId>
90-
<version>2.10.17</version>
90+
<version>2.10.18</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.17</version>
102+
<version>2.10.18</version>
103103
</dependency>
104104
```
105105

aws-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>software.amazon.awssdk</groupId>
66
<artifactId>aws-sdk-java-pom</artifactId>
7-
<version>2.10.17</version>
7+
<version>2.10.18</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>aws-sdk-java</artifactId>

bom-internal/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>aws-sdk-java-pom</artifactId>
77
<groupId>software.amazon.awssdk</groupId>
8-
<version>2.10.17</version>
8+
<version>2.10.18</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

bom/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>software.amazon.awssdk</groupId>
66
<artifactId>aws-sdk-java-pom</artifactId>
7-
<version>2.10.17</version>
7+
<version>2.10.18</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<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.17</version>
24+
<version>2.10.18</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
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>software.amazon.awssdk</groupId>
99
<artifactId>aws-sdk-java-pom</artifactId>
10-
<version>2.10.17</version>
10+
<version>2.10.18</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313
<artifactId>codegen-lite-maven-plugin</artifactId>

codegen-lite/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>software.amazon.awssdk</groupId>
88
<artifactId>aws-sdk-java-pom</artifactId>
9-
<version>2.10.17</version>
9+
<version>2.10.18</version>
1010
</parent>
1111
<artifactId>codegen-lite</artifactId>
1212
<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.10.17</version>
25+
<version>2.10.18</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.10.17</version>
24+
<version>2.10.18</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
import static software.amazon.awssdk.codegen.RemoveUnusedShapes.removeUnusedShapes;
2020

2121
import java.util.ArrayList;
22+
import java.util.Arrays;
2223
import java.util.Collections;
2324
import java.util.HashMap;
2425
import java.util.List;
2526
import java.util.Map;
2627
import java.util.TreeMap;
28+
import java.util.stream.Collectors;
2729
import org.slf4j.Logger;
2830
import org.slf4j.LoggerFactory;
2931
import software.amazon.awssdk.codegen.customization.CodegenCustomizationProcessor;
@@ -53,6 +55,8 @@
5355
*/
5456
public class IntermediateModelBuilder {
5557

58+
private static final List<String> NO_BODY_METHODS = Arrays.asList("GET", "HEAD", "DELETE");
59+
5660
private static final Logger log = LoggerFactory.getLogger(IntermediateModelBuilder.class);
5761
private final CustomizationConfig customConfig;
5862
private final ServiceModel service;
@@ -157,9 +161,28 @@ public IntermediateModel build() {
157161

158162
setSimpleMethods(trimmedModel);
159163

164+
validateOperations(trimmedModel);
165+
160166
return trimmedModel;
161167
}
162168

169+
/**
170+
* Validates that operations that use GET, DELETE or HEAD do not have an HTTP body.
171+
*/
172+
private void validateOperations(IntermediateModel model) {
173+
List<String> methods = model.getOperations()
174+
.values()
175+
.stream()
176+
.filter(e -> e.getInputShape().hasPayloadMembers())
177+
.filter(e -> NO_BODY_METHODS.contains(e.getInputShape().getMarshaller().getVerb()))
178+
.map(e -> e.getInputShape().getC2jName())
179+
.collect(Collectors.toList());
180+
181+
if (methods.size() > 0) {
182+
throw new RuntimeException("An HTTP body is not allowed on GET/DELETE/HEAD requests. Invalid operations: " + methods);
183+
}
184+
}
185+
163186
/**
164187
* Link the member to it's corresponding shape (if it exists).
165188
*
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
package software.amazon.awssdk.codegen;
16+
17+
import static org.junit.Assert.assertTrue;
18+
import static org.junit.Assert.fail;
19+
20+
import java.io.File;
21+
import org.junit.Test;
22+
import software.amazon.awssdk.codegen.model.config.customization.CustomizationConfig;
23+
import software.amazon.awssdk.codegen.model.service.ServiceModel;
24+
import software.amazon.awssdk.codegen.utils.ModelLoaderUtils;
25+
26+
public class IntermediateModelBuilderTest {
27+
28+
@Test(expected = RuntimeException.class)
29+
public void modelWithUnsupportedPayloadMethods_ThrowsException() {
30+
File serviceModel = new File(getClass().getResource("poet/client/c2j/unsupportedpayloads/service-2.json").getFile());
31+
File customizationModel = new File(getClass().getResource("poet/client/c2j/unsupportedpayloads/customization.config").getFile());
32+
33+
C2jModels models = C2jModels.builder()
34+
.serviceModel(ModelLoaderUtils.loadModel(ServiceModel.class, serviceModel))
35+
.customizationConfig(ModelLoaderUtils.loadModel(CustomizationConfig.class, customizationModel))
36+
.build();
37+
38+
try {
39+
new IntermediateModelBuilder(models).build();
40+
} catch (RuntimeException e) {
41+
assertTrue(e.getMessage().contains("GetBlacklistReportsRequest"));
42+
assertTrue(e.getMessage().contains("GetDedicatedIpsRequest"));
43+
throw e;
44+
}
45+
46+
fail("Expected RuntimeException");
47+
}
48+
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"authPolicyActions" : {
3+
"skip" : true
4+
}
5+
}

0 commit comments

Comments
 (0)