Skip to content

Commit a0ab577

Browse files
author
awstools
committed
feat(client-appconfigdata): Fix FIPS Endpoints in aws-us-gov.
1 parent 549616d commit a0ab577

File tree

2 files changed

+44
-17
lines changed

2 files changed

+44
-17
lines changed

clients/client-appconfigdata/src/endpoint/ruleset.ts

+18-16
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,29 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/appconfigdata.json */
88

9-
const s="required",
10-
t="fn",
11-
u="argv",
12-
v="ref";
9+
const u="required",
10+
v="fn",
11+
w="argv",
12+
x="ref";
1313
const a=true,
1414
b="isSet",
1515
c="booleanEquals",
1616
d="error",
1717
e="endpoint",
1818
f="tree",
1919
g="PartitionResult",
20-
h={[s]:false,"type":"String"},
21-
i={[s]:true,"default":false,"type":"Boolean"},
22-
j={[v]:"Endpoint"},
23-
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
24-
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
25-
m={},
26-
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
27-
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
28-
p=[k],
29-
q=[l],
30-
r=[{[v]:"Region"}];
31-
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f},{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{endpoint:{url:"https://appconfigdata-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{endpoint:{url:"https://appconfigdata-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{endpoint:{url:"https://appconfigdata.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://appconfigdata.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
20+
h="getAttr",
21+
i={[u]:false,"type":"String"},
22+
j={[u]:true,"default":false,"type":"Boolean"},
23+
k={[x]:"Endpoint"},
24+
l={[v]:c,[w]:[{[x]:"UseFIPS"},true]},
25+
m={[v]:c,[w]:[{[x]:"UseDualStack"},true]},
26+
n={},
27+
o={[v]:h,[w]:[{[x]:g},"supportsFIPS"]},
28+
p={[x]:g},
29+
q={[v]:c,[w]:[true,{[v]:h,[w]:[p,"supportsDualStack"]}]},
30+
r=[l],
31+
s=[m],
32+
t=[{[x]:"Region"}];
33+
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[v]:b,[w]:[k]}],rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f},{conditions:[{[v]:b,[w]:t}],rules:[{conditions:[{[v]:"aws.partition",[w]:t,assign:g}],rules:[{conditions:[l,m],rules:[{conditions:[{[v]:c,[w]:[a,o]},q],rules:[{endpoint:{url:"https://appconfigdata-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:r,rules:[{conditions:[{[v]:c,[w]:[o,a]}],rules:[{conditions:[{[v]:"stringEquals",[w]:[{[v]:h,[w]:[p,"name"]},"aws-us-gov"]}],endpoint:{url:"https://appconfigdata.{Region}.amazonaws.com",properties:n,headers:n},type:e},{endpoint:{url:"https://appconfigdata-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:s,rules:[{conditions:[q],rules:[{endpoint:{url:"https://appconfigdata.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://appconfigdata.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
3234
export const ruleSet: RuleSetObject = _data;

codegen/sdk-codegen/aws-models/appconfigdata.json

+26-1
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,31 @@
249249
}
250250
],
251251
"rules": [
252+
{
253+
"conditions": [
254+
{
255+
"fn": "stringEquals",
256+
"argv": [
257+
{
258+
"fn": "getAttr",
259+
"argv": [
260+
{
261+
"ref": "PartitionResult"
262+
},
263+
"name"
264+
]
265+
},
266+
"aws-us-gov"
267+
]
268+
}
269+
],
270+
"endpoint": {
271+
"url": "https://appconfigdata.{Region}.amazonaws.com",
272+
"properties": {},
273+
"headers": {}
274+
},
275+
"type": "endpoint"
276+
},
252277
{
253278
"conditions": [],
254279
"endpoint": {
@@ -765,7 +790,7 @@
765790
"documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
766791
"expect": {
767792
"endpoint": {
768-
"url": "https://appconfigdata-fips.us-gov-east-1.amazonaws.com"
793+
"url": "https://appconfigdata.us-gov-east-1.amazonaws.com"
769794
}
770795
},
771796
"params": {

0 commit comments

Comments
 (0)