Skip to content

Commit

Permalink
Merge pull request #452 from aws/staging/97244113-58b1-42aa-b196-2bd6…
Browse files Browse the repository at this point in the history
…24d8d0b4

Pull request: release <- staging/97244113-58b1-42aa-b196-2bd624d8d0b4
  • Loading branch information
aws-sdk-java-automation authored Mar 19, 2019
2 parents c9a2e4f + 936f8c6 commit 87761e0
Show file tree
Hide file tree
Showing 253 changed files with 1,522 additions and 426 deletions.
31 changes: 31 additions & 0 deletions .changes/2.5.12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"date": "2019-03-19",
"version": "2.5.12",
"entries": [
{
"category": "Amazon S3",
"type": "feature",
"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"
},
{
"category": "Amazon Elastic Container Service for Kubernetes",
"type": "feature",
"description": "Added support to control private/public access to the Kubernetes API-server endpoint"
},
{
"category": "AWS SDK for Java v2",
"type": "feature",
"description": "Adds the Java vendor the user agent as well as using the updated user agent for all HTTP calls"
},
{
"category": "Amazon S3",
"type": "bugfix",
"description": "Only set content type of S3 `CreateMultipartUploadRequest` if `Content-Type` header is not present and honor the overridden content type."
},
{
"category": "AWS Config",
"type": "feature",
"description": "AWS Config adds a new API called SelectResourceConfig to run advanced queries based on resource configuration properties."
}
]
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# __2.5.12__ __2019-03-19__
## __AWS Config__
- ### Features
- AWS Config adds a new API called SelectResourceConfig to run advanced queries based on resource configuration properties.

## __AWS SDK for Java v2__
- ### Features
- Adds the Java vendor the user agent as well as using the updated user agent for all HTTP calls

## __Amazon Elastic Container Service for Kubernetes__
- ### Features
- Added support to control private/public access to the Kubernetes API-server endpoint

## __Amazon S3__
- ### Features
- 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

- ### Bugfixes
- Only set content type of S3 `CreateMultipartUploadRequest` if `Content-Type` header is not present and honor the overridden content type.

# __2.5.11__ __2019-03-18__
## __AWS Database Migration Service__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You can import the whole SDK into your project (includes all services) as follow
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
</dependency>
```

Expand All @@ -56,12 +56,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
</dependency>
```

Expand All @@ -75,7 +75,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.5.11</version>
<version>2.5.12</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion build-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.7</version>
<version>8.18</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtility;
import com.puppycrawl.tools.checkstyle.utils.ScopeUtils;
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtil;
import com.puppycrawl.tools.checkstyle.utils.ScopeUtil;
import java.util.Arrays;
import java.util.List;

Expand Down Expand Up @@ -50,7 +50,7 @@ public int[] getRequiredTokens() {

@Override
public void visitToken(DetailAST ast) {
if (!ScopeUtils.isOuterMostType(ast) || SDK_ANNOTATIONS.stream().anyMatch(a -> AnnotationUtility.containsAnnotation
if (!ScopeUtil.isOuterMostType(ast) || SDK_ANNOTATIONS.stream().anyMatch(a -> AnnotationUtil.containsAnnotation
(ast, a))) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.checks.naming.MethodNameCheck;
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtility;
import com.puppycrawl.tools.checkstyle.utils.AnnotationUtil;

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

try {
if (!AnnotationUtility.containsAnnotation(ast, OVERRIDE)
&& AnnotationUtility.containsAnnotation(classDef, SDK_PUBLIC_API)) {
if (!AnnotationUtil.containsAnnotation(ast, OVERRIDE)
&& AnnotationUtil.containsAnnotation(classDef, SDK_PUBLIC_API)) {
super.visitToken(ast);
}
} catch (NullPointerException ex) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.utils.ScopeUtils;
import com.puppycrawl.tools.checkstyle.utils.ScopeUtil;

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

@Override
public void visitToken(DetailAST ast) {
if (ScopeUtils.isLocalVariableDef(ast) && ast.findFirstToken(TokenTypes.MODIFIERS)
.findFirstToken(TokenTypes.FINAL) != null) {
if (ScopeUtil.isLocalVariableDef(ast) && ast.findFirstToken(TokenTypes.MODIFIERS)
.findFirstToken(TokenTypes.FINAL) != null) {
log(ast, "final should be removed from local variable");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@
default="checkstyle-suppressions.xml"/>
</module>

<!-- Allow suppressing rules via comments. -->
<module name="SuppressionCommentFilter"/>

<module name="TreeWalker">
<!-- Make the file contents available to the tree walker, so that we can check comments for rule suppression. -->
<module name="FileContentsHolder"/>

<!-- Allow suppressing rules via comments. -->
<module name="SuppressionCommentFilter"/>

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

<!-- Left curly braces cannot be placed on the next line. -->
<module name="LeftCurly">
<property name="maxLineLength" value="130"/>
</module>

<!-- Braces must not be empty for most language constructs. -->
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
Expand Down Expand Up @@ -314,14 +307,6 @@
<!-- There must be no space between a method name and its parameter list. -->
<module name="ParenPad"/>

<!--&lt;!&ndash; Operators in multi-line statements must be placed at the beginning, not end, of the lines. &ndash;&gt;-->
<!--<module name="OperatorWrap">-->
<!--<property name="option" value="NL"/>-->
<!--<property name="tokens"-->
<!--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 "/>-->
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
<!--</module>-->

<!-- Non-field annotations must be on separate lines, or in the case of single parameterless annotation can be
placed on the same line as the signature. -->
<module name="AnnotationLocation">
Expand All @@ -336,45 +321,6 @@
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>

<!-- Javadoc @param, @return, etc. must not be empty (but may be excluded). -->
<module name="NonEmptyAtclauseDescription"/>

<!--&lt;!&ndash; Javadoc summaries must be a complete sentence, and must not say things like "This X" or "A X"... &ndash;&gt;-->
<!--<module name="SummaryJavadoc">-->
<!--<property name="forbiddenSummaryFragments"-->
<!--value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>-->
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
<!--</module>-->

<!--&lt;!&ndash; One blank line must exist between each javadoc paragraph, and each paragraph <p> must occur on the same-->
<!--line as the text. &ndash;&gt;-->
<!--<module name="JavadocParagraph">-->
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
<!--</module>-->

<!-- Javadoc @param, etc. must follow a specific order. -->
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>

<!--&lt;!&ndash; Javadoc must be specified for all public methods and follow a specific pattern. &ndash;&gt;-->
<!--<module name="JavadocMethod">-->
<!--<property name="scope" value="public"/>-->
<!--<property name="allowMissingParamTags" value="true"/>-->
<!--<property name="allowMissingThrowsTags" value="true"/>-->
<!--<property name="allowMissingReturnTag" value="true"/>-->
<!--<property name="minLineCount" value="2"/>-->
<!--<property name="allowedAnnotations" value="Override, Test"/>-->
<!--<property name="allowThrowsTagsForSubclasses" value="true"/>-->
<!--<property name="severity" value="warning"/> &lt;!&ndash; TODO: Make error. &ndash;&gt;-->
<!--</module>-->

<!-- Single-line style javadoc may be used. -->
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>

<!-- Catch blocks must not be empty without a comment. -->
<module name="EmptyCatchBlock"/>

Expand Down
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.5.11</version>
<version>2.5.12</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ public class CustomizationConfig {
*/
private Map<String, String> paginationCustomization;

/**
* Config to generate a utilities() in the low-level client
*/
private UtilitiesMethod utilitiesMethod;

private CustomizationConfig() {
}

Expand Down Expand Up @@ -393,4 +398,12 @@ public Map<String, String> getPaginationCustomization() {
public void setPaginationCustomization(Map<String, String> paginationCustomization) {
this.paginationCustomization = paginationCustomization;
}

public UtilitiesMethod getUtilitiesMethod() {
return utilitiesMethod;
}

public void setUtilitiesMethod(UtilitiesMethod utilitiesMethod) {
this.utilitiesMethod = utilitiesMethod;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package software.amazon.awssdk.codegen.model.config.customization;

import java.util.ArrayList;
import java.util.List;

/**
* Config required to generate the utilities method that returns an instance of
* hand-written Utilities class
*/
public class UtilitiesMethod {

public static final String METHOD_NAME = "utilities";

/** Fqcn of the return type of the operation */
private String returnType;

/**
* The utilities method will call a protected create() method in the hand-written Utilities class.
* These the ordered list of parameters that needs to be passed to the create method.
*/
private List<String> createMethodParams = new ArrayList<>();

public String getReturnType() {
return returnType;
}

public void setReturnType(String returnType) {
this.returnType = returnType;
}

public List<String> getCreateMethodParams() {
return createMethodParams;
}

public void setCreateMethodParams(List<String> createMethodParams) {
this.createMethodParams = createMethodParams;
}
}
Loading

0 comments on commit 87761e0

Please sign in to comment.