Skip to content

Commit

Permalink
feat(client-support): Releasing minor endpoint updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Apr 26, 2024
1 parent dcebb69 commit 354980a
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 22 deletions.
38 changes: 20 additions & 18 deletions clients/client-support/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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;
93 changes: 89 additions & 4 deletions codegen/sdk-codegen/aws-models/support.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down Expand Up @@ -1745,7 +1827,7 @@
}
},
"serviceCode": {
"target": "com.amazonaws.support#ServiceCode",
"target": "com.amazonaws.support#ServiceCode2",
"traits": {
"smithy.api#documentation": "<p>The code for the Amazon Web Services service. You can use the <a>DescribeServices</a>\n operation to get the possible <code>serviceCode</code> values.</p>"
}
Expand Down Expand Up @@ -2137,7 +2219,7 @@
}
},
"serviceCode": {
"target": "com.amazonaws.support#ServiceCode",
"target": "com.amazonaws.support#ServiceCode2",
"traits": {
"smithy.api#documentation": "<p>The code for the Amazon Web Services service. You can use the <a>DescribeServices</a>\n operation to get the possible <code>serviceCode</code> values.</p>",
"smithy.api#required": {}
Expand Down Expand Up @@ -2782,6 +2864,9 @@
}
},
"com.amazonaws.support#ServiceCode": {
"type": "string"
},
"com.amazonaws.support#ServiceCode2": {
"type": "string",
"traits": {
"smithy.api#pattern": "^[0-9a-z\\-_]+$"
Expand All @@ -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": {
Expand Down

0 comments on commit 354980a

Please sign in to comment.