Skip to content

Commit 6eef788

Browse files
author
awstools
committedJan 25, 2023
feat(client-cloudformation): Enabled FIPS aws-us-gov endpoints in SDK.
1 parent 717df3e commit 6eef788

File tree

4 files changed

+12327
-13440
lines changed

4 files changed

+12327
-13440
lines changed
 

‎clients/client-cloudformation/src/endpoint/EndpointParameters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
2424
};
2525

2626
export interface EndpointParameters extends __EndpointParameters {
27-
Region?: string;
27+
Region: string;
2828
UseDualStack?: boolean;
2929
UseFIPS?: boolean;
3030
Endpoint?: string;

‎clients/client-cloudformation/src/endpoint/ruleset.ts

+24-20
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/cloudformation.json */
88

9-
const p="required",
10-
q="fn",
11-
r="argv",
12-
s="ref";
13-
const a="PartitionResult",
14-
b="tree",
15-
c="error",
16-
d="endpoint",
17-
e={[p]:false,"type":"String"},
18-
f={[p]:true,"default":false,"type":"Boolean"},
19-
g={[s]:"Endpoint"},
20-
h={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
21-
i={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
22-
j={},
23-
k={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsFIPS"]}]},
24-
l={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsDualStack"]}]},
25-
m=[g],
26-
n=[h],
27-
o=[i];
28-
const _data={version:"1.0",parameters:{Region:e,UseDualStack:f,UseFIPS:f,Endpoint:e},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:a}],type:b,rules:[{conditions:[{[q]:"isSet",[r]:m},{[q]:"parseURL",[r]:m,assign:"url"}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:g,properties:j,headers:j},type:d}]}]},{conditions:[h,i],type:b,rules:[{conditions:[k,l],type:b,rules:[{endpoint:{url:"https://cloudformation-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[k],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://cloudformation-fips.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://cloudformation.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://cloudformation.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]};
9+
const u="fn",
10+
v="argv",
11+
w="ref";
12+
const a=true,
13+
b=false,
14+
c="String",
15+
d="PartitionResult",
16+
e="tree",
17+
f="error",
18+
g="endpoint",
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://cloudformation-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://cloudformation.{Region}.amazonaws.com",properties:o,headers:o},type:g},{endpoint:{url:"https://cloudformation-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://cloudformation.{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://cloudformation.us-gov-east-1.amazonaws.com",properties:o,headers:o},type:g},{conditions:[{[u]:i,[v]:[k,"us-gov-west-1"]}],endpoint:{url:"https://cloudformation.us-gov-west-1.amazonaws.com",properties:o,headers:o},type:g},{endpoint:{url:"https://cloudformation.{Region}.{PartitionResult#dnsSuffix}",properties:o,headers:o},type:g}]}]}]};
2933
export const ruleSet: RuleSetObject = _data;

‎clients/client-cloudformation/src/models/models_0.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7770,7 +7770,6 @@ export interface RegisterTypeInput {
77707770
* <i>MyCompany</i>::<i>Testing</i>::<i>MyTestHook</i>.</p>
77717771
* </li>
77727772
* </ul>
7773-
*
77747773
* <note>
77757774
* <p>The following organization namespaces are reserved and can't be used in your
77767775
* extension names:</p>

‎codegen/sdk-codegen/aws-models/cloudformation.json

+12,302-13,418
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.