From 383b1576a5aedc05c5ec481f7f4cd0f63e86ada1 Mon Sep 17 00:00:00 2001 From: Michael Law <1365977+lawmicha@users.noreply.github.com> Date: Thu, 22 Aug 2024 11:32:05 -0400 Subject: [PATCH] feat: support for ap-southeast-5 --- .../com/amazonaws/regions/RegionDefaults.java | 27 +++++++++++++++++++ .../java/com/amazonaws/regions/Regions.java | 3 +++ .../amazonaws/regions/RegionUtilsTest.java | 2 +- .../amazonaws/services/s3/model/Region.java | 12 +++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionDefaults.java b/aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionDefaults.java index bcdc6a9966..d223dbdfa0 100644 --- a/aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionDefaults.java +++ b/aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionDefaults.java @@ -695,6 +695,33 @@ public static List getRegions() { updateRegion(region, "sqs", "sqs.ap-southeast-4.amazonaws.com", false, true); updateRegion(region, "sts", "sts.ap-southeast-4.amazonaws.com", false, true); + // Support for Asia Pacific (Malaysia) `ap-southeast-5` region + region = new Region("ap-southeast-5", "amazonaws.com"); + ret.add(region); + updateRegion(region, "autoscaling", "autoscaling.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "cognito-identity", "cognito-identity.ap-southeast-5.amazonaws.com", + false, true); + updateRegion(region, "cognito-idp", "cognito-idp.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "cognito-sync", "cognito-sync.ap-southeast-5.amazonaws.com", false, + true); + updateRegion(region, "data.iot", "data.iot.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "dynamodb", "dynamodb.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "ec2", "ec2.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "elasticloadbalancing", + "elasticloadbalancing.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "firehose", "firehose.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "iot", "iot.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "kinesis", "kinesis.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "kms", "kms.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "lambda", "lambda.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "logs", "logs.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "polly", "polly.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "s3", "s3.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "sdb", "sdb.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "sns", "sns.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "sqs", "sqs.ap-southeast-5.amazonaws.com", false, true); + updateRegion(region, "sts", "sts.ap-southeast-5.amazonaws.com", false, true); + // Support for Israel (Tel Aviv) `il-central-1` region region = new Region("il-central-1", "amazonaws.com"); ret.add(region); diff --git a/aws-android-sdk-core/src/main/java/com/amazonaws/regions/Regions.java b/aws-android-sdk-core/src/main/java/com/amazonaws/regions/Regions.java index f5263c8d94..67f2fe1902 100644 --- a/aws-android-sdk-core/src/main/java/com/amazonaws/regions/Regions.java +++ b/aws-android-sdk-core/src/main/java/com/amazonaws/regions/Regions.java @@ -77,6 +77,9 @@ public enum Regions { /** ap-southeast-4. */ AP_SOUTHEAST_4("ap-southeast-4"), + /** ap-southeast-5. */ + AP_SOUTHEAST_5("ap-southeast-5"), + /** ap-northeast-1. */ AP_NORTHEAST_1("ap-northeast-1"), diff --git a/aws-android-sdk-core/src/test/java/com/amazonaws/regions/RegionUtilsTest.java b/aws-android-sdk-core/src/test/java/com/amazonaws/regions/RegionUtilsTest.java index 87eb8f8a4d..a30015d169 100644 --- a/aws-android-sdk-core/src/test/java/com/amazonaws/regions/RegionUtilsTest.java +++ b/aws-android-sdk-core/src/test/java/com/amazonaws/regions/RegionUtilsTest.java @@ -46,7 +46,7 @@ public void testGetRegionByEndpointWithBogusEndpoint() { @Test public void testGetRegionsForService() { List regions = RegionUtils.getRegionsForService(ServiceAbbreviations.SimpleDB); - assertEquals(regions.size(), 17); + assertEquals(regions.size(), 18); boolean usEast1 = false; boolean usWest1 = false; for (Region curr : regions) { diff --git a/aws-android-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Region.java b/aws-android-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Region.java index 84c77d8d8c..539bab673e 100644 --- a/aws-android-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Region.java +++ b/aws-android-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Region.java @@ -388,6 +388,18 @@ public enum Region { */ AP_Melbourne("ap-southeast-4"), + /** + * The Asia Pacific (Malaysia) Region. This region uses Amazon S3 servers + * located in Malaysia. + *

+ * When using buckets in this region, set the client endpoint to + * s3-ap-southeast-5.amazonaws.com on all requests to these buckets + * to reduce any latency experienced after the first hour of creating a + * bucket in this region. + *

+ */ + AP_Malaysia("ap-southeast-5"), + /** * The Israel (Tel Aviv) Region. This region uses Amazon S3 servers * located in Tel Aviv.