From 53d5e6e0771dceb40c3d3cb06e2c4937219ee1e5 Mon Sep 17 00:00:00 2001 From: Adolfo Date: Thu, 9 Feb 2023 09:51:22 +0100 Subject: [PATCH 1/3] Added the new AWS regions availables --- Sources/AWSLambdaEvents/AWSRegion.swift | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Sources/AWSLambdaEvents/AWSRegion.swift b/Sources/AWSLambdaEvents/AWSRegion.swift index 7af53d6..dcbc05a 100644 --- a/Sources/AWSLambdaEvents/AWSRegion.swift +++ b/Sources/AWSLambdaEvents/AWSRegion.swift @@ -26,19 +26,26 @@ public struct AWSRegion: RawRepresentable, Equatable { } static var all: [AWSRegion] = [ + Self.af_south_1, Self.ap_northeast_1, Self.ap_northeast_2, Self.ap_east_1, Self.ap_southeast_1, Self.ap_southeast_2, + Self.ap_southeast_3, + Self.ap_southeast_4, Self.ap_south_1, + Self.ap_south_2, Self.cn_north_1, Self.cn_northwest_1, Self.eu_north_1, + Self.eu_south_1, + Self.eu_south_2, Self.eu_west_1, Self.eu_west_2, Self.eu_west_3, Self.eu_central_1, + Self.eu_central_2, Self.us_east_1, Self.us_east_2, Self.us_west_1, @@ -47,24 +54,33 @@ public struct AWSRegion: RawRepresentable, Equatable { Self.us_gov_west_1, Self.ca_central_1, Self.sa_east_1, + Self.me_central_1, Self.me_south_1, ] + public static var af_south_1: Self { AWSRegion(rawValue: "af-south-1")! } + public static var ap_northeast_1: Self { AWSRegion(rawValue: "ap-northeast-1")! } public static var ap_northeast_2: Self { AWSRegion(rawValue: "ap-northeast-2")! } public static var ap_east_1: Self { AWSRegion(rawValue: "ap-east-1")! } public static var ap_southeast_1: Self { AWSRegion(rawValue: "ap-southeast-1")! } public static var ap_southeast_2: Self { AWSRegion(rawValue: "ap-southeast-2")! } + public static var ap_southeast_3: Self { AWSRegion(rawValue: "ap-southeast-3")! } + public static var ap_southeast_4: Self { AWSRegion(rawValue: "ap-southeast-4")! } public static var ap_south_1: Self { AWSRegion(rawValue: "ap-south-1")! } + public static var ap_south_2: Self { AWSRegion(rawValue: "ap-south-2")! } public static var cn_north_1: Self { AWSRegion(rawValue: "cn-north-1")! } public static var cn_northwest_1: Self { AWSRegion(rawValue: "cn-northwest-1")! } public static var eu_north_1: Self { AWSRegion(rawValue: "eu-north-1")! } + public static var eu_south_1: Self { AWSRegion(rawValue: "eu-south-1")! } + public static var eu_south_2: Self { AWSRegion(rawValue: "eu-south-2")! } public static var eu_west_1: Self { AWSRegion(rawValue: "eu-west-1")! } public static var eu_west_2: Self { AWSRegion(rawValue: "eu-west-2")! } public static var eu_west_3: Self { AWSRegion(rawValue: "eu-west-3")! } public static var eu_central_1: Self { AWSRegion(rawValue: "eu-central-1")! } + public static var eu_central_2: Self { AWSRegion(rawValue: "eu-central-2")! } public static var us_east_1: Self { AWSRegion(rawValue: "us-east-1")! } public static var us_east_2: Self { AWSRegion(rawValue: "us-east-2")! } @@ -75,6 +91,7 @@ public struct AWSRegion: RawRepresentable, Equatable { public static var ca_central_1: Self { AWSRegion(rawValue: "ca-central-1")! } public static var sa_east_1: Self { AWSRegion(rawValue: "sa-east-1")! } + public static var me_central_1: Self { AWSRegion(rawValue: "me-central-1")! } public static var me_south_1: Self { AWSRegion(rawValue: "me-south-1")! } } From d3e65577ee4c9a4b50d5740cdea393d9c4ffb0e8 Mon Sep 17 00:00:00 2001 From: fitomad Date: Wed, 7 Aug 2024 22:13:36 +0200 Subject: [PATCH 2/3] Adding new AWS regions --- Sources/AWSLambdaEvents/AWSRegion.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/AWSLambdaEvents/AWSRegion.swift b/Sources/AWSLambdaEvents/AWSRegion.swift index f3d7708..370ff27 100644 --- a/Sources/AWSLambdaEvents/AWSRegion.swift +++ b/Sources/AWSLambdaEvents/AWSRegion.swift @@ -29,6 +29,7 @@ public struct AWSRegion: RawRepresentable, Equatable, Sendable { Self.af_south_1, Self.ap_northeast_1, Self.ap_northeast_2, + Self.ap_northeast_3, Self.ap_east_1, Self.ap_southeast_1, Self.ap_southeast_2, @@ -53,15 +54,18 @@ public struct AWSRegion: RawRepresentable, Equatable, Sendable { Self.us_gov_east_1, Self.us_gov_west_1, Self.ca_central_1, + Self.ca_west_1, Self.sa_east_1, Self.me_central_1, Self.me_south_1, + Self.il_central_1 ] public static var af_south_1: Self { AWSRegion(rawValue: "af-south-1")! } public static var ap_northeast_1: Self { AWSRegion(rawValue: "ap-northeast-1")! } public static var ap_northeast_2: Self { AWSRegion(rawValue: "ap-northeast-2")! } + public static var ap_northeast_3: Self { AWSRegion(rawValue: "ap-northeast-3")! } public static var ap_east_1: Self { AWSRegion(rawValue: "ap-east-1")! } public static var ap_southeast_1: Self { AWSRegion(rawValue: "ap-southeast-1")! } public static var ap_southeast_2: Self { AWSRegion(rawValue: "ap-southeast-2")! } @@ -90,9 +94,12 @@ public struct AWSRegion: RawRepresentable, Equatable, Sendable { public static var us_gov_west_1: Self { AWSRegion(rawValue: "us-gov-west-1")! } public static var ca_central_1: Self { AWSRegion(rawValue: "ca-central-1")! } + public static var ca_west_1: Self { AWSRegion(rawValue: "ca-west-1")! } public static var sa_east_1: Self { AWSRegion(rawValue: "sa-east-1")! } public static var me_central_1: Self { AWSRegion(rawValue: "me-central-1")! } public static var me_south_1: Self { AWSRegion(rawValue: "me-south-1")! } + + public static var il_central_1: Self { AWSRegion(rawValue: "il-central-1")! } } extension AWSRegion: Codable { From 1f9f109b721f2e04b5112430def0d0163a536dc7 Mon Sep 17 00:00:00 2001 From: fitomad Date: Thu, 8 Aug 2024 09:22:07 +0200 Subject: [PATCH 3/3] Fix the variable declaration --- Sources/AWSLambdaEvents/AWSRegion.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/AWSLambdaEvents/AWSRegion.swift b/Sources/AWSLambdaEvents/AWSRegion.swift index 370ff27..78789ba 100644 --- a/Sources/AWSLambdaEvents/AWSRegion.swift +++ b/Sources/AWSLambdaEvents/AWSRegion.swift @@ -25,7 +25,7 @@ public struct AWSRegion: RawRepresentable, Equatable, Sendable { self.rawValue = rawValue } - static var all: [AWSRegion] = [ + static let all: [AWSRegion] = [ Self.af_south_1, Self.ap_northeast_1, Self.ap_northeast_2,