Skip to content

Commit

Permalink
feat: Support for mx-central-1 (#3656)
Browse files Browse the repository at this point in the history
Co-authored-by: Edison Zhang <[email protected]>
  • Loading branch information
tylerjroach and Edison Zhang authored Jan 14, 2025
1 parent f81d941 commit b1475e1
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,33 @@ public static List<Region> getRegions() {
updateRegion(region, "sqs", "sqs.ap-southeast-7.amazonaws.com", false, true);
updateRegion(region, "sts", "sts.ap-southeast-7.amazonaws.com", false, true);

// Support for Mexico `mx-central-1` region
region = new Region("mx-central-1", "amazonaws.com");
ret.add(region);
updateRegion(region, "autoscaling", "autoscaling.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "cognito-identity", "cognito-identity.mx-central-1.amazonaws.com",
false, true);
updateRegion(region, "cognito-idp", "cognito-idp.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "cognito-sync", "cognito-sync.mx-central-1.amazonaws.com", false,
true);
updateRegion(region, "data.iot", "data.iot.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "dynamodb", "dynamodb.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "ec2", "ec2.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "elasticloadbalancing",
"elasticloadbalancing.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "firehose", "firehose.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "iot", "iot.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "kinesis", "kinesis.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "kms", "kms.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "lambda", "lambda.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "logs", "logs.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "polly", "polly.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "s3", "s3.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "sdb", "sdb.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "sns", "sns.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "sqs", "sqs.mx-central-1.amazonaws.com", false, true);
updateRegion(region, "sts", "sts.mx-central-1.amazonaws.com", false, true);

// Support for Israel (Tel Aviv) `il-central-1` region
region = new Region("il-central-1", "amazonaws.com");
ret.add(region);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public enum Regions {
/** ap-southeast-7. */
AP_SOUTHEAST_7("ap-southeast-7"),

/** mx-central-1. */
MX_CENTRAL_1("mx-central-1"),

/** ap-northeast-1. */
AP_NORTHEAST_1("ap-northeast-1"),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void testGetRegionByEndpointWithBogusEndpoint() {
@Test
public void testGetRegionsForService() {
List<Region> regions = RegionUtils.getRegionsForService(ServiceAbbreviations.SimpleDB);
assertEquals(regions.size(), 19);
assertEquals(regions.size(), 20);
boolean usEast1 = false;
boolean usWest1 = false;
for (Region curr : regions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,18 @@ public enum Region {
*/
AP_Bangkok("ap-southeast-7"),

/**
* The Mexico Region. This region uses Amazon S3 servers
* located in Mexico.
* <p>
* When using buckets in this region, set the client endpoint to
* <code>s3-mx-central-1.amazonaws.com</code> on all requests to these buckets
* to reduce any latency experienced after the first hour of creating a
* bucket in this region.
* </p>
*/
MX_CENTRAL("mx-central-1"),

/**
* The Israel (Tel Aviv) Region. This region uses Amazon S3 servers
* located in Tel Aviv.
Expand Down

0 comments on commit b1475e1

Please sign in to comment.