Skip to content

Commit

Permalink
Merge pull request #1916 from aws/staging/3f7d33c6-e39e-4345-9e9d-ccf…
Browse files Browse the repository at this point in the history
…b92c40606

Pull request: release <- staging/3f7d33c6-e39e-4345-9e9d-ccfb92c40606
  • Loading branch information
aws-sdk-java-automation authored Jan 27, 2022
2 parents 564d64b + d26811a commit 6295bcb
Show file tree
Hide file tree
Showing 375 changed files with 688 additions and 378 deletions.
36 changes: 36 additions & 0 deletions .changes/2.17.120.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "2.17.120",
"date": "2022-01-27",
"entries": [
{
"type": "feature",
"category": "Amazon OpenSearch Service",
"contributor": "",
"description": "Allows customers to get progress updates for blue/green deployments"
},
{
"type": "feature",
"category": "Managed Streaming for Kafka",
"contributor": "",
"description": "Amazon MSK has updated the CreateCluster and UpdateBrokerStorage API that allows you to specify volume throughput during cluster creation and broker volume updates."
},
{
"type": "feature",
"category": "Amazon Elastic Compute Cloud",
"contributor": "",
"description": "X2ezn instances are powered by Intel Cascade Lake CPUs that deliver turbo all core frequency of up to 4.5 GHz and up to 100 Gbps of networking bandwidth"
},
{
"type": "feature",
"category": "AWS Amplify",
"contributor": "",
"description": "Doc only update to the description of basicauthcredentials to describe the required encoding and format."
},
{
"type": "feature",
"category": "Amazon Connect Service",
"contributor": "",
"description": "This release adds support for configuring a custom chat duration when starting a new chat session via the StartChatContact API. The default value for chat duration is 25 hours, minimum configurable value is 1 hour (60 minutes) and maximum configurable value is 7 days (10,080 minutes)."
}
]
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# __2.17.120__ __2022-01-27__
## __AWS Amplify__
- ### Features
- Doc only update to the description of basicauthcredentials to describe the required encoding and format.

## __Amazon Connect Service__
- ### Features
- This release adds support for configuring a custom chat duration when starting a new chat session via the StartChatContact API. The default value for chat duration is 25 hours, minimum configurable value is 1 hour (60 minutes) and maximum configurable value is 7 days (10,080 minutes).

## __Amazon Elastic Compute Cloud__
- ### Features
- X2ezn instances are powered by Intel Cascade Lake CPUs that deliver turbo all core frequency of up to 4.5 GHz and up to 100 Gbps of networking bandwidth

## __Amazon OpenSearch Service__
- ### Features
- Allows customers to get progress updates for blue/green deployments

## __Managed Streaming for Kafka__
- ### Features
- Amazon MSK has updated the CreateCluster and UpdateBrokerStorage API that allows you to specify volume throughput during cluster creation and broker volume updates.

# __2.17.119__ __2022-01-26__
## __AWS SecurityHub__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.17.119</version>
<version>2.17.120</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.17.119</version>
<version>2.17.120</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.17.119</version>
<version>2.17.120</version>
</dependency>
```

Expand All @@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.17.119</version>
<version>2.17.120</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-app-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.17.119</version>
<version>2.17.120</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-lambda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.17.119</version>
<version>2.17.120</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetype-lambda</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.17.119</version>
<version>2.17.120</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.17.119</version>
<version>2.17.120</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetypes</artifactId>
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 @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.17.119</version>
<version>2.17.120</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 @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.17.119</version>
<version>2.17.120</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 @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.17.119</version>
<version>2.17.120</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
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.17.119</version>
<version>2.17.120</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 @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.17.119</version>
<version>2.17.120</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 @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.17.119</version>
<version>2.17.120</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.17.119</version>
<version>2.17.120</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.17.119</version>
<version>2.17.120</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 @@ -155,6 +155,7 @@ public Map<String, OperationModel> constructOperations() {

operationModel.setOperationName(operationName);
operationModel.setDeprecated(op.isDeprecated());
operationModel.setDeprecatedMessage(op.getDeprecatedMessage());
operationModel.setDocumentation(op.getDocumentation());
operationModel.setIsAuthenticated(isAuthenticated(op));
operationModel.setAuthType(op.getAuthtype());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class OperationModel extends DocumentationModel {

private boolean deprecated;

private String deprecatedMessage;

private VariableModel input;

private ReturnTypeModel returnType;
Expand Down Expand Up @@ -84,6 +86,14 @@ public void setDeprecated(boolean deprecated) {
this.deprecated = deprecated;
}

public String getDeprecatedMessage() {
return deprecatedMessage;
}

public void setDeprecatedMessage(String deprecatedMessage) {
this.deprecatedMessage = deprecatedMessage;
}

public String getDocs(IntermediateModel model,
ClientType clientType) {
return OperationDocs.getDocs(model, this, clientType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class Operation {

private boolean deprecated;

private String deprecatedMessage;

private Http http;

private Input input;
Expand Down Expand Up @@ -67,6 +69,14 @@ public void setDeprecated(boolean deprecated) {
this.deprecated = deprecated;
}

public String getDeprecatedMessage() {
return deprecatedMessage;
}

public void setDeprecatedMessage(String deprecatedMessage) {
this.deprecatedMessage = deprecatedMessage;
}

public Http getHttp() {
return http;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import software.amazon.awssdk.codegen.poet.PoetExtensions;
import software.amazon.awssdk.codegen.poet.PoetUtils;
import software.amazon.awssdk.codegen.poet.eventstream.EventStreamUtils;
import software.amazon.awssdk.codegen.poet.model.DeprecationUtils;
import software.amazon.awssdk.codegen.utils.PaginatorUtils;
import software.amazon.awssdk.core.SdkClient;
import software.amazon.awssdk.core.async.AsyncRequestBody;
Expand Down Expand Up @@ -179,7 +180,9 @@ private Stream<MethodSpec> operationsAndSimpleMethods(OperationModel operationMo
methods.addAll(traditionalMethods(operationModel));
methods.addAll(overloadMethods(operationModel));
methods.addAll(paginatedMethods(operationModel));
return methods.stream();
return methods.stream()
// Add Deprecated annotation if needed to all overloads
.map(m -> DeprecationUtils.checkDeprecated(operationModel, m));
}

private List<MethodSpec> paginatedMethods(OperationModel opModel) {
Expand Down Expand Up @@ -406,7 +409,7 @@ private MethodSpec.Builder methodSignatureWithReturnType(OperationModel opModel)
*/
private MethodSpec.Builder interfaceMethodSignature(OperationModel opModel) {
return methodSignatureWithReturnType(opModel)
.addModifiers(Modifier.PUBLIC, Modifier.DEFAULT);
.addModifiers(Modifier.PUBLIC, Modifier.DEFAULT);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static MethodSpec consumerBuilderVariant(MethodSpec spec, String javadoc) {
MethodSpec.Builder result = MethodSpec.methodBuilder(spec.name)
.returns(spec.returnType)
.addExceptions(spec.exceptions)
.addAnnotations(spec.annotations)
.addJavadoc(javadoc)
.addModifiers(Modifier.PUBLIC, Modifier.DEFAULT)
.addTypeVariables(spec.typeVariables)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import software.amazon.awssdk.codegen.poet.ClassSpec;
import software.amazon.awssdk.codegen.poet.PoetExtensions;
import software.amazon.awssdk.codegen.poet.PoetUtils;
import software.amazon.awssdk.codegen.poet.model.DeprecationUtils;
import software.amazon.awssdk.codegen.utils.PaginatorUtils;
import software.amazon.awssdk.core.ResponseBytes;
import software.amazon.awssdk.core.ResponseInputStream;
Expand Down Expand Up @@ -176,7 +177,10 @@ private List<MethodSpec> operationMethodSpec(OperationModel opModel) {
methods.addAll(streamingSimpleMethods(opModel));
methods.addAll(paginatedMethods(opModel));

return methods;
return methods.stream()
// Add Deprecated annotation if needed to all overloads
.map(m -> DeprecationUtils.checkDeprecated(opModel, m))
.collect(toList());
}

private MethodSpec simpleMethod(OperationModel opModel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.squareup.javapoet.MethodSpec;
import java.util.List;
import software.amazon.awssdk.codegen.model.intermediate.MemberModel;
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
import software.amazon.awssdk.utils.StringUtils;

public final class DeprecationUtils {
Expand Down Expand Up @@ -49,6 +50,24 @@ public static MethodSpec checkDeprecated(MemberModel member, MethodSpec method)
return builder.build();
}

/**
* If a given operation is modeled as deprecated, add the {@link Deprecated} annotation to the method and, if the method
* already has existing Javadoc, append a section with the {@code @deprecated} tag.
*/
public static MethodSpec checkDeprecated(OperationModel operation, MethodSpec method) {
if (!operation.isDeprecated() || method.annotations.contains(DEPRECATED)) {
return method;
}
MethodSpec.Builder builder = method.toBuilder().addAnnotation(DEPRECATED);
if (!method.javadoc.isEmpty()) {
builder.addJavadoc(LF + "@deprecated");
if (StringUtils.isNotBlank(operation.getDeprecatedMessage())) {
builder.addJavadoc(" $L", operation.getDeprecatedMessage());
}
}
return builder.build();
}

public static List<MethodSpec> checkDeprecated(MemberModel member, List<MethodSpec> methods) {
return methods.stream().map(methodSpec -> checkDeprecated(member, methodSpec)).collect(toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"shape": "InvalidInputException"
}
],
"deprecated": true,
"deprecatedMessage": "This API is deprecated, use something else",
"documentation": "<p>Performs a post operation to the query service and has no output</p>"
},
"GetWithoutRequiredMembers": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ static JsonAsyncClientBuilder builder() {
* @sample JsonAsyncClient.APostOperation
* @see <a href="https://docs.aws.amazon.com/goto/WebAPI/json-service-2010-05-08/APostOperation" target="_top">AWS
* API Documentation</a>
*
* @deprecated This API is deprecated, use something else
*/
@Deprecated
default CompletableFuture<APostOperationResponse> aPostOperation(APostOperationRequest aPostOperationRequest) {
throw new UnsupportedOperationException();
}
Expand Down Expand Up @@ -128,7 +131,10 @@ default CompletableFuture<APostOperationResponse> aPostOperation(APostOperationR
* @sample JsonAsyncClient.APostOperation
* @see <a href="https://docs.aws.amazon.com/goto/WebAPI/json-service-2010-05-08/APostOperation" target="_top">AWS
* API Documentation</a>
*
* @deprecated This API is deprecated, use something else
*/
@Deprecated
default CompletableFuture<APostOperationResponse> aPostOperation(Consumer<APostOperationRequest.Builder> aPostOperationRequest) {
return aPostOperation(APostOperationRequest.builder().applyMutation(aPostOperationRequest).build());
}
Expand Down Expand Up @@ -1449,4 +1455,4 @@ default CompletableFuture<StreamingOutputOperationResponse> streamingOutputOpera
default JsonUtilities utilities() {
throw new UnsupportedOperationException();
}
}
}
Loading

0 comments on commit 6295bcb

Please sign in to comment.