Skip to content

[WIP] chore(clients): populate variants in endpoints hashes #2957

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 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
82 changes: 82 additions & 0 deletions clients/client-accessanalyzer/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolv
import { RegionInfoProvider } from "@aws-sdk/types";

const regionHash: RegionHash = {
"ca-central-1": {
variants: [
{
hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
tags: ["fips"],
},
],
},
"fips-ca-central-1": {
hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
signingRegion: "ca-central-1",
Expand All @@ -22,6 +30,22 @@ const regionHash: RegionHash = {
hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
signingRegion: "us-west-2",
},
"us-east-1": {
variants: [
{
hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-east-2": {
variants: [
{
hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-east-1": {
hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
signingRegion: "us-gov-east-1",
Expand All @@ -30,6 +54,22 @@ const regionHash: RegionHash = {
hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
signingRegion: "us-gov-west-1",
},
"us-west-1": {
variants: [
{
hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-2": {
variants: [
{
hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
tags: ["fips"],
},
],
},
};

const partitionHash: PartitionHash = {
Expand Down Expand Up @@ -64,11 +104,39 @@ const partitionHash: PartitionHash = {
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.amazonaws.com",
variants: [
{
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-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"],
Expand All @@ -84,6 +152,20 @@ const partitionHash: PartitionHash = {
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
hostname: "access-analyzer.{region}.amazonaws.com",
variants: [
{
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
42 changes: 42 additions & 0 deletions clients/client-account/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,39 @@ const partitionHash: PartitionHash = {
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
endpoint: "aws-global",
variants: [
{
hostname: "account-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "account-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "account.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["aws-cn-global", "cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
endpoint: "aws-cn-global",
variants: [
{
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"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
Expand All @@ -60,6 +88,20 @@ const partitionHash: PartitionHash = {
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
hostname: "account.{region}.amazonaws.com",
variants: [
{
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
90 changes: 90 additions & 0 deletions clients/client-acm-pca/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolv
import { RegionInfoProvider } from "@aws-sdk/types";

const regionHash: RegionHash = {
"ca-central-1": {
variants: [
{
hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
tags: ["fips"],
},
],
},
"fips-ca-central-1": {
hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
signingRegion: "ca-central-1",
Expand Down Expand Up @@ -30,6 +38,54 @@ const regionHash: RegionHash = {
hostname: "acm-pca-fips.us-west-2.amazonaws.com",
signingRegion: "us-west-2",
},
"us-east-1": {
variants: [
{
hostname: "acm-pca-fips.us-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-east-2": {
variants: [
{
hostname: "acm-pca-fips.us-east-2.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-east-1": {
variants: [
{
hostname: "acm-pca.us-gov-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-west-1": {
variants: [
{
hostname: "acm-pca.us-gov-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-1": {
variants: [
{
hostname: "acm-pca-fips.us-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-2": {
variants: [
{
hostname: "acm-pca-fips.us-west-2.amazonaws.com",
tags: ["fips"],
},
],
},
};

const partitionHash: PartitionHash = {
Expand Down Expand Up @@ -64,11 +120,39 @@ const partitionHash: PartitionHash = {
],
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
hostname: "acm-pca.{region}.amazonaws.com",
variants: [
{
hostname: "acm-pca-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "acm-pca-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "acm-pca.{region}.api.aws",
tags: ["dualstack"],
},
],
},
"aws-cn": {
regions: ["cn-north-1", "cn-northwest-1"],
regionRegex: "^cn\\-\\w+\\-\\d+$",
hostname: "acm-pca.{region}.amazonaws.com.cn",
variants: [
{
hostname: "acm-pca-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "acm-pca-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "acm-pca.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
},
"aws-iso": {
regions: ["us-iso-east-1", "us-iso-west-1"],
Expand All @@ -84,6 +168,12 @@ const partitionHash: PartitionHash = {
regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
hostname: "acm-pca.{region}.amazonaws.com",
variants: [
{
hostname: "acm-pca.{region}.amazonaws.com",
tags: ["fips"],
},
],
},
};

Expand Down
Loading