From 57276bbe4489336d702aa0f670a575e37f1ea5a8 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 29 Jan 2025 19:46:58 +0000 Subject: [PATCH] feat(client-ecr): Add support for Dualstack and Dualstack-with-FIPS Endpoints --- clients/client-ecr/src/endpoint/ruleset.ts | 45 +- codegen/sdk-codegen/aws-models/ecr.json | 940 ++++++++++++++++++--- 2 files changed, 852 insertions(+), 133 deletions(-) diff --git a/clients/client-ecr/src/endpoint/ruleset.ts b/clients/client-ecr/src/endpoint/ruleset.ts index 588e550e2dda..6e418a871388 100644 --- a/clients/client-ecr/src/endpoint/ruleset.ts +++ b/clients/client-ecr/src/endpoint/ruleset.ts @@ -6,10 +6,13 @@ import { RuleSetObject } from "@smithy/types"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/ecr.json */ -const v="required", -w="fn", -x="argv", -y="ref"; +const B="required", +C="fn", +D="argv", +E="ref", +F="url", +G="properties", +H="headers"; const a=true, b="isSet", c="booleanEquals", @@ -18,18 +21,24 @@ e="endpoint", f="tree", g="PartitionResult", h="stringEquals", -i={[v]:false,"type":"String"}, -j={[v]:true,"default":false,"type":"Boolean"}, -k={[y]:"Endpoint"}, -l={[w]:c,[x]:[{[y]:"UseFIPS"},true]}, -m={[w]:c,[x]:[{[y]:"UseDualStack"},true]}, -n={}, -o={[w]:"getAttr",[x]:[{[y]:g},"supportsFIPS"]}, -p={[w]:c,[x]:[true,{[w]:"getAttr",[x]:[{[y]:g},"supportsDualStack"]}]}, -q={[w]:"getAttr",[x]:[{[y]:g},"name"]}, -r={"url":"https://ecr-fips.{Region}.amazonaws.com","properties":{},"headers":{}}, -s=[l], -t=[m], -u=[{[y]:"Region"}]; -const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[w]:b,[x]:[k]}],rules:[{conditions:s,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:t,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f},{conditions:[{[w]:b,[x]:u}],rules:[{conditions:[{[w]:"aws.partition",[x]:u,assign:g}],rules:[{conditions:[l,m],rules:[{conditions:[{[w]:c,[x]:[a,o]},p],rules:[{endpoint:{url:"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:s,rules:[{conditions:[{[w]:c,[x]:[o,a]}],rules:[{conditions:[{[w]:h,[x]:[q,"aws"]}],endpoint:r,type:e},{conditions:[{[w]:h,[x]:[q,"aws-us-gov"]}],endpoint:r,type:e},{endpoint:{url:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:t,rules:[{conditions:[p],rules:[{endpoint:{url:"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]}; +i="aws", +j="aws-us-gov", +k={[B]:false,"type":"String"}, +l={[B]:true,"default":false,"type":"Boolean"}, +m={[E]:"Endpoint"}, +n={[C]:c,[D]:[{[E]:"UseFIPS"},true]}, +o={[C]:c,[D]:[{[E]:"UseDualStack"},true]}, +p={}, +q={[C]:"getAttr",[D]:[{[E]:g},"supportsFIPS"]}, +r={[C]:c,[D]:[true,{[C]:"getAttr",[D]:[{[E]:g},"supportsDualStack"]}]}, +s={[C]:"getAttr",[D]:[{[E]:g},"name"]}, +t={[F]:"https://ecr-fips.{Region}.api.aws",[G]:{},[H]:{}}, +u={[F]:"https://ecr-fips.{Region}.amazonaws.com",[G]:{},[H]:{}}, +v={[F]:"https://ecr.{Region}.api.aws",[G]:{},[H]:{}}, +w=[n], +x=[o], +y=[{[E]:"Region"}], +z=[{[C]:h,[D]:[i,s]}], +A=[{[C]:h,[D]:[j,s]}]; +const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[C]:b,[D]:[m]}],rules:[{conditions:w,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:x,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{[F]:m,[G]:p,[H]:p},type:e}],type:f},{conditions:[{[C]:b,[D]:y}],rules:[{conditions:[{[C]:"aws.partition",[D]:y,assign:g}],rules:[{conditions:[n,o],rules:[{conditions:[{[C]:c,[D]:[a,q]},r],rules:[{conditions:z,endpoint:t,type:e},{conditions:A,endpoint:t,type:e},{endpoint:{[F]:"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[G]:p,[H]:p},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:w,rules:[{conditions:[{[C]:c,[D]:[q,a]}],rules:[{conditions:[{[C]:h,[D]:[s,i]}],endpoint:u,type:e},{conditions:[{[C]:h,[D]:[s,j]}],endpoint:u,type:e},{endpoint:{[F]:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",[G]:p,[H]:p},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:x,rules:[{conditions:[r],rules:[{conditions:z,endpoint:v,type:e},{conditions:[{[C]:h,[D]:["aws-cn",s]}],endpoint:{[F]:"https://ecr.{Region}.api.amazonwebservices.com.cn",[G]:p,[H]:p},type:e},{conditions:A,endpoint:v,type:e},{endpoint:{[F]:"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[G]:p,[H]:p},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{[F]:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",[G]:p,[H]:p},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]}; export const ruleSet: RuleSetObject = _data; diff --git a/codegen/sdk-codegen/aws-models/ecr.json b/codegen/sdk-codegen/aws-models/ecr.json index 0ac4099750a5..6c1b7c29838d 100644 --- a/codegen/sdk-codegen/aws-models/ecr.json +++ b/codegen/sdk-codegen/aws-models/ecr.json @@ -378,6 +378,56 @@ } ], "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://ecr-fips.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://ecr-fips.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [], "endpoint": { @@ -532,6 +582,81 @@ } ], "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://ecr.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-cn", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://ecr.{Region}.api.amazonwebservices.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://ecr.{Region}.api.aws", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [], "endpoint": { @@ -590,356 +715,902 @@ } }, { - "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region af-south-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-east-1.amazonaws.com" + "url": "https://ecr.af-south-1.api.aws" } }, "params": { - "Region": "ap-east-1", + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-northeast-1.amazonaws.com" + "url": "https://api.ecr.ap-east-1.amazonaws.com" } }, "params": { - "Region": "ap-northeast-1", + "Region": "ap-east-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-northeast-2.amazonaws.com" + "url": "https://ecr.ap-east-1.api.aws" } }, "params": { - "Region": "ap-northeast-2", + "Region": "ap-east-1", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-northeast-3.amazonaws.com" + "url": "https://api.ecr.ap-northeast-1.amazonaws.com" } }, "params": { - "Region": "ap-northeast-3", + "Region": "ap-northeast-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-south-1.amazonaws.com" + "url": "https://ecr.ap-northeast-1.api.aws" } }, "params": { - "Region": "ap-south-1", + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-southeast-1.amazonaws.com" + "url": "https://api.ecr.ap-northeast-2.amazonaws.com" } }, "params": { - "Region": "ap-southeast-1", + "Region": "ap-northeast-2", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-southeast-2.amazonaws.com" + "url": "https://ecr.ap-northeast-2.api.aws" } }, "params": { - "Region": "ap-southeast-2", + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.ap-southeast-3.amazonaws.com" + "url": "https://api.ecr.ap-northeast-3.amazonaws.com" } }, "params": { - "Region": "ap-southeast-3", + "Region": "ap-northeast-3", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.ca-central-1.amazonaws.com" + "url": "https://ecr.ap-northeast-3.api.aws" } }, "params": { - "Region": "ca-central-1", + "Region": "ap-northeast-3", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.eu-central-1.amazonaws.com" + "url": "https://api.ecr.ap-south-1.amazonaws.com" } }, "params": { - "Region": "eu-central-1", + "Region": "ap-south-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-south-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.eu-north-1.amazonaws.com" + "url": "https://ecr.ap-south-1.api.aws" } }, "params": { - "Region": "eu-north-1", + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-south-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.eu-south-1.amazonaws.com" + "url": "https://api.ecr.ap-south-2.amazonaws.com" } }, "params": { - "Region": "eu-south-1", + "Region": "ap-south-2", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-south-2 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.eu-west-1.amazonaws.com" + "url": "https://ecr.ap-south-2.api.aws" } }, "params": { - "Region": "eu-west-1", + "Region": "ap-south-2", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.eu-west-2.amazonaws.com" + "url": "https://api.ecr.ap-southeast-1.amazonaws.com" } }, "params": { - "Region": "eu-west-2", + "Region": "ap-southeast-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.eu-west-3.amazonaws.com" + "url": "https://ecr.ap-southeast-1.api.aws" } }, "params": { - "Region": "eu-west-3", + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.me-south-1.amazonaws.com" + "url": "https://api.ecr.ap-southeast-2.amazonaws.com" } }, "params": { - "Region": "me-south-1", + "Region": "ap-southeast-2", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.sa-east-1.amazonaws.com" + "url": "https://ecr.ap-southeast-2.api.aws" } }, "params": { - "Region": "sa-east-1", + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-east-1.amazonaws.com" + "url": "https://api.ecr.ap-southeast-3.amazonaws.com" } }, "params": { - "Region": "us-east-1", + "Region": "ap-southeast-3", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ecr-fips.us-east-1.amazonaws.com" + "url": "https://ecr.ap-southeast-3.api.aws" } }, "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-4 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-east-2.amazonaws.com" + "url": "https://api.ecr.ap-southeast-4.amazonaws.com" } }, "params": { - "Region": "us-east-2", + "Region": "ap-southeast-4", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "documentation": "For region ap-southeast-4 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ecr-fips.us-east-2.amazonaws.com" + "url": "https://ecr.ap-southeast-4.api.aws" } }, "params": { - "Region": "us-east-2", - "UseFIPS": true, - "UseDualStack": false + "Region": "ap-southeast-4", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-5 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-west-1.amazonaws.com" + "url": "https://api.ecr.ap-southeast-5.amazonaws.com" } }, "params": { - "Region": "us-west-1", + "Region": "ap-southeast-5", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "documentation": "For region ap-southeast-5 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ecr-fips.us-west-1.amazonaws.com" + "url": "https://ecr.ap-southeast-5.api.aws" } }, "params": { - "Region": "us-west-1", - "UseFIPS": true, - "UseDualStack": false + "Region": "ap-southeast-5", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-7 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-west-2.amazonaws.com" + "url": "https://api.ecr.ap-southeast-7.amazonaws.com" } }, "params": { - "Region": "us-west-2", + "Region": "ap-southeast-7", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "documentation": "For region ap-southeast-7 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ecr-fips.us-west-2.amazonaws.com" + "url": "https://ecr.ap-southeast-7.api.aws" } }, "params": { - "Region": "us-west-2", - "UseFIPS": true, - "UseDualStack": false + "Region": "ap-southeast-7", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr-fips.us-east-1.api.aws" + "url": "https://api.ecr.ca-central-1.amazonaws.com" } }, "params": { - "Region": "us-east-1", - "UseFIPS": true, + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.ca-central-1.api.aws" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region ca-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.ca-west-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.ca-west-1.api.aws" + } + }, + "params": { + "Region": "ca-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-central-1.api.aws" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-central-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-central-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-central-2.api.aws" + } + }, + "params": { + "Region": "eu-central-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-north-1.api.aws" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-south-1.api.aws" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-south-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-south-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-south-2.api.aws" + } + }, + "params": { + "Region": "eu-south-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-west-1.api.aws" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-west-2.api.aws" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.eu-west-3.api.aws" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region il-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.il-central-1.amazonaws.com" + } + }, + "params": { + "Region": "il-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region il-central-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.il-central-1.api.aws" + } + }, + "params": { + "Region": "il-central-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region me-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.me-central-1.amazonaws.com" + } + }, + "params": { + "Region": "me-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-central-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.me-central-1.api.aws" + } + }, + "params": { + "Region": "me-central-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.me-south-1.api.aws" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.sa-east-1.api.aws" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, "UseDualStack": true } }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-east-1.api.aws" + "url": "https://ecr.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-east-1.api.aws" } }, "params": { "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.us-east-2.api.aws" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-east-2.api.aws" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.us-west-1.api.aws" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-west-1.api.aws" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://api.ecr.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.us-west-2.api.aws" + } + }, + "params": { + "Region": "us-west-2", "UseFIPS": false, "UseDualStack": true } }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-west-2.api.aws" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": true + } + }, { "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { @@ -953,6 +1624,19 @@ "UseDualStack": false } }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, { "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", "expect": { @@ -966,6 +1650,19 @@ "UseDualStack": false } }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr.cn-northwest-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": true + } + }, { "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { @@ -993,42 +1690,55 @@ } }, { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.cn-north-1.api.amazonwebservices.com.cn" + "url": "https://api.ecr.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "cn-north-1", + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-gov-east-1.amazonaws.com" + "url": "https://ecr-fips.us-gov-east-1.amazonaws.com" } }, "params": { "Region": "us-gov-east-1", - "UseFIPS": false, + "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ecr-fips.us-gov-east-1.amazonaws.com" + "url": "https://ecr.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://ecr-fips.us-gov-east-1.api.aws" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false + "UseDualStack": true } }, { @@ -1058,28 +1768,28 @@ } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr-fips.us-gov-east-1.api.aws" + "url": "https://ecr.us-gov-west-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, + "Region": "us-gov-west-1", + "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://api.ecr.us-gov-east-1.api.aws" + "url": "https://ecr-fips.us-gov-west-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, + "Region": "us-gov-west-1", + "UseFIPS": true, "UseDualStack": true } },