Skip to content

Commit 0865158

Browse files
author
awstools
committed
feat(client-outposts): Enabled FIPS endpoints for GovCloud (US) regions in SDK.
1 parent caee754 commit 0865158

File tree

2 files changed

+444
-1001
lines changed

2 files changed

+444
-1001
lines changed

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

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/outposts.json */
88

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

0 commit comments

Comments
 (0)