/
ruleset.ts
30 lines (28 loc) · 2.56 KB
/
ruleset.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// @ts-nocheck
// generated code, do not edit
import { RuleSetObject } from "@aws-sdk/util-endpoints";
/* This file is compressed. Log this object
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/route53-recovery-control-config.json */
const r="fn",
s="argv",
t="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[t]:"Region"},
j={[t]:"Endpoint"},
k={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
l={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
m={},
n={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:d},"supportsFIPS"]}]},
o={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:d},"supportsDualStack"]}]},
p=[k],
q=[l];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[r]:"aws.partition",[s]:[i],assign:d}],type:e,rules:[{conditions:[{[r]:"isSet",[s]:[j]}],type:e,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:j,properties:m,headers:m},type:g}]}]},{conditions:[k,l],type:e,rules:[{conditions:[n,o],type:e,rules:[{endpoint:{url:"https://route53-recovery-control-config-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://route53-recovery-control-config-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:q,type:e,rules:[{conditions:[o],type:e,rules:[{endpoint:{url:"https://route53-recovery-control-config.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{conditions:[{[r]:"stringEquals",[s]:[i,"aws-global"]}],endpoint:{url:"https://route53-recovery-control-config.us-west-2.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingRegion:"us-west-2",signingName:"route53-recovery-control-config"}]},headers:m},type:g},{endpoint:{url:"https://route53-recovery-control-config.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]}]};
export const ruleSet: RuleSetObject = _data;