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