Skip to content

Commit

Permalink
Merge pull request #3039 from aws/staging/2ccc9426-3a56-4c82-a042-a71…
Browse files Browse the repository at this point in the history
…052bac546

Pull request: release <- staging/2ccc9426-3a56-4c82-a042-a71052bac546
  • Loading branch information
aws-sdk-java-automation authored May 20, 2024
2 parents 5aeb146 + 6ae10c1 commit 43a9e7c
Show file tree
Hide file tree
Showing 481 changed files with 1,539 additions and 522 deletions.
48 changes: 48 additions & 0 deletions .changes/2.25.56.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "2.25.56",
"date": "2024-05-20",
"entries": [
{
"type": "feature",
"category": "AWS Control Tower",
"contributor": "",
"description": "Added ListControlOperations API and filtering support for ListEnabledControls API. Updates also includes added metadata for enabled controls and control operations."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Add the reason for failure in the exception thrown whenever a waiter transitions to a failure state."
},
{
"type": "feature",
"category": "AWS Secrets Manager",
"contributor": "",
"description": "add v2 smoke tests and smithy smokeTests trait for SDK testing"
},
{
"type": "feature",
"category": "Agents for Amazon Bedrock",
"contributor": "",
"description": "This release adds support for using Guardrails with Bedrock Agents."
},
{
"type": "feature",
"category": "Agents for Amazon Bedrock Runtime",
"contributor": "",
"description": "This release adds support for using Guardrails with Bedrock Agents."
},
{
"type": "feature",
"category": "Amazon OpenSearch Ingestion",
"contributor": "",
"description": "Add support for creating an OpenSearch Ingestion pipeline that is attached to a provided VPC. Add information about the destinations of an OpenSearch Ingestion pipeline to the GetPipeline and ListPipelines APIs."
},
{
"type": "feature",
"category": "Amazon Relational Database Service",
"contributor": "",
"description": "This release adds support for EngineLifecycleSupport on DBInstances, DBClusters, and GlobalClusters."
}
]
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
# __2.25.56__ __2024-05-20__
## __AWS Control Tower__
- ### Features
- Added ListControlOperations API and filtering support for ListEnabledControls API. Updates also includes added metadata for enabled controls and control operations.

## __AWS SDK for Java v2__
- ### Features
- Add the reason for failure in the exception thrown whenever a waiter transitions to a failure state.

## __AWS Secrets Manager__
- ### Features
- add v2 smoke tests and smithy smokeTests trait for SDK testing

## __Agents for Amazon Bedrock__
- ### Features
- This release adds support for using Guardrails with Bedrock Agents.

## __Agents for Amazon Bedrock Runtime__
- ### Features
- This release adds support for using Guardrails with Bedrock Agents.

## __Amazon OpenSearch Ingestion__
- ### Features
- Add support for creating an OpenSearch Ingestion pipeline that is attached to a provided VPC. Add information about the destinations of an OpenSearch Ingestion pipeline to the GetPipeline and ListPipelines APIs.

## __Amazon Relational Database Service__
- ### Features
- This release adds support for EngineLifecycleSupport on DBInstances, DBClusters, and GlobalClusters.

# __2.25.55__ __2024-05-17__
## __AWS CodeBuild__
- ### 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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundle-logging-bridge/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.25.55</version>
<version>2.25.56</version>
</parent>
<artifactId>bundle-logging-bridge</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion bundle-sdk/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.25.55</version>
<version>2.25.56</version>
</parent>
<artifactId>bundle-sdk</artifactId>
<packaging>jar</packaging>
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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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.25.55</version>
<version>2.25.56</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 @@ -40,6 +40,7 @@
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.lang.model.element.Modifier;
Expand Down Expand Up @@ -69,6 +70,12 @@
*/
public abstract class BaseWaiterClassSpec implements ClassSpec {

public static final String FAILURE_MESSAGE_FORMAT_FOR_PATH_MATCHER = "A waiter acceptor with the matcher (%s) "
+ "was matched on parameter (%s=%s) and "
+ "transitioned the waiter to failure state";
public static final String FAILURE_MESSAGE_FORMAT_FOR_ERROR_MATCHER = "A waiter acceptor was matched on error "
+ "condition (%s) and transitioned the waiter to "
+ "failure state";
private static final String WAITERS_USER_AGENT = "waiter";
private final IntermediateModel model;
private final String modelPackage;
Expand Down Expand Up @@ -459,16 +466,19 @@ private CodeBlock acceptor(Acceptor acceptor) {
case "path":
result.add("OnResponseAcceptor(");
result.add(pathAcceptorBody(acceptor));
addFailureMessageForPathMatcher(acceptor, result);
result.add(")");
break;
case "pathAll":
result.add("OnResponseAcceptor(");
result.add(pathAllAcceptorBody(acceptor));
addFailureMessageForPathMatcher(acceptor, result);
result.add(")");
break;
case "pathAny":
result.add("OnResponseAcceptor(");
result.add(pathAnyAcceptorBody(acceptor));
addFailureMessageForPathMatcher(acceptor, result);
result.add(")");
break;
case "status":
Expand All @@ -483,6 +493,8 @@ private CodeBlock acceptor(Acceptor acceptor) {
} else {
result.add("OnExceptionAcceptor(");
result.add(errorAcceptorBody(acceptor));
addAcceptorFailureMessage(result, acceptor, () -> String.format(FAILURE_MESSAGE_FORMAT_FOR_ERROR_MATCHER,
expectedValue(acceptor)));
result.add(")");
}
break;
Expand All @@ -493,6 +505,27 @@ private CodeBlock acceptor(Acceptor acceptor) {
return result.build();
}

private void addFailureMessageForPathMatcher(Acceptor acceptor, CodeBlock.Builder result) {
addAcceptorFailureMessage(result, acceptor,
() -> String.format(FAILURE_MESSAGE_FORMAT_FOR_PATH_MATCHER,
acceptor.getMatcher(),
acceptor.getArgument(),
expectedValue(acceptor)));
}

private void addAcceptorFailureMessage(CodeBlock.Builder result, Acceptor acceptor, Supplier<String> messageSupplier) {
if ("failure".equals(acceptor.getState())) {
result.add(", ");
result.add("$S", messageSupplier.get());
}
}

private static String expectedValue(Acceptor acceptor) {
return acceptor.getExpected() instanceof JrsBoolean
? String.valueOf(((JrsBoolean) acceptor.getExpected()).booleanValue())
: acceptor.getExpected().asText();
}

private CodeBlock.Builder booleanValueErrorBlock(Acceptor acceptor, Boolean expectedBoolean) {
CodeBlock.Builder codeBlock = CodeBlock.builder();
if (Boolean.FALSE.equals(expectedBoolean)) {
Expand All @@ -502,6 +535,8 @@ private CodeBlock.Builder booleanValueErrorBlock(Acceptor acceptor, Boolean expe
codeBlock.add("OnExceptionAcceptor(");
codeBlock.add("error -> errorCode(error) != null");
}
addAcceptorFailureMessage(codeBlock, acceptor, () -> String.format(FAILURE_MESSAGE_FORMAT_FOR_ERROR_MATCHER,
expectedValue(acceptor)));
codeBlock.add(")");
return codeBlock;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Objects;
import java.util.function.Function;
import software.amazon.awssdk.annotations.Generated;
Expand All @@ -24,6 +25,10 @@ import software.amazon.awssdk.utils.ToString;
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
public final class WaitersRuntime {

private static final String FAILURE_MESSAGE_FORMAT_FOR_STATUS_MATCHER = "A waiter acceptor was matched on HTTP response "
+ "status code (%d) and transitioned the waiter to "
+ "failure state";
/**
* The default acceptors that should be matched *last* in the list of acceptors used by the SDK client waiters.
*/
Expand Down Expand Up @@ -72,5 +77,11 @@ public final class WaitersRuntime {

return false;
}

@Override
public Optional<String> message() {
return waiterState == WaiterState.FAILURE ? Optional.of(String.format(FAILURE_MESSAGE_FORMAT_FOR_STATUS_MATCHER,
statusCode)) : Optional.empty();
}
}
}
2 changes: 1 addition & 1 deletion core/annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.25.55</version>
<version>2.25.56</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/arns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>core</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.25.55</version>
<version>2.25.56</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion core/auth-crt/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>core</artifactId>
<version>2.25.55</version>
<version>2.25.56</version>
</parent>

<artifactId>auth-crt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/auth/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>core</artifactId>
<version>2.25.55</version>
<version>2.25.56</version>
</parent>

<artifactId>auth</artifactId>
Expand Down
Loading

0 comments on commit 43a9e7c

Please sign in to comment.