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