Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(AWSCore): Adding support for mx-central-1 region #5492

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading