Skip to content

chore(clients): populate variants in endpoints hashes #2962

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

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7dfd0e6
chore: add endpoints.json with variants
trivikr Oct 29, 2021
ff969c0
chore(endpoints): re-add legacy config removed from dev json
trivikr Oct 29, 2021
a4e42ff
chore(clients): update endpoints for clients
trivikr Nov 1, 2021
ed36a2f
chore(codegen): populate variants in endpoints hashes
trivikr Oct 29, 2021
1711f95
chore(clients): populate variants in endpoints hashes
trivikr Nov 1, 2021
42e7158
chore(config-resolver): add endpoint variants array in RegionHash/Par…
trivikr Nov 1, 2021
8a73c94
chore: add a comment to remove hostname after switching to variants
trivikr Nov 2, 2021
5fffa7b
chore(codegen): populate default hostname and variant
trivikr Nov 2, 2021
42d15d6
chore(clients): populate default hostname and variant
trivikr Nov 2, 2021
7785fe3
chore(config-resolver): make hostname and variants compulsory in Regi…
trivikr Nov 2, 2021
94e3ea0
test(config-resolver): fix RegionHash in getRegionInfo.spec.ts
trivikr Nov 2, 2021
fdb5b45
chore(codegen): populate default hostname and variant in PartitionHash
trivikr Nov 2, 2021
7f93a8b
chore(clients): populate default hostname and variant in PartitionHash
trivikr Nov 2, 2021
3dab37f
chore(config-resolver): make hostname and variants compulsory in Part…
trivikr Nov 2, 2021
866a0ea
test(config-resolver): fix PartitionHash in getResolvedPartition.spec.ts
trivikr Nov 2, 2021
e0aa67a
chore(codegen): remove checks for hostname and variants
trivikr Nov 2, 2021
22b7a55
chore(codegen): return ArrayNode from partition.getVariants()
trivikr Nov 2, 2021
6f20a32
chore(codegen): add utility getResolvedHostname
trivikr Nov 2, 2021
4962f21
chore(codegen): update comments in EndpointResolver
trivikr Nov 2, 2021
d809298
chore(codegen): populate default variant as first variant
trivikr Nov 2, 2021
7f32fc8
chore(clients): populate default variant as first variant
trivikr Nov 2, 2021
fb544a8
chore(codegen): remove redundant newlines
trivikr Nov 2, 2021
3444561
chore(codegen): remove redundant local variables from getDefaultVariant
trivikr Nov 2, 2021
29dd012
chore(codegen): combine config population in one line
trivikr Nov 2, 2021
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
173 changes: 173 additions & 0 deletions clients/client-accessanalyzer/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,141 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolv
import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types";

const regionHash: RegionHash = {
"ca-central-1": {
hostname: "access-analyzer.ca-central-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer.ca-central-1.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
tags: ["fips"],
},
],
},
"fips-ca-central-1": {
hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
tags: [],
},
],
signingRegion: "ca-central-1",
},
"fips-us-east-1": {
hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-east-1",
},
"fips-us-east-2": {
hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
variants: [
{
hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
tags: [],
},
],
signingRegion: "us-east-2",
},
"fips-us-west-1": {
hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-west-1",
},
"fips-us-west-2": {
hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
variants: [
{
hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
tags: [],
},
],
signingRegion: "us-west-2",
},
"us-east-1": {
hostname: "access-analyzer.us-east-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer.us-east-1.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-east-2": {
hostname: "access-analyzer.us-east-2.amazonaws.com",
variants: [
{
hostname: "access-analyzer.us-east-2.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-east-1": {
hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-gov-east-1",
},
"us-gov-west-1": {
hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-gov-west-1",
},
"us-west-1": {
hostname: "access-analyzer.us-west-1.amazonaws.com",
variants: [
{
hostname: "access-analyzer.us-west-1.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-2": {
hostname: "access-analyzer.us-west-2.amazonaws.com",
variants: [
{
hostname: "access-analyzer.us-west-2.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
tags: ["fips"],
},
],
},
};

const partitionHash: PartitionHash = {
Expand Down Expand Up @@ -64,26 +171,92 @@ const partitionHash: PartitionHash = {
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.amazonaws.com",
variants: [
{
hostname: "access-analyzer.{region}.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "access-analyzer-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "access-analyzer.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.amazonaws.com.cn",
variants: [
{
hostname: "access-analyzer.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "access-analyzer-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "access-analyzer-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "access-analyzer.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.c2s.ic.gov",
variants: [
{
hostname: "access-analyzer.{region}.c2s.ic.gov",
tags: [],
},
],
},
"aws-iso-b": {
regions: ["us-isob-east-1"],
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.sc2s.sgov.gov",
variants: [
{
hostname: "access-analyzer.{region}.sc2s.sgov.gov",
tags: [],
},
],
},
"aws-us-gov": {
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.amazonaws.com",
variants: [
{
hostname: "access-analyzer.{region}.amazonaws.com",
tags: [],
},
{
hostname: "access-analyzer-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "access-analyzer-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "access-analyzer.{region}.api.aws",
tags: ["dualstack"],
},
],
},
};

Expand Down
80 changes: 80 additions & 0 deletions clients/client-account/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types";
const regionHash: RegionHash = {
"aws-cn-global": {
hostname: "account.cn-northwest-1.amazonaws.com.cn",
variants: [
{
hostname: "account.cn-northwest-1.amazonaws.com.cn",
tags: [],
},
],
signingRegion: "cn-northwest-1",
},
"aws-global": {
hostname: "account.us-east-1.amazonaws.com",
variants: [
{
hostname: "account.us-east-1.amazonaws.com",
tags: [],
},
],
signingRegion: "us-east-1",
},
};
Expand Down Expand Up @@ -39,27 +51,95 @@ const partitionHash: PartitionHash = {
"us-west-2",
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
hostname: "account.{region}.amazonaws.com",
variants: [
{
hostname: "account.{region}.amazonaws.com",
tags: [],
},
{
hostname: "account-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "account-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "account.{region}.api.aws",
tags: ["dualstack"],
},
],
endpoint: "aws-global",
},
"aws-cn": {
regions: ["aws-cn-global", "cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
hostname: "account.{region}.amazonaws.com.cn",
variants: [
{
hostname: "account.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "account-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "account-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "account.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
endpoint: "aws-cn-global",
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
hostname: "account.{region}.c2s.ic.gov",
variants: [
{
hostname: "account.{region}.c2s.ic.gov",
tags: [],
},
],
},
"aws-iso-b": {
regions: ["us-isob-east-1"],
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
hostname: "account.{region}.sc2s.sgov.gov",
variants: [
{
hostname: "account.{region}.sc2s.sgov.gov",
tags: [],
},
],
},
"aws-us-gov": {
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
hostname: "account.{region}.amazonaws.com",
variants: [
{
hostname: "account.{region}.amazonaws.com",
tags: [],
},
{
hostname: "account-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "account-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "account.{region}.api.aws",
tags: ["dualstack"],
},
],
},
};

Expand Down
Loading