Skip to content

Commit

Permalink
feat(clients): populate variants in endpoints hashes (#2974)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr authored Nov 2, 2021
1 parent 71b8cce commit 0dd68ef
Show file tree
Hide file tree
Showing 297 changed files with 34,382 additions and 37 deletions.
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

0 comments on commit 0dd68ef

Please sign in to comment.