Skip to content

Commit 87761e0

Browse files
Merge pull request #452 from aws/staging/97244113-58b1-42aa-b196-2bd624d8d0b4
Pull request: release <- staging/97244113-58b1-42aa-b196-2bd624d8d0b4
2 parents c9a2e4f + 936f8c6 commit 87761e0

File tree

253 files changed

+1522
-426
lines changed

Some content is hidden

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

253 files changed

+1522
-426
lines changed

.changes/2.5.12.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"date": "2019-03-19",
3+
"version": "2.5.12",
4+
"entries": [
5+
{
6+
"category": "Amazon S3",
7+
"type": "feature",
8+
"description": "Add support for getUrl operation. The API can be used to generate a URL that represents an object in Amazon S3. The url can only be used to download the object content if the object has public read permissions. Original issue: https://github.com/aws/aws-sdk-java-v2/issues/860"
9+
},
10+
{
11+
"category": "Amazon Elastic Container Service for Kubernetes",
12+
"type": "feature",
13+
"description": "Added support to control private/public access to the Kubernetes API-server endpoint"
14+
},
15+
{
16+
"category": "AWS SDK for Java v2",
17+
"type": "feature",
18+
"description": "Adds the Java vendor the user agent as well as using the updated user agent for all HTTP calls"
19+
},
20+
{
21+
"category": "Amazon S3",
22+
"type": "bugfix",
23+
"description": "Only set content type of S3 `CreateMultipartUploadRequest` if `Content-Type` header is not present and honor the overridden content type."
24+
},
25+
{
26+
"category": "AWS Config",
27+
"type": "feature",
28+
"description": "AWS Config adds a new API called SelectResourceConfig to run advanced queries based on resource configuration properties."
29+
}
30+
]
31+
}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# __2.5.12__ __2019-03-19__
2+
## __AWS Config__
3+
- ### Features
4+
- AWS Config adds a new API called SelectResourceConfig to run advanced queries based on resource configuration properties.
5+
6+
## __AWS SDK for Java v2__
7+
- ### Features
8+
- Adds the Java vendor the user agent as well as using the updated user agent for all HTTP calls
9+
10+
## __Amazon Elastic Container Service for Kubernetes__
11+
- ### Features
12+
- Added support to control private/public access to the Kubernetes API-server endpoint
13+
14+
## __Amazon S3__
15+
- ### Features
16+
- Add support for getUrl operation. The API can be used to generate a URL that represents an object in Amazon S3. The url can only be used to download the object content if the object has public read permissions. Original issue: https://github.com/aws/aws-sdk-java-v2/issues/860
17+
18+
- ### Bugfixes
19+
- Only set content type of S3 `CreateMultipartUploadRequest` if `Content-Type` header is not present and honor the overridden content type.
20+
121
# __2.5.11__ __2019-03-18__
222
## __AWS Database Migration Service__
323
- ### Features

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ You can import the whole SDK into your project (includes all services) as follow
4444
<dependency>
4545
<groupId>software.amazon.awssdk</groupId>
4646
<artifactId>aws-sdk-java</artifactId>
47-
<version>2.5.11</version>
47+
<version>2.5.12</version>
4848
</dependency>
4949
```
5050

@@ -56,12 +56,12 @@ Alternatively you can add dependencies for the specific services you use only:
5656
<dependency>
5757
<groupId>software.amazon.awssdk</groupId>
5858
<artifactId>ec2</artifactId>
59-
<version>2.5.11</version>
59+
<version>2.5.12</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>software.amazon.awssdk</groupId>
6363
<artifactId>s3</artifactId>
64-
<version>2.5.11</version>
64+
<version>2.5.12</version>
6565
</dependency>
6666
```
6767

@@ -75,7 +75,7 @@ To automatically manage module versions (currently all modules have the same ver
7575
<dependency>
7676
<groupId>software.amazon.awssdk</groupId>
7777
<artifactId>bom</artifactId>
78-
<version>2.5.11</version>
78+
<version>2.5.12</version>
7979
<type>pom</type>
8080
<scope>import</scope>
8181
</dependency>

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.5.11</version>
7+
<version>2.5.12</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.5.11</version>
8+
<version>2.5.12</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.5.11</version>
7+
<version>2.5.12</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>bom</artifactId>

build-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<dependency>
6767
<groupId>com.puppycrawl.tools</groupId>
6868
<artifactId>checkstyle</artifactId>
69-
<version>8.7</version>
69+
<version>8.18</version>
7070
</dependency>
7171
</dependencies>
7272

build-tools/src/main/java/software/amazon/awssdk/buildtools/checkstyle/MissingSdkAnnotationCheck.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
1919
import com.puppycrawl.tools.checkstyle.api.DetailAST;
2020
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
21-
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtility;
22-
import com.puppycrawl.tools.checkstyle.utils.ScopeUtils;
21+
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtil;
22+
import com.puppycrawl.tools.checkstyle.utils.ScopeUtil;
2323
import java.util.Arrays;
2424
import java.util.List;
2525

@@ -50,7 +50,7 @@ public int[] getRequiredTokens() {
5050

5151
@Override
5252
public void visitToken(DetailAST ast) {
53-
if (!ScopeUtils.isOuterMostType(ast) || SDK_ANNOTATIONS.stream().anyMatch(a -> AnnotationUtility.containsAnnotation
53+
if (!ScopeUtil.isOuterMostType(ast) || SDK_ANNOTATIONS.stream().anyMatch(a -> AnnotationUtil.containsAnnotation
5454
(ast, a))) {
5555
return;
5656
}

build-tools/src/main/java/software/amazon/awssdk/buildtools/checkstyle/SdkPublicMethodNameCheck.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import com.puppycrawl.tools.checkstyle.api.DetailAST;
1919
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
2020
import com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck;
21-
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtility;
21+
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtil;
2222

2323
/**
2424
* Sdk Method Name check to check only public methods in the classes with {@code @SdkPublicApi} annotation.
@@ -55,8 +55,8 @@ public void visitToken(DetailAST ast) {
5555
DetailAST classDef = ast.getParent().getParent();
5656

5757
try {
58-
if (!AnnotationUtility.containsAnnotation(ast, OVERRIDE)
59-
&& AnnotationUtility.containsAnnotation(classDef, SDK_PUBLIC_API)) {
58+
if (!AnnotationUtil.containsAnnotation(ast, OVERRIDE)
59+
&& AnnotationUtil.containsAnnotation(classDef, SDK_PUBLIC_API)) {
6060
super.visitToken(ast);
6161
}
6262
} catch (NullPointerException ex) {

build-tools/src/main/java/software/amazon/awssdk/buildtools/checkstyle/UnnecessaryFinalOnLocalVariableCheck.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
1919
import com.puppycrawl.tools.checkstyle.api.DetailAST;
2020
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
21-
import com.puppycrawl.tools.checkstyle.utils.ScopeUtils;
21+
import com.puppycrawl.tools.checkstyle.utils.ScopeUtil;
2222

2323
/**
2424
* A rule that disallows unnecessary 'final' on local variables
@@ -42,8 +42,8 @@ public int[] getRequiredTokens() {
4242

4343
@Override
4444
public void visitToken(DetailAST ast) {
45-
if (ScopeUtils.isLocalVariableDef(ast) && ast.findFirstToken(TokenTypes.MODIFIERS)
46-
.findFirstToken(TokenTypes.FINAL) != null) {
45+
if (ScopeUtil.isLocalVariableDef(ast) && ast.findFirstToken(TokenTypes.MODIFIERS)
46+
.findFirstToken(TokenTypes.FINAL) != null) {
4747
log(ast, "final should be removed from local variable");
4848
}
4949
}

build-tools/src/main/resources/software/amazon/awssdk/checkstyle.xml

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@
4343
default="checkstyle-suppressions.xml"/>
4444
</module>
4545

46-
<!-- Allow suppressing rules via comments. -->
47-
<module name="SuppressionCommentFilter"/>
48-
4946
<module name="TreeWalker">
50-
<!-- Make the file contents available to the tree walker, so that we can check comments for rule suppression. -->
51-
<module name="FileContentsHolder"/>
47+
48+
<!-- Allow suppressing rules via comments. -->
49+
<module name="SuppressionCommentFilter"/>
5250

5351
<!-- Class names must match the file name in which they are defined. -->
5452
<module name="OuterTypeFilename"/>
@@ -89,11 +87,6 @@
8987
<!-- Braces must be used for all blocks. -->
9088
<module name="NeedBraces"/>
9189

92-
<!-- Left curly braces cannot be placed on the next line. -->
93-
<module name="LeftCurly">
94-
<property name="maxLineLength" value="130"/>
95-
</module>
96-
9790
<!-- Braces must not be empty for most language constructs. -->
9891
<module name="EmptyBlock">
9992
<property name="option" value="TEXT"/>
@@ -314,14 +307,6 @@
314307
<!-- There must be no space between a method name and its parameter list. -->
315308
<module name="ParenPad"/>
316309

317-
<!--&lt;!&ndash; Operators in multi-line statements must be placed at the beginning, not end, of the lines. &ndash;&gt;-->
318-
<!--<module name="OperatorWrap">-->
319-
<!--<property name="option" value="NL"/>-->
320-
<!--<property name="tokens"-->
321-
<!--value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>-->
322-
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
323-
<!--</module>-->
324-
325310
<!-- Non-field annotations must be on separate lines, or in the case of single parameterless annotation can be
326311
placed on the same line as the signature. -->
327312
<module name="AnnotationLocation">
@@ -336,45 +321,6 @@
336321
<property name="allowSamelineMultipleAnnotations" value="true"/>
337322
</module>
338323

339-
<!-- Javadoc @param, @return, etc. must not be empty (but may be excluded). -->
340-
<module name="NonEmptyAtclauseDescription"/>
341-
342-
<!--&lt;!&ndash; Javadoc summaries must be a complete sentence, and must not say things like "This X" or "A X"... &ndash;&gt;-->
343-
<!--<module name="SummaryJavadoc">-->
344-
<!--<property name="forbiddenSummaryFragments"-->
345-
<!--value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>-->
346-
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
347-
<!--</module>-->
348-
349-
<!--&lt;!&ndash; One blank line must exist between each javadoc paragraph, and each paragraph <p> must occur on the same-->
350-
<!--line as the text. &ndash;&gt;-->
351-
<!--<module name="JavadocParagraph">-->
352-
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
353-
<!--</module>-->
354-
355-
<!-- Javadoc @param, etc. must follow a specific order. -->
356-
<module name="AtclauseOrder">
357-
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
358-
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
359-
</module>
360-
361-
<!--&lt;!&ndash; Javadoc must be specified for all public methods and follow a specific pattern. &ndash;&gt;-->
362-
<!--<module name="JavadocMethod">-->
363-
<!--<property name="scope" value="public"/>-->
364-
<!--<property name="allowMissingParamTags" value="true"/>-->
365-
<!--<property name="allowMissingThrowsTags" value="true"/>-->
366-
<!--<property name="allowMissingReturnTag" value="true"/>-->
367-
<!--<property name="minLineCount" value="2"/>-->
368-
<!--<property name="allowedAnnotations" value="Override, Test"/>-->
369-
<!--<property name="allowThrowsTagsForSubclasses" value="true"/>-->
370-
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
371-
<!--</module>-->
372-
373-
<!-- Single-line style javadoc may be used. -->
374-
<module name="SingleLineJavadoc">
375-
<property name="ignoreInlineTags" value="false"/>
376-
</module>
377-
378324
<!-- Catch blocks must not be empty without a comment. -->
379325
<module name="EmptyCatchBlock"/>
380326

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.5.11</version>
24+
<version>2.5.12</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.5.11</version>
10+
<version>2.5.12</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.5.11</version>
9+
<version>2.5.12</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.5.11</version>
25+
<version>2.5.12</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.5.11</version>
24+
<version>2.5.12</version>
2525
</parent>
2626
<artifactId>codegen</artifactId>
2727
<name>AWS Java SDK :: Code Generator</name>

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
@@ -154,6 +154,11 @@ public class CustomizationConfig {
154154
*/
155155
private Map<String, String> paginationCustomization;
156156

157+
/**
158+
* Config to generate a utilities() in the low-level client
159+
*/
160+
private UtilitiesMethod utilitiesMethod;
161+
157162
private CustomizationConfig() {
158163
}
159164

@@ -393,4 +398,12 @@ public Map<String, String> getPaginationCustomization() {
393398
public void setPaginationCustomization(Map<String, String> paginationCustomization) {
394399
this.paginationCustomization = paginationCustomization;
395400
}
401+
402+
public UtilitiesMethod getUtilitiesMethod() {
403+
return utilitiesMethod;
404+
}
405+
406+
public void setUtilitiesMethod(UtilitiesMethod utilitiesMethod) {
407+
this.utilitiesMethod = utilitiesMethod;
408+
}
396409
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
16+
package software.amazon.awssdk.codegen.model.config.customization;
17+
18+
import java.util.ArrayList;
19+
import java.util.List;
20+
21+
/**
22+
* Config required to generate the utilities method that returns an instance of
23+
* hand-written Utilities class
24+
*/
25+
public class UtilitiesMethod {
26+
27+
public static final String METHOD_NAME = "utilities";
28+
29+
/** Fqcn of the return type of the operation */
30+
private String returnType;
31+
32+
/**
33+
* The utilities method will call a protected create() method in the hand-written Utilities class.
34+
* These the ordered list of parameters that needs to be passed to the create method.
35+
*/
36+
private List<String> createMethodParams = new ArrayList<>();
37+
38+
public String getReturnType() {
39+
return returnType;
40+
}
41+
42+
public void setReturnType(String returnType) {
43+
this.returnType = returnType;
44+
}
45+
46+
public List<String> getCreateMethodParams() {
47+
return createMethodParams;
48+
}
49+
50+
public void setCreateMethodParams(List<String> createMethodParams) {
51+
this.createMethodParams = createMethodParams;
52+
}
53+
}

0 commit comments

Comments
 (0)