Skip to content

Commit

Permalink
feat(AWSCore): Adding support for mx-central-1 region (#5492)
Browse files Browse the repository at this point in the history
* feat(AWSCore): Adding support for mx-central-1 region

* address review comments

---------

Co-authored-by: Abhash Kumar Singh <thisisabhash@gmail.com>
  • Loading branch information
tylerjroach and thisisabhash authored Jan 14, 2025
1 parent 95a2a45 commit 50b5bc5
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AWSCore/Service/AWSService.m
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ - (id)copyWithZone:(NSZone *)zone {
static NSString *const AWSRegionNameEUSouth1 = @"eu-south-1";
static NSString *const AWSRegionNameEUSouth2 = @"eu-south-2";
static NSString *const AWSRegionNameILCentral1 = @"il-central-1";
static NSString *const AWSRegionNameMXCentral1 = @"mx-central-1";

static NSString *const AWSServiceNameAPIGateway = @"execute-api";
static NSString *const AWSServiceNameAutoScaling = @"autoscaling";
Expand Down Expand Up @@ -522,6 +523,8 @@ + (NSString *)regionNameFromType:(AWSRegionType)regionType {
return AWSRegionNameEUSouth1;
case AWSRegionEUSouth2:
return AWSRegionNameEUSouth2;
case AWSRegionMXCentral1:
return AWSRegionNameMXCentral1;
default:
return nil;
}
Expand Down
4 changes: 4 additions & 0 deletions AWSCore/Service/AWSServiceEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ typedef NS_ENUM(NSInteger, AWSRegionType) {
* Israel (Tel Aviv)
*/
AWSRegionILCentral1 NS_SWIFT_NAME(ILCentral1),
/**
* Mexico (Central)
*/
AWSRegionMXCentral1 NS_SWIFT_NAME(MXCentral1),
};

/**
Expand Down
6 changes: 6 additions & 0 deletions AWSCore/Utility/AWSCategory.m
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,12 @@ - (AWSRegionType)aws_regionTypeValue {
|| [self isEqualToString:@"il-central-1"]) {
return AWSRegionILCentral1;
}

if ([self isEqualToString:@"AWSRegionMXCentral1"]
|| [self isEqualToString:@"MXCentral1"]
|| [self isEqualToString:@"mx-central-1"]) {
return AWSRegionMXCentral1;
}

return AWSRegionUnknown;
}
Expand Down
1 change: 1 addition & 0 deletions AWSS3/AWSS3Model.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ typedef NS_ENUM(NSInteger, AWSS3BucketLocationConstraint) {
AWSS3BucketLocationConstraintUSGovWest1,
AWSS3BucketLocationConstraintUSWest1,
AWSS3BucketLocationConstraintUSWest2,
AWSS3BucketLocationConstraintMXCentral1,
};

typedef NS_ENUM(NSInteger, AWSS3BucketLogsPermission) {
Expand Down
10 changes: 10 additions & 0 deletions AWSS3/AWSS3Model.m
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,9 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
if ([value caseInsensitiveCompare:@"us-west-2"] == NSOrderedSame) {
return @(AWSS3BucketLocationConstraintUSWest2);
}
if ([value caseInsensitiveCompare:@"mx-central-1"] == NSOrderedSame) {
return @(AWSS3BucketLocationConstraintMXCentral1);
}
return @(AWSS3BucketLocationConstraintUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand Down Expand Up @@ -1373,6 +1376,8 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
return @"us-west-1";
case AWSS3BucketLocationConstraintUSWest2:
return @"us-west-2";
case AWSS3BucketLocationConstraintMXCentral1:
return @"mx-central-1";
default:
return nil;
}
Expand Down Expand Up @@ -2926,6 +2931,9 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
if ([value caseInsensitiveCompare:@"us-west-2"] == NSOrderedSame) {
return @(AWSS3BucketLocationConstraintUSWest2);
}
if ([value caseInsensitiveCompare:@"mx-central-1"] == NSOrderedSame) {
return @(AWSS3BucketLocationConstraintMXCentral1);
}
return @(AWSS3BucketLocationConstraintUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand Down Expand Up @@ -3001,6 +3009,8 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
return @"us-west-1";
case AWSS3BucketLocationConstraintUSWest2:
return @"us-west-2";
case AWSS3BucketLocationConstraintMXCentral1:
return @"mx-central-1";
default:
return nil;
}
Expand Down
1 change: 1 addition & 0 deletions AWSS3/AWSS3Resources.m
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,7 @@ - (NSString *)definitionString {
\"eu-west-1\",\
\"eu-west-2\",\
\"eu-west-3\",\
\"mx-central-1\",\
\"il-central-1\",\
\"me-central-1\",\
\"me-south-1\",\
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### New features
- **AWSCore**
- Support for `mx-central-1` - Mexico (see [AWS Regional Services List](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/) for a list of services supported in the region)

### Bug Fixes
- **AWSLocation**
- Fixing clock skew retries (#5491)
Expand Down

0 comments on commit 50b5bc5

Please sign in to comment.