Skip to content

Commit 757843c

Browse files
author
awstools
committedJan 21, 2025
feat(client-cognito-identity-provider): corrects the dual-stack endpoint configuration for cognitoidp
1 parent 7dbc1c9 commit 757843c

File tree

2 files changed

+320
-20
lines changed

2 files changed

+320
-20
lines changed
 

‎clients/client-cognito-identity-provider/src/endpoint/ruleset.ts

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

9-
const s="required",
10-
t="fn",
11-
u="argv",
12-
v="ref";
9+
const w="required",
10+
x="fn",
11+
y="argv",
12+
z="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://cognito-idp-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://cognito-idp-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://cognito-idp.{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://cognito-idp.{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="stringEquals",
22+
j={[w]:false,"type":"String"},
23+
k={[w]:true,"default":false,"type":"Boolean"},
24+
l={[z]:"Endpoint"},
25+
m={[x]:c,[y]:[{[z]:"UseFIPS"},true]},
26+
n={[x]:c,[y]:[{[z]:"UseDualStack"},true]},
27+
o={},
28+
p={[z]:"Region"},
29+
q={[x]:h,[y]:[{[z]:g},"supportsFIPS"]},
30+
r={[z]:g},
31+
s={[x]:c,[y]:[true,{[x]:h,[y]:[r,"supportsDualStack"]}]},
32+
t=[m],
33+
u=[n],
34+
v=[p];
35+
const _data={version:"1.0",parameters:{Region:j,UseDualStack:k,UseFIPS:k,Endpoint:j},rules:[{conditions:[{[x]:b,[y]:[l]}],rules:[{conditions:t,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:u,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:l,properties:o,headers:o},type:e}],type:f},{conditions:[{[x]:b,[y]:v}],rules:[{conditions:[{[x]:"aws.partition",[y]:v,assign:g}],rules:[{conditions:[m,n],rules:[{conditions:[{[x]:c,[y]:[a,q]},s],rules:[{conditions:[{[x]:i,[y]:[p,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:o,headers:o},type:e},{conditions:[{[x]:i,[y]:[p,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:o,headers:o},type:e},{conditions:[{[x]:i,[y]:[p,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:o,headers:o},type:e},{conditions:[{[x]:i,[y]:[p,"us-west-2"]}],endpoint:{url:"https://cognito-idp-fips.us-west-2.amazonaws.com",properties:o,headers:o},type:e},{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:t,rules:[{conditions:[{[x]:c,[y]:[q,a]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:u,rules:[{conditions:[s],rules:[{conditions:[{[x]:i,[y]:["aws",{[x]:h,[y]:[r,"name"]}]}],endpoint:{url:"https://cognito-idp.{Region}.amazonaws.com",properties:o,headers:o},type:e},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:o,headers:o},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
3236
export const ruleSet: RuleSetObject = _data;

0 commit comments

Comments
 (0)
Please sign in to comment.