1{
2    "testCases": [
3        {
4            "documentation": "For region aws-global with FIPS disabled and DualStack disabled",
5            "expect": {
6                "endpoint": {
7                    "properties": {
8                        "authSchemes": [
9                            {
10                                "name": "sigv4",
11                                "signingName": "budgets",
12                                "signingRegion": "us-east-1"
13                            }
14                        ]
15                    },
16                    "url": "https://budgets.amazonaws.com"
17                }
18            },
19            "params": {
20                "Region": "aws-global",
21                "UseFIPS": false,
22                "UseDualStack": false
23            }
24        },
25        {
26            "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
27            "expect": {
28                "endpoint": {
29                    "url": "https://budgets-fips.us-east-1.api.aws"
30                }
31            },
32            "params": {
33                "Region": "us-east-1",
34                "UseFIPS": true,
35                "UseDualStack": true
36            }
37        },
38        {
39            "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
40            "expect": {
41                "endpoint": {
42                    "url": "https://budgets-fips.us-east-1.amazonaws.com"
43                }
44            },
45            "params": {
46                "Region": "us-east-1",
47                "UseFIPS": true,
48                "UseDualStack": false
49            }
50        },
51        {
52            "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
53            "expect": {
54                "endpoint": {
55                    "url": "https://budgets.us-east-1.api.aws"
56                }
57            },
58            "params": {
59                "Region": "us-east-1",
60                "UseFIPS": false,
61                "UseDualStack": true
62            }
63        },
64        {
65            "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
66            "expect": {
67                "endpoint": {
68                    "properties": {
69                        "authSchemes": [
70                            {
71                                "name": "sigv4",
72                                "signingName": "budgets",
73                                "signingRegion": "us-east-1"
74                            }
75                        ]
76                    },
77                    "url": "https://budgets.amazonaws.com"
78                }
79            },
80            "params": {
81                "Region": "us-east-1",
82                "UseFIPS": false,
83                "UseDualStack": false
84            }
85        },
86        {
87            "documentation": "For region aws-cn-global with FIPS disabled and DualStack disabled",
88            "expect": {
89                "endpoint": {
90                    "properties": {
91                        "authSchemes": [
92                            {
93                                "name": "sigv4",
94                                "signingName": "budgets",
95                                "signingRegion": "cn-northwest-1"
96                            }
97                        ]
98                    },
99                    "url": "https://budgets.amazonaws.com.cn"
100                }
101            },
102            "params": {
103                "Region": "aws-cn-global",
104                "UseFIPS": false,
105                "UseDualStack": false
106            }
107        },
108        {
109            "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
110            "expect": {
111                "endpoint": {
112                    "url": "https://budgets-fips.cn-north-1.api.amazonwebservices.com.cn"
113                }
114            },
115            "params": {
116                "Region": "cn-north-1",
117                "UseFIPS": true,
118                "UseDualStack": true
119            }
120        },
121        {
122            "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
123            "expect": {
124                "endpoint": {
125                    "url": "https://budgets-fips.cn-north-1.amazonaws.com.cn"
126                }
127            },
128            "params": {
129                "Region": "cn-north-1",
130                "UseFIPS": true,
131                "UseDualStack": false
132            }
133        },
134        {
135            "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
136            "expect": {
137                "endpoint": {
138                    "url": "https://budgets.cn-north-1.api.amazonwebservices.com.cn"
139                }
140            },
141            "params": {
142                "Region": "cn-north-1",
143                "UseFIPS": false,
144                "UseDualStack": true
145            }
146        },
147        {
148            "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
149            "expect": {
150                "endpoint": {
151                    "properties": {
152                        "authSchemes": [
153                            {
154                                "name": "sigv4",
155                                "signingName": "budgets",
156                                "signingRegion": "cn-northwest-1"
157                            }
158                        ]
159                    },
160                    "url": "https://budgets.amazonaws.com.cn"
161                }
162            },
163            "params": {
164                "Region": "cn-north-1",
165                "UseFIPS": false,
166                "UseDualStack": false
167            }
168        },
169        {
170            "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
171            "expect": {
172                "endpoint": {
173                    "url": "https://budgets-fips.us-gov-east-1.api.aws"
174                }
175            },
176            "params": {
177                "Region": "us-gov-east-1",
178                "UseFIPS": true,
179                "UseDualStack": true
180            }
181        },
182        {
183            "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
184            "expect": {
185                "endpoint": {
186                    "url": "https://budgets-fips.us-gov-east-1.amazonaws.com"
187                }
188            },
189            "params": {
190                "Region": "us-gov-east-1",
191                "UseFIPS": true,
192                "UseDualStack": false
193            }
194        },
195        {
196            "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
197            "expect": {
198                "endpoint": {
199                    "url": "https://budgets.us-gov-east-1.api.aws"
200                }
201            },
202            "params": {
203                "Region": "us-gov-east-1",
204                "UseFIPS": false,
205                "UseDualStack": true
206            }
207        },
208        {
209            "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
210            "expect": {
211                "endpoint": {
212                    "url": "https://budgets.us-gov-east-1.amazonaws.com"
213                }
214            },
215            "params": {
216                "Region": "us-gov-east-1",
217                "UseFIPS": false,
218                "UseDualStack": false
219            }
220        },
221        {
222            "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
223            "expect": {
224                "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
225            },
226            "params": {
227                "Region": "us-iso-east-1",
228                "UseFIPS": true,
229                "UseDualStack": true
230            }
231        },
232        {
233            "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
234            "expect": {
235                "endpoint": {
236                    "url": "https://budgets-fips.us-iso-east-1.c2s.ic.gov"
237                }
238            },
239            "params": {
240                "Region": "us-iso-east-1",
241                "UseFIPS": true,
242                "UseDualStack": false
243            }
244        },
245        {
246            "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
247            "expect": {
248                "error": "DualStack is enabled but this partition does not support DualStack"
249            },
250            "params": {
251                "Region": "us-iso-east-1",
252                "UseFIPS": false,
253                "UseDualStack": true
254            }
255        },
256        {
257            "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
258            "expect": {
259                "endpoint": {
260                    "url": "https://budgets.us-iso-east-1.c2s.ic.gov"
261                }
262            },
263            "params": {
264                "Region": "us-iso-east-1",
265                "UseFIPS": false,
266                "UseDualStack": false
267            }
268        },
269        {
270            "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
271            "expect": {
272                "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
273            },
274            "params": {
275                "Region": "us-isob-east-1",
276                "UseFIPS": true,
277                "UseDualStack": true
278            }
279        },
280        {
281            "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
282            "expect": {
283                "endpoint": {
284                    "url": "https://budgets-fips.us-isob-east-1.sc2s.sgov.gov"
285                }
286            },
287            "params": {
288                "Region": "us-isob-east-1",
289                "UseFIPS": true,
290                "UseDualStack": false
291            }
292        },
293        {
294            "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
295            "expect": {
296                "error": "DualStack is enabled but this partition does not support DualStack"
297            },
298            "params": {
299                "Region": "us-isob-east-1",
300                "UseFIPS": false,
301                "UseDualStack": true
302            }
303        },
304        {
305            "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
306            "expect": {
307                "endpoint": {
308                    "url": "https://budgets.us-isob-east-1.sc2s.sgov.gov"
309                }
310            },
311            "params": {
312                "Region": "us-isob-east-1",
313                "UseFIPS": false,
314                "UseDualStack": false
315            }
316        },
317        {
318            "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
319            "expect": {
320                "endpoint": {
321                    "url": "https://example.com"
322                }
323            },
324            "params": {
325                "Region": "us-east-1",
326                "UseFIPS": false,
327                "UseDualStack": false,
328                "Endpoint": "https://example.com"
329            }
330        },
331        {
332            "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
333            "expect": {
334                "endpoint": {
335                    "url": "https://example.com"
336                }
337            },
338            "params": {
339                "UseFIPS": false,
340                "UseDualStack": false,
341                "Endpoint": "https://example.com"
342            }
343        },
344        {
345            "documentation": "For custom endpoint with fips enabled and dualstack disabled",
346            "expect": {
347                "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
348            },
349            "params": {
350                "Region": "us-east-1",
351                "UseFIPS": true,
352                "UseDualStack": false,
353                "Endpoint": "https://example.com"
354            }
355        },
356        {
357            "documentation": "For custom endpoint with fips disabled and dualstack enabled",
358            "expect": {
359                "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
360            },
361            "params": {
362                "Region": "us-east-1",
363                "UseFIPS": false,
364                "UseDualStack": true,
365                "Endpoint": "https://example.com"
366            }
367        },
368        {
369            "documentation": "Missing region",
370            "expect": {
371                "error": "Invalid Configuration: Missing Region"
372            }
373        }
374    ],
375    "version": "1.0"
376}