Skip to content

Commit

Permalink
Merge pull request #3429 from aws/staging/353b4dad-d2e4-461c-8534-71e…
Browse files Browse the repository at this point in the history
…ddf014921

Pull request: release <- staging/353b4dad-d2e4-461c-8534-71eddf014921
  • Loading branch information
aws-sdk-java-automation authored Nov 12, 2024
2 parents 2a972bc + 7acdd97 commit 9112d7e
Show file tree
Hide file tree
Showing 497 changed files with 3,009 additions and 1,403 deletions.
48 changes: 48 additions & 0 deletions .changes/2.29.11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "2.29.11",
"date": "2024-11-12",
"entries": [
{
"type": "feature",
"category": "AWS CodeBuild",
"contributor": "",
"description": "AWS CodeBuild now supports non-containerized Linux and Windows builds on Reserved Capacity."
},
{
"type": "feature",
"category": "AWS Control Tower",
"contributor": "",
"description": "Added ResetEnabledControl API."
},
{
"type": "feature",
"category": "AWS Fault Injection Simulator",
"contributor": "",
"description": "This release adds support for generating experiment reports with the experiment report configuration"
},
{
"type": "feature",
"category": "Amazon GameLift",
"contributor": "",
"description": "Amazon GameLift releases container fleets support for general availability. Deploy Linux-based containerized game server software for hosting on Amazon GameLift."
},
{
"type": "feature",
"category": "Amazon Relational Database Service",
"contributor": "",
"description": "Updates Amazon RDS documentation for Amazon RDS Extended Support for Amazon Aurora MySQL."
},
{
"type": "feature",
"category": "Payment Cryptography Control Plane",
"contributor": "",
"description": "Updated ListAliases API with KeyArn filter."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
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.29.11__ __2024-11-12__
## __AWS CodeBuild__
- ### Features
- AWS CodeBuild now supports non-containerized Linux and Windows builds on Reserved Capacity.

## __AWS Control Tower__
- ### Features
- Added ResetEnabledControl API.

## __AWS Fault Injection Simulator__
- ### Features
- This release adds support for generating experiment reports with the experiment report configuration

## __AWS SDK for Java v2__
- ### Features
- Updated endpoint and partition metadata.

## __Amazon GameLift__
- ### Features
- Amazon GameLift releases container fleets support for general availability. Deploy Linux-based containerized game server software for hosting on Amazon GameLift.

## __Amazon Relational Database Service__
- ### Features
- Updates Amazon RDS documentation for Amazon RDS Extended Support for Amazon Aurora MySQL.

## __Payment Cryptography Control Plane__
- ### Features
- Updated ListAliases API with KeyArn filter.

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

Expand All @@ -102,7 +102,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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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.29.10</version>
<version>2.29.11</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 @@ -23,14 +23,17 @@
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import com.squareup.javapoet.TypeVariableName;
import java.util.EnumMap;
import java.util.Map;
import java.util.Optional;
import javax.lang.model.element.Modifier;
import software.amazon.awssdk.awscore.AwsExecutionAttribute;
import software.amazon.awssdk.awscore.client.config.AwsClientOption;
import software.amazon.awssdk.awscore.endpoints.AccountIdEndpointMode;
import software.amazon.awssdk.awscore.endpoints.AccountIdEndpointModeResolver;
import software.amazon.awssdk.awscore.internal.useragent.BusinessMetricsUtils;
import software.amazon.awssdk.codegen.internal.Utils;
import software.amazon.awssdk.codegen.model.intermediate.IntermediateModel;
import software.amazon.awssdk.codegen.model.internal.LocalParameter;
Expand All @@ -39,6 +42,9 @@
import software.amazon.awssdk.core.SelectedAuthScheme;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
import software.amazon.awssdk.core.interceptor.SdkInternalExecutionAttribute;
import software.amazon.awssdk.core.useragent.BusinessMetricFeatureId;
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.Identity;
import software.amazon.awssdk.utils.CompletableFutureUtils;
Expand Down Expand Up @@ -163,11 +169,51 @@ private Map<BuiltInParameter, LocalParameter> builtInsForClientBuilder(Map<Strin
return actualParams;
}

public Optional<MethodSpec> accountIdFromIdentityMethod() {
public void addAccountIdMethodsIfPresent(TypeSpec.Builder b) {
if (!hasAccountIdEndpointModeBuiltIn()) {
return Optional.empty();
return;
}

b.addMethod(resolveAndRecordAccountIdFromIdentityMethod());
b.addMethod(accountIdFromIdentityMethod());
b.addMethod(recordAccountIdEndpointModeMethod());
}

public MethodSpec recordAccountIdEndpointModeMethod() {
MethodSpec.Builder builder = MethodSpec.methodBuilder("recordAccountIdEndpointMode")
.addModifiers(PRIVATE, STATIC)
.addParameter(ExecutionAttributes.class, "executionAttributes")
.returns(String.class);
builder.addStatement("$T mode = executionAttributes.getAttribute($T.AWS_AUTH_ACCOUNT_ID_ENDPOINT_MODE)",
AccountIdEndpointMode.class, AwsExecutionAttribute.class);

builder.addStatement("$T.resolveAccountIdEndpointModeMetric(mode)"
+ ".ifPresent(m -> executionAttributes.getAttribute($T.BUSINESS_METRICS).addMetric(m))",
BusinessMetricsUtils.class, SdkInternalExecutionAttribute.class);

builder.addStatement("return mode.name().toLowerCase()");

return builder.build();
}

public MethodSpec resolveAndRecordAccountIdFromIdentityMethod() {
MethodSpec.Builder builder = MethodSpec.methodBuilder("resolveAndRecordAccountIdFromIdentity")
.addModifiers(PRIVATE, STATIC)
.addParameter(ExecutionAttributes.class, "executionAttributes")
.returns(String.class);
builder.addStatement("$T accountId = accountIdFromIdentity(executionAttributes.getAttribute($T.SELECTED_AUTH_SCHEME))",
String.class, SdkInternalExecutionAttribute.class);

builder.addStatement("executionAttributes.getAttribute($T.BUSINESS_METRICS).addMetric($T.RESOLVED_ACCOUNT_ID.value())",
SdkInternalExecutionAttribute.class, BusinessMetricFeatureId.class);

builder.addStatement("return accountId");

return builder.build();
}


public MethodSpec accountIdFromIdentityMethod() {
ParameterizedTypeName paramType = ParameterizedTypeName.get(ClassName.get(SelectedAuthScheme.class),
TypeVariableName.get("T"));

Expand All @@ -184,6 +230,6 @@ public Optional<MethodSpec> accountIdFromIdentityMethod() {
builder.addStatement("accountId = (($T) identity).accountId().orElse(null)", AwsCredentialsIdentity.class);
builder.endControlFlow();
builder.addStatement("return accountId");
return Optional.of(builder.build());
return builder.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public TypeSpec poetSpec() {
b.addMethod(signerProviderMethod());
}

endpointParamsKnowledgeIndex.accountIdFromIdentityMethod().ifPresent(b::addMethod);
endpointParamsKnowledgeIndex.addAccountIdMethodsIfPresent(b);
return b.build();
}

Expand Down Expand Up @@ -303,13 +303,10 @@ private MethodSpec ruleParams() {
b.addStatement(endpointProviderUtilsSetter("endpointBuiltIn", setter));
break;
case AWS_AUTH_ACCOUNT_ID:
b.addStatement("builder.$N(accountIdFromIdentity(executionAttributes.getAttribute($T.SELECTED_AUTH_SCHEME)))",
setter, SdkInternalExecutionAttribute.class);
b.addStatement("builder.$N(resolveAndRecordAccountIdFromIdentity(executionAttributes))", setter);
break;
case AWS_AUTH_ACCOUNT_ID_ENDPOINT_MODE:
b.addStatement("builder.$N(executionAttributes.getAttribute($T.$N).name().toLowerCase())",
setter, AwsExecutionAttribute.class,
model.getNamingStrategy().getEnumValueName(m.getBuiltInEnum().name()));
b.addStatement("builder.$N(recordAccountIdEndpointMode(executionAttributes))", setter);
break;
case AWS_S3_USE_GLOBAL_ENDPOINT:
b.addStatement("builder.$N(executionAttributes.getAttribute($T.$N))",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.interceptor.ExecutionAttributes;
import software.amazon.awssdk.core.interceptor.SdkExecutionAttribute;
import software.amazon.awssdk.core.interceptor.SdkInternalExecutionAttribute;
import software.amazon.awssdk.core.useragent.BusinessMetricFeatureId;
import software.amazon.awssdk.endpoints.Endpoint;
import software.amazon.awssdk.http.SdkHttpRequest;
import software.amazon.awssdk.regions.Region;
Expand Down Expand Up @@ -43,6 +44,8 @@ public final class AwsEndpointProviderUtils {
*/
public static String endpointBuiltIn(ExecutionAttributes executionAttributes) {
if (endpointIsOverridden(executionAttributes)) {
executionAttributes.getOptionalAttribute(SdkInternalExecutionAttribute.BUSINESS_METRICS).ifPresent(
metric -> metric.addMetric(BusinessMetricFeatureId.ENDPOINT_OVERRIDE.value()));
return invokeSafely(() -> {
URI endpointOverride = executionAttributes.getAttribute(SdkInternalExecutionAttribute.CLIENT_ENDPOINT_PROVIDER)
.clientEndpoint();
Expand Down
Loading

0 comments on commit 9112d7e

Please sign in to comment.