Skip to content

Commit 99c585c

Browse files
author
awstools
committed
feat(client-budgets): Fix the AWS Budgets endpoint for the aws-eusc partition.
1 parent bd3c41a commit 99c585c

File tree

2 files changed

+125
-21
lines changed

2 files changed

+125
-21
lines changed

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

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/budgets.json */
88

9-
const w="required",
10-
x="fn",
11-
y="argv",
12-
z="ref";
9+
const y="required",
10+
z="fn",
11+
A="argv",
12+
B="ref",
13+
C="authSchemes",
14+
D="signingRegion";
1315
const a=true,
1416
b="isSet",
1517
c="booleanEquals",
@@ -19,18 +21,20 @@ f="tree",
1921
g="PartitionResult",
2022
h="stringEquals",
2123
i="sigv4",
22-
j={[w]:true,"default":false,"type":"boolean"},
23-
k={[w]:false,"type":"string"},
24-
l={[z]:"Endpoint"},
25-
m={[x]:c,[y]:[{[z]:"UseFIPS"},true]},
26-
n={[x]:c,[y]:[{[z]:"UseDualStack"},true]},
24+
j={[y]:true,"default":false,"type":"boolean"},
25+
k={[y]:false,"type":"string"},
26+
l={[B]:"Endpoint"},
27+
m={[z]:c,[A]:[{[B]:"UseFIPS"},true]},
28+
n={[z]:c,[A]:[{[B]:"UseDualStack"},true]},
2729
o={},
28-
p={[x]:"getAttr",[y]:[{[z]:g},"name"]},
29-
q={[x]:c,[y]:[{[z]:"UseFIPS"},false]},
30-
r={[x]:c,[y]:[{[z]:"UseDualStack"},false]},
31-
s={[x]:"getAttr",[y]:[{[z]:g},"supportsFIPS"]},
32-
t={[x]:c,[y]:[true,{[x]:"getAttr",[y]:[{[z]:g},"supportsDualStack"]}]},
33-
u={"authSchemes":[{"name":i,"signingRegion":"{PartitionResult#implicitGlobalRegion}"}]},
34-
v=[{[z]:"Region"}];
35-
const _data={version:"1.0",parameters:{UseDualStack:j,UseFIPS:j,Endpoint:k,Region:k},rules:[{conditions:[{[x]:b,[y]:[l]}],rules:[{conditions:[m],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:[n],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:l,properties:o,headers:o},type:e}],type:f}],type:f},{rules:[{conditions:[{[x]:b,[y]:v}],rules:[{conditions:[{[x]:"aws.partition",[y]:v,assign:g}],rules:[{conditions:[{[x]:h,[y]:[p,"aws"]},q,n],endpoint:{url:"https://budgets.us-east-1.api.aws",properties:{authSchemes:[{name:i,signingRegion:"us-east-1"}]},headers:o},type:e},{conditions:[{[x]:h,[y]:[p,"aws-iso-b"]},q,r],endpoint:{url:"https://budgets.global.sc2s.sgov.gov",properties:{authSchemes:[{name:i,signingRegion:"us-isob-east-1"}]},headers:o},type:e},{conditions:[{[x]:h,[y]:[p,"aws-iso-e"]},q,r],endpoint:{url:"https://budgets.global.cloud.adc-e.uk",properties:{authSchemes:[{name:i,signingRegion:"eu-isoe-west-1"}]},headers:o},type:e},{conditions:[{[x]:h,[y]:[p,"aws-iso-f"]},q,r],endpoint:{url:"https://budgets.global.csp.hci.ic.gov",properties:{authSchemes:[{name:i,signingRegion:"us-isof-south-1"}]},headers:o},type:e},{conditions:[m,n],rules:[{conditions:[{[x]:c,[y]:[a,s]},t],rules:[{endpoint:{url:"https://budgets-fips.{PartitionResult#dualStackDnsSuffix}",properties:u,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:[m,r],rules:[{conditions:[{[x]:c,[y]:[s,a]}],rules:[{endpoint:{url:"https://budgets-fips.{PartitionResult#dnsSuffix}",properties:u,headers:o},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:[q,n],rules:[{conditions:[t],rules:[{endpoint:{url:"https://budgets.{PartitionResult#dualStackDnsSuffix}",properties:u,headers:o},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://budgets.{PartitionResult#dnsSuffix}",properties:u,headers:o},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]};
30+
p={[z]:"getAttr",[A]:[{[B]:g},"name"]},
31+
q={[z]:c,[A]:[{[B]:"UseFIPS"},false]},
32+
r={[z]:c,[A]:[{[B]:"UseDualStack"},false]},
33+
s={[z]:h,[A]:[p,"aws-eusc"]},
34+
t={"url":"https://budgets.eusc-de-east-1.api.amazonwebservices.eu","properties":{[C]:[{"name":i,[D]:"eusc-de-east-1"}]},"headers":{}},
35+
u={[z]:"getAttr",[A]:[{[B]:g},"supportsFIPS"]},
36+
v={[z]:c,[A]:[true,{[z]:"getAttr",[A]:[{[B]:g},"supportsDualStack"]}]},
37+
w={[C]:[{"name":i,[D]:"{PartitionResult#implicitGlobalRegion}"}]},
38+
x=[{[B]:"Region"}];
39+
const _data={version:"1.0",parameters:{UseDualStack:j,UseFIPS:j,Endpoint:k,Region:k},rules:[{conditions:[{[z]:b,[A]:[l]}],rules:[{conditions:[m],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:[n],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:l,properties:o,headers:o},type:e}],type:f}],type:f},{rules:[{conditions:[{[z]:b,[A]:x}],rules:[{conditions:[{[z]:"aws.partition",[A]:x,assign:g}],rules:[{conditions:[{[z]:h,[A]:[p,"aws"]},q,n],endpoint:{url:"https://budgets.us-east-1.api.aws",properties:{[C]:[{name:i,[D]:"us-east-1"}]},headers:o},type:e},{conditions:[{[z]:h,[A]:[p,"aws-iso-b"]},q,r],endpoint:{url:"https://budgets.global.sc2s.sgov.gov",properties:{[C]:[{name:i,[D]:"us-isob-east-1"}]},headers:o},type:e},{conditions:[{[z]:h,[A]:[p,"aws-iso-e"]},q,r],endpoint:{url:"https://budgets.global.cloud.adc-e.uk",properties:{[C]:[{name:i,[D]:"eu-isoe-west-1"}]},headers:o},type:e},{conditions:[{[z]:h,[A]:[p,"aws-iso-f"]},q,r],endpoint:{url:"https://budgets.global.csp.hci.ic.gov",properties:{[C]:[{name:i,[D]:"us-isof-south-1"}]},headers:o},type:e},{conditions:[s,q,r],endpoint:t,type:e},{conditions:[s,q,n],endpoint:t,type:e},{conditions:[m,n],rules:[{conditions:[{[z]:c,[A]:[a,u]},v],rules:[{endpoint:{url:"https://budgets-fips.{PartitionResult#dualStackDnsSuffix}",properties:w,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:[m,r],rules:[{conditions:[{[z]:c,[A]:[u,a]}],rules:[{endpoint:{url:"https://budgets-fips.{PartitionResult#dnsSuffix}",properties:w,headers:o},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:[q,n],rules:[{conditions:[v],rules:[{endpoint:{url:"https://budgets.{PartitionResult#dualStackDnsSuffix}",properties:w,headers:o},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://budgets.{PartitionResult#dnsSuffix}",properties:w,headers:o},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]};
3640
export const ruleSet: RuleSetObject = _data;

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

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,106 @@
447447
},
448448
"type": "endpoint"
449449
},
450+
{
451+
"conditions": [
452+
{
453+
"fn": "stringEquals",
454+
"argv": [
455+
{
456+
"fn": "getAttr",
457+
"argv": [
458+
{
459+
"ref": "PartitionResult"
460+
},
461+
"name"
462+
]
463+
},
464+
"aws-eusc"
465+
]
466+
},
467+
{
468+
"fn": "booleanEquals",
469+
"argv": [
470+
{
471+
"ref": "UseFIPS"
472+
},
473+
false
474+
]
475+
},
476+
{
477+
"fn": "booleanEquals",
478+
"argv": [
479+
{
480+
"ref": "UseDualStack"
481+
},
482+
false
483+
]
484+
}
485+
],
486+
"endpoint": {
487+
"url": "https://budgets.eusc-de-east-1.api.amazonwebservices.eu",
488+
"properties": {
489+
"authSchemes": [
490+
{
491+
"name": "sigv4",
492+
"signingRegion": "eusc-de-east-1"
493+
}
494+
]
495+
},
496+
"headers": {}
497+
},
498+
"type": "endpoint"
499+
},
500+
{
501+
"conditions": [
502+
{
503+
"fn": "stringEquals",
504+
"argv": [
505+
{
506+
"fn": "getAttr",
507+
"argv": [
508+
{
509+
"ref": "PartitionResult"
510+
},
511+
"name"
512+
]
513+
},
514+
"aws-eusc"
515+
]
516+
},
517+
{
518+
"fn": "booleanEquals",
519+
"argv": [
520+
{
521+
"ref": "UseFIPS"
522+
},
523+
false
524+
]
525+
},
526+
{
527+
"fn": "booleanEquals",
528+
"argv": [
529+
{
530+
"ref": "UseDualStack"
531+
},
532+
true
533+
]
534+
}
535+
],
536+
"endpoint": {
537+
"url": "https://budgets.eusc-de-east-1.api.amazonwebservices.eu",
538+
"properties": {
539+
"authSchemes": [
540+
{
541+
"name": "sigv4",
542+
"signingRegion": "eusc-de-east-1"
543+
}
544+
]
545+
},
546+
"headers": {}
547+
},
548+
"type": "endpoint"
549+
},
450550
{
451551
"conditions": [
452552
{
@@ -934,7 +1034,7 @@
9341034
}
9351035
]
9361036
},
937-
"url": "https://budgets.amazonaws.eu"
1037+
"url": "https://budgets.eusc-de-east-1.api.amazonwebservices.eu"
9381038
}
9391039
},
9401040
"params": {
@@ -4729,7 +4829,7 @@
47294829
"min": 25,
47304830
"max": 684
47314831
},
4732-
"smithy.api#pattern": "^arn:aws(-cn|-us-gov|-iso|-iso-[a-z]{1})?:iam::(\\d{12}|aws):policy(\\u002F[\\u0021-\\u007F]+\\u002F|\\u002F)[\\w+=,.@-]+$"
4832+
"smithy.api#pattern": "^arn:aws(-eusc|-cn|-us-gov|-iso|-iso-[a-z]{1})?:iam::(\\d{12}|aws):policy(\\u002F[\\u0021-\\u007F]+\\u002F|\\u002F)[\\w+=,.@-]+$"
47334833
}
47344834
},
47354835
"com.amazonaws.budgets#PolicyId": {
@@ -4749,7 +4849,7 @@
47494849
"min": 9,
47504850
"max": 20
47514851
},
4752-
"smithy.api#pattern": "^\\w{2}-\\w+(-\\w+)?-\\d$"
4852+
"smithy.api#pattern": "^\\w{2,4}-\\w+(-\\w+)?-\\d$"
47534853
}
47544854
},
47554855
"com.amazonaws.budgets#ResourceLockedException": {
@@ -4846,7 +4946,7 @@
48464946
"min": 32,
48474947
"max": 618
48484948
},
4849-
"smithy.api#pattern": "^arn:aws(-cn|-us-gov|-iso|-iso-[a-z]{1})?:iam::\\d{12}:role(\\u002F[\\u0021-\\u007F]+\\u002F|\\u002F)[\\w+=,.@-]+$"
4949+
"smithy.api#pattern": "^arn:aws(-eusc|-cn|-us-gov|-iso|-iso-[a-z]{1})?:iam::\\d{12}:role(\\u002F[\\u0021-\\u007F]+\\u002F|\\u002F)[\\w+=,.@-]+$"
48504950
}
48514951
},
48524952
"com.amazonaws.budgets#Roles": {

0 commit comments

Comments
 (0)