From 2ff8bce6e51ee811eb3ae636e56a732e1e129b29 Mon Sep 17 00:00:00 2001 From: awstools Date: Mon, 6 Nov 2023 19:20:51 +0000 Subject: [PATCH] feat(client-route-53): Add partitional endpoints for iso-e and iso-f. --- .../client-route-53/src/endpoint/ruleset.ts | 2 +- codegen/sdk-codegen/aws-models/route-53.json | 113 ++++++++++++++++++ 2 files changed, 114 insertions(+), 1 deletion(-) diff --git a/clients/client-route-53/src/endpoint/ruleset.ts b/clients/client-route-53/src/endpoint/ruleset.ts index 8ae13f84c678..e4948346fe65 100644 --- a/clients/client-route-53/src/endpoint/ruleset.ts +++ b/clients/client-route-53/src/endpoint/ruleset.ts @@ -41,5 +41,5 @@ y={[D]:c,[E]:[true,{[D]:"getAttr",[E]:[{[F]:g},"supportsDualStack"]}]}, z=[n], A=[o], B=[{[F]:"Region"}]; -const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[D]:b,[E]:[m]}],rules:[{conditions:z,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:A,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:m,properties:p,headers:p},type:e}],type:f},{conditions:[{[D]:b,[E]:B}],rules:[{conditions:[{[D]:"aws.partition",[E]:B,assign:g}],rules:[{conditions:[q,s,t],endpoint:{url:"https://route53.amazonaws.com",properties:u,headers:p},type:e},{conditions:[q,n,t],endpoint:{url:"https://route53-fips.amazonaws.com",properties:u,headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-cn"]},s,t],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{[G]:[{name:i,[H]:j,[I]:"cn-northwest-1"}]},headers:p},type:e},{conditions:[v,s,t],endpoint:w,type:e},{conditions:[v,n,t],endpoint:w,type:e},{conditions:[{[D]:h,[E]:[r,"aws-iso"]},s,t],endpoint:{url:"https://route53.c2s.ic.gov",properties:{[G]:[{name:i,[H]:j,[I]:"us-iso-east-1"}]},headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-iso-b"]},s,t],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{[G]:[{name:i,[H]:j,[I]:"us-isob-east-1"}]},headers:p},type:e},{conditions:[n,o],rules:[{conditions:[{[D]:c,[E]:[a,x]},y],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:p,headers: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:z,rules:[{conditions:[{[D]:c,[E]:[x,a]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:A,rules:[{conditions:[y],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers:p},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]}; +const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[D]:b,[E]:[m]}],rules:[{conditions:z,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:A,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:m,properties:p,headers:p},type:e}],type:f},{conditions:[{[D]:b,[E]:B}],rules:[{conditions:[{[D]:"aws.partition",[E]:B,assign:g}],rules:[{conditions:[q,s,t],endpoint:{url:"https://route53.amazonaws.com",properties:u,headers:p},type:e},{conditions:[q,n,t],endpoint:{url:"https://route53-fips.amazonaws.com",properties:u,headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-cn"]},s,t],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{[G]:[{name:i,[H]:j,[I]:"cn-northwest-1"}]},headers:p},type:e},{conditions:[v,s,t],endpoint:w,type:e},{conditions:[v,n,t],endpoint:w,type:e},{conditions:[{[D]:h,[E]:[r,"aws-iso"]},s,t],endpoint:{url:"https://route53.c2s.ic.gov",properties:{[G]:[{name:i,[H]:j,[I]:"us-iso-east-1"}]},headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-iso-b"]},s,t],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{[G]:[{name:i,[H]:j,[I]:"us-isob-east-1"}]},headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-iso-e"]},s,t],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{[G]:[{name:i,[H]:j,[I]:"eu-isoe-west-1"}]},headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-iso-f"]},s,t],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{[G]:[{name:i,[H]:j,[I]:"us-isof-south-1"}]},headers:p},type:e},{conditions:[n,o],rules:[{conditions:[{[D]:c,[E]:[a,x]},y],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:p,headers: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:z,rules:[{conditions:[{[D]:c,[E]:[x,a]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:A,rules:[{conditions:[y],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:p,headers:p},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers: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/route-53.json b/codegen/sdk-codegen/aws-models/route-53.json index cd521bfe2e4e..4bca77d56df8 100644 --- a/codegen/sdk-codegen/aws-models/route-53.json +++ b/codegen/sdk-codegen/aws-models/route-53.json @@ -744,6 +744,108 @@ }, "type": "endpoint" }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-iso-e" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://route53.cloud.adc-e.uk", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-iso-f" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://route53.csp.hci.ic.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-isof-south-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [ { @@ -1473,6 +1575,17 @@ "expect": { "error": "Invalid Configuration: Missing Region" } + }, + { + "documentation": "Partition doesn't support DualStack", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } } ], "version": "1.0"