diff --git a/clients/client-iam/src/endpoint/ruleset.ts b/clients/client-iam/src/endpoint/ruleset.ts index 702964fd27a2..f7931b2eeea9 100644 --- a/clients/client-iam/src/endpoint/ruleset.ts +++ b/clients/client-iam/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://iam.amazonaws.com",properties:u,headers:p},type:e},{conditions:[q,n,t],endpoint:{url:"https://iam-fips.amazonaws.com",properties:u,headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-cn"]},s,t],endpoint:{url:"https://iam.cn-north-1.amazonaws.com.cn",properties:{[G]:[{name:i,[H]:j,[I]:"cn-north-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://iam.us-iso-east-1.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://iam.us-isob-east-1.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-f"]},s,t],endpoint:{url:"https://iam.us-isof-south-1.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://iam-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://iam-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://iam.{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://iam.{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://iam.amazonaws.com",properties:u,headers:p},type:e},{conditions:[q,n,t],endpoint:{url:"https://iam-fips.amazonaws.com",properties:u,headers:p},type:e},{conditions:[{[D]:h,[E]:[r,"aws-cn"]},s,t],endpoint:{url:"https://iam.cn-north-1.amazonaws.com.cn",properties:{[G]:[{name:i,[H]:j,[I]:"cn-north-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://iam.us-iso-east-1.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://iam.us-isob-east-1.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://iam.eu-isoe-west-1.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://iam.us-isof-south-1.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://iam-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://iam-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://iam.{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://iam.{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/iam.json b/codegen/sdk-codegen/aws-models/iam.json index c1b549bf318a..6ff4cb182ce8 100644 --- a/codegen/sdk-codegen/aws-models/iam.json +++ b/codegen/sdk-codegen/aws-models/iam.json @@ -997,6 +997,57 @@ }, "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://iam.eu-isoe-west-1.cloud.adc-e.uk", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "eu-isoe-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [ { @@ -1777,6 +1828,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"