-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(config-resolver): update RegionHash and PartitionHash
- Loading branch information
Showing
6 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { EndpointVariantTag } from "./EndpointVariantTag"; | ||
|
||
/** | ||
* Provides hostname information for specific host label. | ||
*/ | ||
export type EndpointVariant = { | ||
hostname: string; | ||
tags: EndpointVariantTag[]; | ||
}; |
5 changes: 5 additions & 0 deletions
5
packages/config-resolver/src/regionInfo/EndpointVariantTag.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** | ||
* The tag which mentions which area variant is providing information for. | ||
* Can be either "fips" or "dualstack". | ||
*/ | ||
export type EndpointVariantTag = "fips" | "dualstack"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
import { EndpointVariant } from "./EndpointVariant"; | ||
|
||
/** | ||
* The hash of partition with the information specific to that partition. | ||
* The information includes the list of regions belonging to that partition, | ||
* and the hostname to be used for the partition. | ||
*/ | ||
export type PartitionHash = { | ||
[key: string]: { regions: string[]; regionRegex: string; hostname?: string; endpoint?: string }; | ||
[key: string]: { | ||
regions: string[]; | ||
regionRegex: string; | ||
// TODO: Remove hostname after fully switching to variants. | ||
hostname: string; | ||
variants: EndpointVariant[]; | ||
endpoint?: string; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
import { RegionInfo } from "@aws-sdk/types"; | ||
import { EndpointVariant } from "./EndpointVariant"; | ||
|
||
/** | ||
* The hash of region with the information specific to that region. | ||
* The information can include hostname, signingService and signingRegion. | ||
*/ | ||
export type RegionHash = { [key: string]: Partial<Omit<RegionInfo, "partition" | "path">> }; | ||
export type RegionHash = { | ||
[key: string]: { | ||
// TODO: Remove hostname after fully switching to variants. | ||
hostname: string; | ||
variants: EndpointVariant[]; | ||
signingService?: string; | ||
signingRegion?: string; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters