Skip to content

Commit 408d339

Browse files
committed
chore(config-resolver): add endpoint variants array in RegionHash/PartitionHash
1 parent 3e755d9 commit 408d339

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { EndpointVariantTag } from "./EndpointVariantTag";
2+
3+
/**
4+
* Provides hostname information for specific host label.
5+
*/
6+
export type EndpointVariant = {
7+
hostname: string;
8+
tags: EndpointVariantTag[];
9+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* The tag which mentions which area variant is providing information for.
3+
* Can be either "fips" or "dualstack".
4+
*/
5+
export type EndpointVariantTag = "fips" | "dualstack";
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
import { EndpointVariant } from "./EndpointVariant";
2+
13
/**
24
* The hash of partition with the information specific to that partition.
35
* The information includes the list of regions belonging to that partition,
46
* and the hostname to be used for the partition.
57
*/
68
export type PartitionHash = {
7-
[key: string]: { regions: string[]; regionRegex: string; hostname?: string; endpoint?: string };
9+
[key: string]: {
10+
regions: string[];
11+
regionRegex: string;
12+
hostname?: string;
13+
endpoint?: string;
14+
variants?: EndpointVariant[];
15+
};
816
};
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
import { RegionInfo } from "@aws-sdk/types";
1+
import { EndpointVariant } from "./EndpointVariant";
22

33
/**
44
* The hash of region with the information specific to that region.
55
* The information can include hostname, signingService and signingRegion.
66
*/
7-
export type RegionHash = { [key: string]: Partial<Omit<RegionInfo, "partition" | "path">> };
7+
export type RegionHash = {
8+
[key: string]: {
9+
hostname?: string;
10+
variants?: EndpointVariant[];
11+
signingService?: string;
12+
signingRegion?: string;
13+
};
14+
};

0 commit comments

Comments
 (0)