diff --git a/clients/client-sso/src/endpoint/ruleset.ts b/clients/client-sso/src/endpoint/ruleset.ts index 91d0e6695cd2..1ba6bbe4a53f 100644 --- a/clients/client-sso/src/endpoint/ruleset.ts +++ b/clients/client-sso/src/endpoint/ruleset.ts @@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/sso.json */ -const q="required", -r="fn", -s="argv", -t="ref"; +const s="required", +t="fn", +u="argv", +v="ref"; const a="isSet", b="tree", c="error", d="endpoint", e="PartitionResult", -f={[q]:false,"type":"String"}, -g={[q]:true,"default":false,"type":"Boolean"}, -h={[t]:"Endpoint"}, -i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]}, -j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]}, -k={}, -l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]}, -m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]}, -n=[i], -o=[j], -p=[{[t]:"Region"}]; -const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}; +f="getAttr", +g={[s]:false,"type":"String"}, +h={[s]:true,"default":false,"type":"Boolean"}, +i={[v]:"Endpoint"}, +j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]}, +k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]}, +l={}, +m={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[{[v]:e},"supportsFIPS"]}]}, +n={[v]:e}, +o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]}, +p=[j], +q=[k], +r=[{[v]:"Region"}]; +const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]},{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}; export const ruleSet: RuleSetObject = _data; diff --git a/codegen/sdk-codegen/aws-models/sso.json b/codegen/sdk-codegen/aws-models/sso.json index bb342fd2b339..d301f0fe1756 100644 --- a/codegen/sdk-codegen/aws-models/sso.json +++ b/codegen/sdk-codegen/aws-models/sso.json @@ -760,6 +760,31 @@ ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://portal.sso.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [], "endpoint": { @@ -1233,7 +1258,7 @@ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://portal.sso-fips.us-gov-east-1.amazonaws.com" + "url": "https://portal.sso.us-gov-east-1.amazonaws.com" } }, "params": { @@ -1452,4 +1477,4 @@ } } } -} \ No newline at end of file +}