Skip to content

Commit

Permalink
Merge pull request #3249 from aws/staging/d6dc3160-bbb0-4a8d-aefb-c77…
Browse files Browse the repository at this point in the history
…155347496

Pull request: release <- staging/d6dc3160-bbb0-4a8d-aefb-c77155347496
  • Loading branch information
aws-sdk-java-automation committed Sep 13, 2024
2 parents c8a6734 + 6026637 commit 9f9a94a
Show file tree
Hide file tree
Showing 549 changed files with 2,949 additions and 1,150 deletions.
48 changes: 48 additions & 0 deletions .changes/2.28.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "2.28.1",
"date": "2024-09-13",
"entries": [
{
"type": "bugfix",
"category": "Amazon S3",
"contributor": "",
"description": "Fix issue where the `AWS_USE_DUALSTACK_ENDPOINT` environment variable and `aws.useDualstackEndpoint` system property are not resolved during client creation time."
},
{
"type": "bugfix",
"category": "Amazon S3 Control",
"contributor": "",
"description": "Fix issue where the `AWS_USE_DUALSTACK_ENDPOINT` environment variable and `aws.useDualstackEndpoint` system property are not resolved during client creation time."
},
{
"type": "feature",
"category": "AWS Amplify",
"contributor": "",
"description": "Doc only update to Amplify to explain platform setting for Next.js 14 SSG only applications"
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Add support for specifying endpoint overrides using environment variables, system properties or profile files. More information about this feature is available here: https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html"
},
{
"type": "feature",
"category": "Amazon Interactive Video Service",
"contributor": "",
"description": "Updates to all tags descriptions."
},
{
"type": "feature",
"category": "Amazon Interactive Video Service Chat",
"contributor": "",
"description": "Updates to all tags descriptions."
},
{
"type": "feature",
"category": "AWS SDK for Java v2",
"contributor": "",
"description": "Updated endpoint and partition metadata."
}
]
}
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
#### 👋 _Looking for changelogs for older versions? You can find them in the [changelogs](./changelogs) directory._
# __2.28.1__ __2024-09-13__
## __AWS Amplify__
- ### Features
- Doc only update to Amplify to explain platform setting for Next.js 14 SSG only applications

## __AWS SDK for Java v2__
- ### Features
- Add support for specifying endpoint overrides using environment variables, system properties or profile files. More information about this feature is available here: https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html
- Updated endpoint and partition metadata.

## __Amazon Interactive Video Service__
- ### Features
- Updates to all tags descriptions.

## __Amazon Interactive Video Service Chat__
- ### Features
- Updates to all tags descriptions.

## __Amazon S3__
- ### Bugfixes
- Fix issue where the `AWS_USE_DUALSTACK_ENDPOINT` environment variable and `aws.useDualstackEndpoint` system property are not resolved during client creation time.

## __Amazon S3 Control__
- ### Bugfixes
- Fix issue where the `AWS_USE_DUALSTACK_ENDPOINT` environment variable and `aws.useDualstackEndpoint` system property are not resolved during client creation time.

# __2.28.0__ __2024-09-12__
## __AWS Elemental MediaConvert__
- ### Features
Expand Down
8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ Please keep the following in mind when considering a code contribution:
be assigned to it.

If you are thinking about adding entirely new functionality, open a [Feature
Request](#feature-requests) or [ping][gitter] the maintainers to ask for
feedback first before beginning work; again this is to make sure that no one
else is already working on it, and also that it makes sense to be included in
the SDK.
Request](#feature-requests) to ask for feedback first before beginning work;
again this is to make sure that no one else is already working on it, and
also that it makes sense to be included in the SDK.
* All code contributions must be accompanied with new or modified tests that
verify that the code works as expected; i.e. that the issue has been fixed or
that the functionality works as intended.
Expand Down Expand Up @@ -162,6 +161,5 @@ when contributing to the SDK.
[label-doc-issue]: https://github.com/aws/aws-sdk-java-v2/labels/documentation
[label-feature-request]: https://github.com/aws/aws-sdk-java-v2/labels/feature-request
[git-rewriting-history]: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
[gitter]: https://gitter.im/aws/aws-sdk-java-v2
[bug-report]: https://github.com/aws/aws-sdk-java-v2/issues/new?assignees=&labels=bug%2Cneeds-triage&template=bug-report.yml&title=%28short+issue+description%29
[feature-request]: https://github.com/aws/aws-sdk-java-v2/issues/new?assignees=&labels=feature-request%2Cneeds-triage&template=feature-request.yml&title=%28short+issue+description%29
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# AWS SDK for Java 2.0
![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiTFJSRXBBN1hkU1ZEQzZ4M1hoaWlFUExuNER3WjNpVllSQ09Qam1YdFlTSDNTd3RpZzNia3F0VkJRUTBwZlQwR1BEelpSV2dWVnp4YTBCOFZKRzRUR004PSIsIml2UGFyYW1ldGVyU3BlYyI6ImdHdEp1UHhKckpDRmhmQU4iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)
[![Maven](https://img.shields.io/maven-central/v/software.amazon.awssdk/s3.svg?label=Maven)](https://search.maven.org/search?q=g:%22software.amazon.awssdk%22%20AND%20a:%22s3%22)
[![Gitter](https://badges.gitter.im/aws/aws-sdk-java-v2.svg)](https://gitter.im/aws/aws-sdk-java-v2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![codecov](https://codecov.io/gh/aws/aws-sdk-java-v2/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-sdk-java-v2)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-111-orange.svg?style=flat-square)](#contributors-)
Expand Down Expand Up @@ -52,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.28.0</version>
<version>2.28.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -86,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.28.0</version>
<version>2.28.1</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.28.0</version>
<version>2.28.1</version>
</dependency>
```

Expand All @@ -103,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.28.0</version>
<version>2.28.1</version>
</dependency>
```

Expand Down Expand Up @@ -173,7 +172,6 @@ We need your help in making this SDK great. Please participate in the community
[sdk-website]: http://aws.amazon.com/sdkforjava
[aws-java-sdk-bom]: https://github.com/aws/aws-sdk-java-v2/tree/master/bom
[stack-overflow]: http://stackoverflow.com/questions/tagged/aws-java-sdk
[gitter]: https://gitter.im/aws/aws-sdk-java-v2
[features]: https://github.com/aws/aws-sdk-java-v2/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature-request%22
[support-center]: https://console.aws.amazon.com/support/
[console]: https://console.aws.amazon.com
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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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.28.0</version>
<version>2.28.1</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 @@ -16,6 +16,7 @@
package software.amazon.awssdk.codegen.internal;

import static java.util.stream.Collectors.toList;
import static software.amazon.awssdk.utils.StringUtils.lowerCase;

import java.io.Closeable;
import java.io.File;
Expand Down Expand Up @@ -133,7 +134,7 @@ public static String removeLeading(String str, String toRemove) {
if (str == null) {
return null;
}
if (str.startsWith(toRemove)) {
if (lowerCase(str).startsWith(lowerCase(toRemove))) {
return str.substring(toRemove.length());
}
return str;
Expand All @@ -143,7 +144,7 @@ public static String removeTrailing(String str, String toRemove) {
if (str == null) {
return null;
}
if (str.endsWith(toRemove)) {
if (lowerCase(str).endsWith(lowerCase(toRemove))) {
return str.substring(0, str.length() - toRemove.length());
}
return str;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,42 @@ private static boolean isJavaKeyword(String word) {

@Override
public String getServiceName() {
String baseName = Stream.of(serviceModel.getMetadata().getServiceId())
.filter(Objects::nonNull)
.filter(s -> !s.trim().isEmpty())
.findFirst()
.orElseThrow(() -> new IllegalStateException("ServiceId is missing in the c2j model."));

String baseName = serviceId();
baseName = pascalCase(baseName);
baseName = removeRedundantPrefixesAndSuffixes(baseName);
return baseName;
}

// Special cases
baseName = Utils.removeLeading(baseName, "Amazon");
baseName = Utils.removeLeading(baseName, "Aws");
baseName = Utils.removeTrailing(baseName, "Service");
@Override
public String getServiceNameForEnvironmentVariables() {
String baseName = serviceId();
baseName = baseName.replace(' ', '_');
baseName = StringUtils.upperCase(baseName);
return baseName;
}

@Override
public String getServiceNameForSystemProperties() {
return getServiceName();
}

@Override
public String getServiceNameForProfileFile() {
return StringUtils.lowerCase(getServiceNameForEnvironmentVariables());
}

private String serviceId() {
return Stream.of(serviceModel.getMetadata().getServiceId())
.filter(Objects::nonNull)
.filter(s -> !s.trim().isEmpty())
.findFirst()
.orElseThrow(() -> new IllegalStateException("ServiceId is missing in the c2j model."));
}

private static String removeRedundantPrefixesAndSuffixes(String baseName) {
baseName = Utils.removeLeading(baseName, "amazon");
baseName = Utils.removeLeading(baseName, "aws");
baseName = Utils.removeTrailing(baseName, "service");
return baseName;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ public interface NamingStrategy {
*/
String getServiceName();

/**
* Retrieve the service name that should be used for environment variables.
*/
String getServiceNameForEnvironmentVariables();

/**
* Retrieve the service name that should be used for system properties.
*/
String getServiceNameForSystemProperties();

/**
* Retrieve the service name that should be used for profile properties.
*/
String getServiceNameForProfileFile();

/**
* Retrieve the client package name that should be used based on the service name.
*/
Expand Down
Loading

0 comments on commit 9f9a94a

Please sign in to comment.