Skip to content

Commit b1475e1

Browse files
tylerjroachEdison Zhang
and
Edison Zhang
authored
feat: Support for mx-central-1 (#3656)
Co-authored-by: Edison Zhang <edisonzz@amazon.com>
1 parent f81d941 commit b1475e1

File tree

4 files changed

+43
-1
lines changed

4 files changed

+43
-1
lines changed

aws-android-sdk-core/src/main/java/com/amazonaws/regions/RegionDefaults.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,33 @@ public static List<Region> getRegions() {
749749
updateRegion(region, "sqs", "sqs.ap-southeast-7.amazonaws.com", false, true);
750750
updateRegion(region, "sts", "sts.ap-southeast-7.amazonaws.com", false, true);
751751

752+
// Support for Mexico `mx-central-1` region
753+
region = new Region("mx-central-1", "amazonaws.com");
754+
ret.add(region);
755+
updateRegion(region, "autoscaling", "autoscaling.mx-central-1.amazonaws.com", false, true);
756+
updateRegion(region, "cognito-identity", "cognito-identity.mx-central-1.amazonaws.com",
757+
false, true);
758+
updateRegion(region, "cognito-idp", "cognito-idp.mx-central-1.amazonaws.com", false, true);
759+
updateRegion(region, "cognito-sync", "cognito-sync.mx-central-1.amazonaws.com", false,
760+
true);
761+
updateRegion(region, "data.iot", "data.iot.mx-central-1.amazonaws.com", false, true);
762+
updateRegion(region, "dynamodb", "dynamodb.mx-central-1.amazonaws.com", false, true);
763+
updateRegion(region, "ec2", "ec2.mx-central-1.amazonaws.com", false, true);
764+
updateRegion(region, "elasticloadbalancing",
765+
"elasticloadbalancing.mx-central-1.amazonaws.com", false, true);
766+
updateRegion(region, "firehose", "firehose.mx-central-1.amazonaws.com", false, true);
767+
updateRegion(region, "iot", "iot.mx-central-1.amazonaws.com", false, true);
768+
updateRegion(region, "kinesis", "kinesis.mx-central-1.amazonaws.com", false, true);
769+
updateRegion(region, "kms", "kms.mx-central-1.amazonaws.com", false, true);
770+
updateRegion(region, "lambda", "lambda.mx-central-1.amazonaws.com", false, true);
771+
updateRegion(region, "logs", "logs.mx-central-1.amazonaws.com", false, true);
772+
updateRegion(region, "polly", "polly.mx-central-1.amazonaws.com", false, true);
773+
updateRegion(region, "s3", "s3.mx-central-1.amazonaws.com", false, true);
774+
updateRegion(region, "sdb", "sdb.mx-central-1.amazonaws.com", false, true);
775+
updateRegion(region, "sns", "sns.mx-central-1.amazonaws.com", false, true);
776+
updateRegion(region, "sqs", "sqs.mx-central-1.amazonaws.com", false, true);
777+
updateRegion(region, "sts", "sts.mx-central-1.amazonaws.com", false, true);
778+
752779
// Support for Israel (Tel Aviv) `il-central-1` region
753780
region = new Region("il-central-1", "amazonaws.com");
754781
ret.add(region);

aws-android-sdk-core/src/main/java/com/amazonaws/regions/Regions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ public enum Regions {
8383
/** ap-southeast-7. */
8484
AP_SOUTHEAST_7("ap-southeast-7"),
8585

86+
/** mx-central-1. */
87+
MX_CENTRAL_1("mx-central-1"),
88+
8689
/** ap-northeast-1. */
8790
AP_NORTHEAST_1("ap-northeast-1"),
8891

aws-android-sdk-core/src/test/java/com/amazonaws/regions/RegionUtilsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void testGetRegionByEndpointWithBogusEndpoint() {
4646
@Test
4747
public void testGetRegionsForService() {
4848
List<Region> regions = RegionUtils.getRegionsForService(ServiceAbbreviations.SimpleDB);
49-
assertEquals(regions.size(), 19);
49+
assertEquals(regions.size(), 20);
5050
boolean usEast1 = false;
5151
boolean usWest1 = false;
5252
for (Region curr : regions) {

aws-android-sdk-s3/src/main/java/com/amazonaws/services/s3/model/Region.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,18 @@ public enum Region {
412412
*/
413413
AP_Bangkok("ap-southeast-7"),
414414

415+
/**
416+
* The Mexico Region. This region uses Amazon S3 servers
417+
* located in Mexico.
418+
* <p>
419+
* When using buckets in this region, set the client endpoint to
420+
* <code>s3-mx-central-1.amazonaws.com</code> on all requests to these buckets
421+
* to reduce any latency experienced after the first hour of creating a
422+
* bucket in this region.
423+
* </p>
424+
*/
425+
MX_CENTRAL("mx-central-1"),
426+
415427
/**
416428
* The Israel (Tel Aviv) Region. This region uses Amazon S3 servers
417429
* located in Tel Aviv.

0 commit comments

Comments
 (0)