Skip to content

Commit

Permalink
Merge pull request #1017 from Tristano8/2025-region-update
Browse files Browse the repository at this point in the history
amazonka-core: Add regions
  • Loading branch information
endgame authored Jan 14, 2025
2 parents 1f48062 + 44e5565 commit 1bfd8eb
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 5 deletions.
22 changes: 22 additions & 0 deletions lib/amazonka-core/src/Amazonka/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,17 @@ module Amazonka.Types
HongKong,
Hyderabad,
Jakarta,
Malaysia,
Melbourne,
Mumbai,
Osaka,
Seoul,
Singapore,
Sydney,
Thailand,
Tokyo,
Montreal,
Calgary,
Frankfurt,
Ireland,
London,
Expand All @@ -146,6 +149,7 @@ module Amazonka.Types
Spain,
Stockholm,
Zurich,
TelAviv,
Bahrain,
UAE,
SaoPaulo,
Expand Down Expand Up @@ -876,6 +880,9 @@ pattern Hyderabad = Region' "ap-south-2"
pattern Jakarta :: Region
pattern Jakarta = Region' "ap-southeast-3"

pattern Malaysia :: Region
pattern Malaysia = Region' "ap-southeast-5"

pattern Melbourne :: Region
pattern Melbourne = Region' "ap-southeast-4"

Expand All @@ -894,6 +901,9 @@ pattern Singapore = Region' "ap-southeast-1"
pattern Sydney :: Region
pattern Sydney = Region' "ap-southeast-2"

pattern Thailand :: Region
pattern Thailand = Region' "ap-southeast-7"

pattern Tokyo :: Region
pattern Tokyo = Region' "ap-northeast-1"

Expand All @@ -902,6 +912,9 @@ pattern Tokyo = Region' "ap-northeast-1"
pattern Montreal :: Region
pattern Montreal = Region' "ca-central-1"

pattern Calgary :: Region
pattern Calgary = Region' "ca-west-1"

-- Europe

pattern Frankfurt :: Region
Expand All @@ -928,6 +941,11 @@ pattern Stockholm = Region' "eu-north-1"
pattern Zurich :: Region
pattern Zurich = Region' "eu-central-2"

-- Israel

pattern TelAviv :: Region
pattern TelAviv = Region' "il-central-1"

-- Middle East

pattern Bahrain :: Region
Expand Down Expand Up @@ -966,14 +984,17 @@ pattern Ningxia = Region' "cn-northwest-1"
HongKong,
Hyderabad,
Jakarta,
Malaysia,
Melbourne,
Mumbai,
Osaka,
Seoul,
Singapore,
Sydney,
Thailand,
Tokyo,
Montreal,
Calgary,
Frankfurt,
Ireland,
London,
Expand All @@ -982,6 +1003,7 @@ pattern Ningxia = Region' "cn-northwest-1"
Spain,
Stockholm,
Zurich,
TelAviv,
Bahrain,
UAE,
SaoPaulo,
Expand Down
2 changes: 2 additions & 0 deletions lib/amazonka/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Changed

- `amazonka-core`: Add regions: `Malaysia` (`ap-southeast-5`), `Thailand` (`ap-southeast-7`), `Calgary` (`ca-west-1`), and `TelAviv` (`il-central-1`)
[\#1017](https://github.com/brendanhay/amazonka/pull/1017)
- Depend on `microlens`, `microlens-pro` and `microlens-contra` instead of the full `lens` package (thanks @mankykitty).
[\#996](https://github.com/brendanhay/amazonka/pull/996)
- `amazonka-s3`: `objectKey_keyComponents` has a new type `Delimiter -> Traversal' ObjectKey Text` instead of returning `IndexedTraversal' ObjectKey Text`. `lens` users can rebuild the `IndexedTraversal'` with [`Control.Lens.Indexed.indexing`](https://hackage.haskell.org/package/lens-5.3.2/docs/Control-Lens-Indexed.html#v:indexing). `optics` uses can use one of the following:
Expand Down
3 changes: 2 additions & 1 deletion lib/services/amazonka-elb/src/Amazonka/ELB/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import Amazonka.Data
-- @logdelivery.elasticloadbalancing.amazonaws.com@ principal.
--
-- /See:/ <http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html#attach-bucket-policy Attach a Policy to Your S3 Bucket>.
-- /See:/ <https://docs.amazonaws.cn/en_us/elasticloadbalancing/latest/application/enable-access-logging.html#attach-bucket-policy Attach a Policy to Your S3 Bucket (China)>
getAccountId :: Region -> Maybe Text
getAccountId = \case
NorthVirginia -> Just "127311923021"
Expand Down Expand Up @@ -52,4 +53,4 @@ getAccountId = \case
GovCloudEast -> Just "190560391635"
Beijing -> Just "638102146993"
Ningxia -> Just "037604701340"
_other -> Nothing
_ -> Nothing
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ getAccountId = \case
-- services for you, and may appear in your CloudTrail logs.
--
-- /See:/ <https://docs.aws.amazon.com/redshift/latest/mgmt/logging-with-cloudtrail.html#cloudtrail-rs-acct-ids Amazon Redshift account IDs in AWS CloudTrail logs>
-- /See:/ <https://docs.amazonaws.cn/en_us/redshift/latest/mgmt/logging-with-cloudtrail.html#cloudtrail-rs-acct-ids Amazon Redshift account IDs in AWS CloudTrail logs (includes China)>
getCloudTrailAccountId :: Region -> Maybe Text
getCloudTrailAccountId = \case
NorthVirginia -> Just "368064434614"
Expand All @@ -70,6 +71,7 @@ getCloudTrailAccountId = \case
HongKong -> Just "651179539253"
Hyderabad -> Just "297058826802"
Jakarta -> Just "623197973179"
Malaysia -> Just "590184011157"
Melbourne -> Just "945512339897"
Mumbai -> Just "408097707231"
Osaka -> Just "398671365691"
Expand All @@ -78,14 +80,18 @@ getCloudTrailAccountId = \case
Sydney -> Just "485979073181"
Tokyo -> Just "615915377779"
Montreal -> Just "764870610256"
Calgary -> Just "830903446466"
Beijing -> Just "066403562008"
Ningxia -> Just "194116488714"
Frankfurt -> Just "434091160558"
Ireland -> Just "246478207311"
London -> Just "885798887673"
Milan -> Just "041313461515"
Paris -> Just "694668203235"
Spain -> Just "028811157404"
Stockholm -> Just "553461782468"
Zurich -> Just "668912161003"
Spain -> Just "028811157404"
TelAviv -> Just "901883065212"
Bahrain -> Just "051362938876"
UAE -> Just "595013617770"
SaoPaulo -> Just "392442076723"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,27 @@ getHostedZoneId = \case
HongKong -> Just "ZNB98KWMFR0R6"
Hyderabad -> Just "Z02976202B4EZMXIPMXF7"
Jakarta -> Just "Z01846753K324LI26A3VV"
Malaysia -> Just "Z08660063OXLMA7F1FJHU"
Melbourne -> Just "Z0312387243XT5FE14WFO"
Mumbai -> Just "Z11RGJOFQNVJUP"
Osaka -> Just "Z2YQB5RD63NC85"
Seoul -> Just "Z3W03O7B5YMIYP"
Singapore -> Just "Z3O0J2DXBE1FTB"
Sydney -> Just "Z1WCIGYICN2BYD"
Thailand -> Just "Z0031014GXUMRZG6I14G"
Tokyo -> Just "Z2M4EHUR26P7ZW"
Montreal -> Just "Z1QDHH18159H29"
Calgary -> Just "Z03565811Z33SLEZTHOUL"
Ningxia -> Just "Z282HJ1KT0DH03"
Frankfurt -> Just "Z21DNDUVLTQW6Q"
Ireland -> Just "Z1BKCTXD74EZPE"
London -> Just "Z3GKZC51ZF0DB4"
Milan -> Just "Z30OZKI7KPW7MI"
Paris -> Just "Z3R1K369G5AVDG"
Stockholm -> Just "Z3BAZG2TWCNX0D"
Spain -> Just "Z0081959F7139GRJC19J"
Stockholm -> Just "Z3BAZG2TWCNX0D"
Zurich -> Just "Z030506016YDQGETNASS"
TelAviv -> Just "Z09640613K4A3MN55U7GU"
Bahrain -> Just "Z1MPMWCPA7YB62"
UAE -> Just "Z06143092I8HRXZRUZROF"
SaoPaulo -> Just "Z7KQH4QJS55SO"
Expand Down
10 changes: 8 additions & 2 deletions lib/services/amazonka-s3/src/Amazonka/S3/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ _ObjectKeySnoc dir !c = prism (ObjectKey . uncurry cat) split
-- this region-specific website endpoint.
--
-- /See:/ <https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints Amazon Simple Storage Service Website Endpoints>.
-- /See:/ <https://docs.amazonaws.cn/en_us/AmazonS3/latest/userguide/static-website-hosting-china.html>
getWebsiteEndpoint :: Region -> Maybe Text
getWebsiteEndpoint = \case
Ohio -> Just "s3-website.us-east-2.amazonaws.com"
Expand All @@ -286,26 +287,31 @@ getWebsiteEndpoint = \case
HongKong -> Just "s3-website.ap-east-1.amazonaws.com"
Hyderabad -> Just "s3-website.ap-south-2.amazonaws.com"
Jakarta -> Just "s3-website.ap-southeast-3.amazonaws.com"
Malaysia -> Just "s3-website.ap-southeast-5.amazonaws.com"
Melbourne -> Just "s3-website.ap-southeast-4.amazonaws.com"
Mumbai -> Just "s3-website.ap-south-1.amazonaws.com"
Osaka -> Just "s3-website.ap-northeast-3.amazonaws.com"
Seoul -> Just "s3-website.ap-northeast-2.amazonaws.com"
Singapore -> Just "s3-website-ap-southeast-1.amazonaws.com"
Sydney -> Just "s3-website-ap-southeast-2.amazonaws.com"
Thailand -> Just "s3-website.ap-southeast-7.amazonaws.com"
Tokyo -> Just "s3-website-ap-northeast-1.amazonaws.com"
Montreal -> Just "s3-website.ca-central-1.amazonaws.com"
Ningxia -> Just "s3-website.cn-northwest-1.amazonaws.com.cn"
Calgary -> Just "s3-website.ca-west-1.amazonaws.com"
Frankfurt -> Just "s3-website.eu-central-1.amazonaws.com"
Ireland -> Just "s3-website-eu-west-1.amazonaws.com"
London -> Just "s3-website.eu-west-2.amazonaws.com"
Milan -> Just "s3-website.eu-south-1.amazonaws.com"
Paris -> Just "s3-website.eu-west-3.amazonaws.com"
Stockholm -> Just "s3-website.eu-north-1.amazonaws.com"
Spain -> Just "s3-website.eu-south-2.amazonaws.com"
Stockholm -> Just "s3-website.eu-north-1.amazonaws.com"
Zurich -> Just "s3-website.eu-central-2.amazonaws.com"
TelAviv -> Just "s3-website.il-central-1.amazonaws.com"
Bahrain -> Just "s3-website.me-south-1.amazonaws.com"
UAE -> Just "s3-website.me-central-1.amazonaws.com"
SaoPaulo -> Just "s3-website-sa-east-1.amazonaws.com"
GovCloudEast -> Just "s3-website.us-gov-east-1.amazonaws.com"
GovCloudWest -> Just "s3-website-us-gov-west-1.amazonaws.com"
Beijing -> Just "s3-website.cn-north-1.amazonaws.com.cn"
Ningxia -> Just "s3-website.cn-northwest-1.amazonaws.com.cn"
Region' _ -> Nothing

0 comments on commit 1bfd8eb

Please sign in to comment.