Skip to content

Commit 50b5bc5

Browse files
feat(AWSCore): Adding support for mx-central-1 region (#5492)
* feat(AWSCore): Adding support for mx-central-1 region * address review comments --------- Co-authored-by: Abhash Kumar Singh <[email protected]>
1 parent 95a2a45 commit 50b5bc5

File tree

7 files changed

+29
-0
lines changed

7 files changed

+29
-0
lines changed

AWSCore/Service/AWSService.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ - (id)copyWithZone:(NSZone *)zone {
277277
static NSString *const AWSRegionNameEUSouth1 = @"eu-south-1";
278278
static NSString *const AWSRegionNameEUSouth2 = @"eu-south-2";
279279
static NSString *const AWSRegionNameILCentral1 = @"il-central-1";
280+
static NSString *const AWSRegionNameMXCentral1 = @"mx-central-1";
280281

281282
static NSString *const AWSServiceNameAPIGateway = @"execute-api";
282283
static NSString *const AWSServiceNameAutoScaling = @"autoscaling";
@@ -522,6 +523,8 @@ + (NSString *)regionNameFromType:(AWSRegionType)regionType {
522523
return AWSRegionNameEUSouth1;
523524
case AWSRegionEUSouth2:
524525
return AWSRegionNameEUSouth2;
526+
case AWSRegionMXCentral1:
527+
return AWSRegionNameMXCentral1;
525528
default:
526529
return nil;
527530
}

AWSCore/Service/AWSServiceEnum.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ typedef NS_ENUM(NSInteger, AWSRegionType) {
163163
* Israel (Tel Aviv)
164164
*/
165165
AWSRegionILCentral1 NS_SWIFT_NAME(ILCentral1),
166+
/**
167+
* Mexico (Central)
168+
*/
169+
AWSRegionMXCentral1 NS_SWIFT_NAME(MXCentral1),
166170
};
167171

168172
/**

AWSCore/Utility/AWSCategory.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,12 @@ - (AWSRegionType)aws_regionTypeValue {
642642
|| [self isEqualToString:@"il-central-1"]) {
643643
return AWSRegionILCentral1;
644644
}
645+
646+
if ([self isEqualToString:@"AWSRegionMXCentral1"]
647+
|| [self isEqualToString:@"MXCentral1"]
648+
|| [self isEqualToString:@"mx-central-1"]) {
649+
return AWSRegionMXCentral1;
650+
}
645651

646652
return AWSRegionUnknown;
647653
}

AWSS3/AWSS3Model.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ typedef NS_ENUM(NSInteger, AWSS3BucketLocationConstraint) {
9494
AWSS3BucketLocationConstraintUSGovWest1,
9595
AWSS3BucketLocationConstraintUSWest1,
9696
AWSS3BucketLocationConstraintUSWest2,
97+
AWSS3BucketLocationConstraintMXCentral1,
9798
};
9899

99100
typedef NS_ENUM(NSInteger, AWSS3BucketLogsPermission) {

AWSS3/AWSS3Model.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,9 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
12981298
if ([value caseInsensitiveCompare:@"us-west-2"] == NSOrderedSame) {
12991299
return @(AWSS3BucketLocationConstraintUSWest2);
13001300
}
1301+
if ([value caseInsensitiveCompare:@"mx-central-1"] == NSOrderedSame) {
1302+
return @(AWSS3BucketLocationConstraintMXCentral1);
1303+
}
13011304
return @(AWSS3BucketLocationConstraintUnknown);
13021305
} reverseBlock:^NSString *(NSNumber *value) {
13031306
switch ([value integerValue]) {
@@ -1373,6 +1376,8 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
13731376
return @"us-west-1";
13741377
case AWSS3BucketLocationConstraintUSWest2:
13751378
return @"us-west-2";
1379+
case AWSS3BucketLocationConstraintMXCentral1:
1380+
return @"mx-central-1";
13761381
default:
13771382
return nil;
13781383
}
@@ -2926,6 +2931,9 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
29262931
if ([value caseInsensitiveCompare:@"us-west-2"] == NSOrderedSame) {
29272932
return @(AWSS3BucketLocationConstraintUSWest2);
29282933
}
2934+
if ([value caseInsensitiveCompare:@"mx-central-1"] == NSOrderedSame) {
2935+
return @(AWSS3BucketLocationConstraintMXCentral1);
2936+
}
29292937
return @(AWSS3BucketLocationConstraintUnknown);
29302938
} reverseBlock:^NSString *(NSNumber *value) {
29312939
switch ([value integerValue]) {
@@ -3001,6 +3009,8 @@ + (NSValueTransformer *)locationConstraintJSONTransformer {
30013009
return @"us-west-1";
30023010
case AWSS3BucketLocationConstraintUSWest2:
30033011
return @"us-west-2";
3012+
case AWSS3BucketLocationConstraintMXCentral1:
3013+
return @"mx-central-1";
30043014
default:
30053015
return nil;
30063016
}

AWSS3/AWSS3Resources.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,7 @@ - (NSString *)definitionString {
13901390
\"eu-west-1\",\
13911391
\"eu-west-2\",\
13921392
\"eu-west-3\",\
1393+
\"mx-central-1\",\
13931394
\"il-central-1\",\
13941395
\"me-central-1\",\
13951396
\"me-south-1\",\

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### New features
6+
- **AWSCore**
7+
- 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)
8+
59
### Bug Fixes
610
- **AWSLocation**
711
- Fixing clock skew retries (#5491)

0 commit comments

Comments
 (0)