From 354980a2f3c1598c10d00ba3bc6a69e3914c3a79 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 26 Apr 2024 18:14:30 +0000 Subject: [PATCH] feat(client-support): Releasing minor endpoint updates. --- .../client-support/src/endpoint/ruleset.ts | 38 ++++---- codegen/sdk-codegen/aws-models/support.json | 93 ++++++++++++++++++- 2 files changed, 109 insertions(+), 22 deletions(-) diff --git a/clients/client-support/src/endpoint/ruleset.ts b/clients/client-support/src/endpoint/ruleset.ts index 0c80e4302c08..84d6bce4bf92 100644 --- a/clients/client-support/src/endpoint/ruleset.ts +++ b/clients/client-support/src/endpoint/ruleset.ts @@ -6,10 +6,10 @@ import { RuleSetObject } from "@smithy/types"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/support.json */ -const y="required", -z="fn", -A="argv", -B="ref"; +const A="required", +B="fn", +C="argv", +D="ref"; const a=true, b="isSet", c="booleanEquals", @@ -20,19 +20,21 @@ g="PartitionResult", h="stringEquals", i="sigv4", j="support", -k={[y]:false,"type":"String"}, -l={[y]:true,"default":false,"type":"Boolean"}, -m={[B]:"Endpoint"}, -n={[z]:c,[A]:[{[B]:"UseFIPS"},true]}, -o={[z]:c,[A]:[{[B]:"UseDualStack"},true]}, +k={[A]:false,"type":"String"}, +l={[A]:true,"default":false,"type":"Boolean"}, +m={[D]:"Endpoint"}, +n={[B]:c,[C]:[{[D]:"UseFIPS"},true]}, +o={[B]:c,[C]:[{[D]:"UseDualStack"},true]}, p={}, -q={[z]:"getAttr",[A]:[{[B]:g},"name"]}, -r={[z]:c,[A]:[{[B]:"UseFIPS"},false]}, -s={[z]:c,[A]:[{[B]:"UseDualStack"},false]}, -t={[z]:"getAttr",[A]:[{[B]:g},"supportsFIPS"]}, -u={[z]:c,[A]:[true,{[z]:"getAttr",[A]:[{[B]:g},"supportsDualStack"]}]}, -v=[n], -w=[o], -x=[{[B]:"Region"}]; -const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[z]:b,[A]:[m]}],rules:[{conditions:v,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:w,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:m,properties:p,headers:p},type:e}],type:f},{conditions:[{[z]:b,[A]:x}],rules:[{conditions:[{[z]:"aws.partition",[A]:x,assign:g}],rules:[{conditions:[{[z]:h,[A]:[q,"aws"]},r,s],endpoint:{url:"https://support.us-east-1.amazonaws.com",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-east-1"}]},headers:p},type:e},{conditions:[{[z]:h,[A]:[q,"aws-cn"]},r,s],endpoint:{url:"https://support.cn-north-1.amazonaws.com.cn",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"cn-north-1"}]},headers:p},type:e},{conditions:[{[z]:h,[A]:[q,"aws-us-gov"]},r,s],endpoint:{url:"https://support.us-gov-west-1.amazonaws.com",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-gov-west-1"}]},headers:p},type:e},{conditions:[{[z]:h,[A]:[q,"aws-iso"]},r,s],endpoint:{url:"https://support.us-iso-east-1.c2s.ic.gov",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-iso-east-1"}]},headers:p},type:e},{conditions:[{[z]:h,[A]:[q,"aws-iso-b"]},r,s],endpoint:{url:"https://support.us-isob-east-1.sc2s.sgov.gov",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-isob-east-1"}]},headers:p},type:e},{conditions:[n,o],rules:[{conditions:[{[z]:c,[A]:[a,t]},u],rules:[{endpoint:{url:"https://support-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:v,rules:[{conditions:[{[z]:c,[A]:[t,a]}],rules:[{endpoint:{url:"https://support-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:w,rules:[{conditions:[u],rules:[{endpoint:{url:"https://support.{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://support.{Region}.{PartitionResult#dnsSuffix}",properties:p,headers:p},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]}; +q={[B]:"getAttr",[C]:[{[D]:g},"name"]}, +r={[B]:c,[C]:[{[D]:"UseFIPS"},false]}, +s={[B]:c,[C]:[{[D]:"UseDualStack"},false]}, +t={[B]:h,[C]:[q,"aws-us-gov"]}, +u={"url":"https://support.us-gov-west-1.amazonaws.com","properties":{"authSchemes":[{"name":i,"signingName":j,"signingRegion":"us-gov-west-1"}]},"headers":{}}, +v={[B]:"getAttr",[C]:[{[D]:g},"supportsFIPS"]}, +w={[B]:c,[C]:[true,{[B]:"getAttr",[C]:[{[D]:g},"supportsDualStack"]}]}, +x=[n], +y=[o], +z=[{[D]:"Region"}]; +const _data={version:"1.0",parameters:{Region:k,UseDualStack:l,UseFIPS:l,Endpoint:k},rules:[{conditions:[{[B]:b,[C]:[m]}],rules:[{conditions:x,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:m,properties:p,headers:p},type:e}],type:f},{conditions:[{[B]:b,[C]:z}],rules:[{conditions:[{[B]:"aws.partition",[C]:z,assign:g}],rules:[{conditions:[{[B]:h,[C]:[q,"aws"]},r,s],endpoint:{url:"https://support.us-east-1.amazonaws.com",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-east-1"}]},headers:p},type:e},{conditions:[{[B]:h,[C]:[q,"aws-cn"]},r,s],endpoint:{url:"https://support.cn-north-1.amazonaws.com.cn",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"cn-north-1"}]},headers:p},type:e},{conditions:[t,r,s],endpoint:u,type:e},{conditions:[t,n,s],endpoint:u,type:e},{conditions:[{[B]:h,[C]:[q,"aws-iso"]},r,s],endpoint:{url:"https://support.us-iso-east-1.c2s.ic.gov",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-iso-east-1"}]},headers:p},type:e},{conditions:[{[B]:h,[C]:[q,"aws-iso-b"]},r,s],endpoint:{url:"https://support.us-isob-east-1.sc2s.sgov.gov",properties:{authSchemes:[{name:i,signingName:j,signingRegion:"us-isob-east-1"}]},headers:p},type:e},{conditions:[n,o],rules:[{conditions:[{[B]:c,[C]:[a,v]},w],rules:[{endpoint:{url:"https://support-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:x,rules:[{conditions:[{[B]:c,[C]:[v,a]}],rules:[{endpoint:{url:"https://support-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:y,rules:[{conditions:[w],rules:[{endpoint:{url:"https://support.{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://support.{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/support.json b/codegen/sdk-codegen/aws-models/support.json index 75f96ffaa42a..7696c9b4f4c3 100644 --- a/codegen/sdk-codegen/aws-models/support.json +++ b/codegen/sdk-codegen/aws-models/support.json @@ -364,6 +364,57 @@ }, "type": "endpoint" }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://support.us-gov-west-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, { "conditions": [ { @@ -858,6 +909,28 @@ "UseDualStack": false } }, + { + "documentation": "For region aws-us-gov-global with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://support.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "aws-us-gov-global", + "UseFIPS": true, + "UseDualStack": false + } + }, { "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { @@ -875,7 +948,16 @@ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://support-fips.us-gov-east-1.amazonaws.com" + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" + } + ] + }, + "url": "https://support.us-gov-west-1.amazonaws.com" } }, "params": { @@ -1745,7 +1827,7 @@ } }, "serviceCode": { - "target": "com.amazonaws.support#ServiceCode", + "target": "com.amazonaws.support#ServiceCode2", "traits": { "smithy.api#documentation": "

The code for the Amazon Web Services service. You can use the DescribeServices\n operation to get the possible serviceCode values.

" } @@ -2137,7 +2219,7 @@ } }, "serviceCode": { - "target": "com.amazonaws.support#ServiceCode", + "target": "com.amazonaws.support#ServiceCode2", "traits": { "smithy.api#documentation": "

The code for the Amazon Web Services service. You can use the DescribeServices\n operation to get the possible serviceCode values.

", "smithy.api#required": {} @@ -2782,6 +2864,9 @@ } }, "com.amazonaws.support#ServiceCode": { + "type": "string" + }, + "com.amazonaws.support#ServiceCode2": { "type": "string", "traits": { "smithy.api#pattern": "^[0-9a-z\\-_]+$" @@ -2790,7 +2875,7 @@ "com.amazonaws.support#ServiceCodeList": { "type": "list", "member": { - "target": "com.amazonaws.support#ServiceCode" + "target": "com.amazonaws.support#ServiceCode2" }, "traits": { "smithy.api#length": {