1{
2    "testCases": [
3        {
4            "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled",
5            "expect": {
6                "endpoint": {
7                    "url": "https://greengrass.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://greengrass.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-south-1 with FIPS disabled and DualStack disabled",
31            "expect": {
32                "endpoint": {
33                    "url": "https://greengrass.ap-south-1.amazonaws.com"
34                }
35            },
36            "params": {
37                "Region": "ap-south-1",
38                "UseFIPS": false,
39                "UseDualStack": false
40            }
41        },
42        {
43            "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled",
44            "expect": {
45                "endpoint": {
46                    "url": "https://greengrass.ap-southeast-1.amazonaws.com"
47                }
48            },
49            "params": {
50                "Region": "ap-southeast-1",
51                "UseFIPS": false,
52                "UseDualStack": false
53            }
54        },
55        {
56            "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled",
57            "expect": {
58                "endpoint": {
59                    "url": "https://greengrass.ap-southeast-2.amazonaws.com"
60                }
61            },
62            "params": {
63                "Region": "ap-southeast-2",
64                "UseFIPS": false,
65                "UseDualStack": false
66            }
67        },
68        {
69            "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled",
70            "expect": {
71                "endpoint": {
72                    "url": "https://greengrass.ca-central-1.amazonaws.com"
73                }
74            },
75            "params": {
76                "Region": "ca-central-1",
77                "UseFIPS": false,
78                "UseDualStack": false
79            }
80        },
81        {
82            "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled",
83            "expect": {
84                "endpoint": {
85                    "url": "https://greengrass.eu-central-1.amazonaws.com"
86                }
87            },
88            "params": {
89                "Region": "eu-central-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://greengrass.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://greengrass.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://greengrass.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://greengrass.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-2 with FIPS disabled and DualStack disabled",
148            "expect": {
149                "endpoint": {
150                    "url": "https://greengrass.us-west-2.amazonaws.com"
151                }
152            },
153            "params": {
154                "Region": "us-west-2",
155                "UseFIPS": false,
156                "UseDualStack": false
157            }
158        },
159        {
160            "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
161            "expect": {
162                "endpoint": {
163                    "url": "https://greengrass-fips.us-east-1.api.aws"
164                }
165            },
166            "params": {
167                "Region": "us-east-1",
168                "UseFIPS": true,
169                "UseDualStack": true
170            }
171        },
172        {
173            "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
174            "expect": {
175                "endpoint": {
176                    "url": "https://greengrass-fips.us-east-1.amazonaws.com"
177                }
178            },
179            "params": {
180                "Region": "us-east-1",
181                "UseFIPS": true,
182                "UseDualStack": false
183            }
184        },
185        {
186            "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
187            "expect": {
188                "endpoint": {
189                    "url": "https://greengrass.us-east-1.api.aws"
190                }
191            },
192            "params": {
193                "Region": "us-east-1",
194                "UseFIPS": false,
195                "UseDualStack": true
196            }
197        },
198        {
199            "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
200            "expect": {
201                "endpoint": {
202                    "url": "https://greengrass.cn-north-1.amazonaws.com.cn"
203                }
204            },
205            "params": {
206                "Region": "cn-north-1",
207                "UseFIPS": false,
208                "UseDualStack": false
209            }
210        },
211        {
212            "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
213            "expect": {
214                "endpoint": {
215                    "url": "https://greengrass-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://greengrass-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://greengrass.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 dataplane-us-gov-east-1 with FIPS disabled and DualStack disabled",
252            "expect": {
253                "endpoint": {
254                    "properties": {
255                        "authSchemes": [
256                            {
257                                "name": "sigv4",
258                                "signingName": "greengrass",
259                                "signingRegion": "us-gov-east-1"
260                            }
261                        ]
262                    },
263                    "url": "https://greengrass-ats.iot.us-gov-east-1.amazonaws.com"
264                }
265            },
266            "params": {
267                "Region": "dataplane-us-gov-east-1",
268                "UseFIPS": false,
269                "UseDualStack": false
270            }
271        },
272        {
273            "documentation": "For region dataplane-us-gov-west-1 with FIPS disabled and DualStack disabled",
274            "expect": {
275                "endpoint": {
276                    "properties": {
277                        "authSchemes": [
278                            {
279                                "name": "sigv4",
280                                "signingName": "greengrass",
281                                "signingRegion": "us-gov-west-1"
282                            }
283                        ]
284                    },
285                    "url": "https://greengrass-ats.iot.us-gov-west-1.amazonaws.com"
286                }
287            },
288            "params": {
289                "Region": "dataplane-us-gov-west-1",
290                "UseFIPS": false,
291                "UseDualStack": false
292            }
293        },
294        {
295            "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
296            "expect": {
297                "endpoint": {
298                    "url": "https://greengrass.us-gov-east-1.amazonaws.com"
299                }
300            },
301            "params": {
302                "Region": "us-gov-east-1",
303                "UseFIPS": false,
304                "UseDualStack": false
305            }
306        },
307        {
308            "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
309            "expect": {
310                "endpoint": {
311                    "url": "https://greengrass.us-gov-east-1.amazonaws.com"
312                }
313            },
314            "params": {
315                "Region": "us-gov-east-1",
316                "UseFIPS": true,
317                "UseDualStack": false
318            }
319        },
320        {
321            "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled",
322            "expect": {
323                "endpoint": {
324                    "url": "https://greengrass.us-gov-west-1.amazonaws.com"
325                }
326            },
327            "params": {
328                "Region": "us-gov-west-1",
329                "UseFIPS": false,
330                "UseDualStack": false
331            }
332        },
333        {
334            "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled",
335            "expect": {
336                "endpoint": {
337                    "url": "https://greengrass.us-gov-west-1.amazonaws.com"
338                }
339            },
340            "params": {
341                "Region": "us-gov-west-1",
342                "UseFIPS": true,
343                "UseDualStack": false
344            }
345        },
346        {
347            "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
348            "expect": {
349                "endpoint": {
350                    "url": "https://greengrass-fips.us-gov-east-1.api.aws"
351                }
352            },
353            "params": {
354                "Region": "us-gov-east-1",
355                "UseFIPS": true,
356                "UseDualStack": true
357            }
358        },
359        {
360            "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
361            "expect": {
362                "endpoint": {
363                    "url": "https://greengrass.us-gov-east-1.api.aws"
364                }
365            },
366            "params": {
367                "Region": "us-gov-east-1",
368                "UseFIPS": false,
369                "UseDualStack": true
370            }
371        },
372        {
373            "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
374            "expect": {
375                "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
376            },
377            "params": {
378                "Region": "us-iso-east-1",
379                "UseFIPS": true,
380                "UseDualStack": true
381            }
382        },
383        {
384            "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
385            "expect": {
386                "endpoint": {
387                    "url": "https://greengrass-fips.us-iso-east-1.c2s.ic.gov"
388                }
389            },
390            "params": {
391                "Region": "us-iso-east-1",
392                "UseFIPS": true,
393                "UseDualStack": false
394            }
395        },
396        {
397            "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
398            "expect": {
399                "error": "DualStack is enabled but this partition does not support DualStack"
400            },
401            "params": {
402                "Region": "us-iso-east-1",
403                "UseFIPS": false,
404                "UseDualStack": true
405            }
406        },
407        {
408            "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
409            "expect": {
410                "endpoint": {
411                    "url": "https://greengrass.us-iso-east-1.c2s.ic.gov"
412                }
413            },
414            "params": {
415                "Region": "us-iso-east-1",
416                "UseFIPS": false,
417                "UseDualStack": false
418            }
419        },
420        {
421            "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
422            "expect": {
423                "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
424            },
425            "params": {
426                "Region": "us-isob-east-1",
427                "UseFIPS": true,
428                "UseDualStack": true
429            }
430        },
431        {
432            "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
433            "expect": {
434                "endpoint": {
435                    "url": "https://greengrass-fips.us-isob-east-1.sc2s.sgov.gov"
436                }
437            },
438            "params": {
439                "Region": "us-isob-east-1",
440                "UseFIPS": true,
441                "UseDualStack": false
442            }
443        },
444        {
445            "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
446            "expect": {
447                "error": "DualStack is enabled but this partition does not support DualStack"
448            },
449            "params": {
450                "Region": "us-isob-east-1",
451                "UseFIPS": false,
452                "UseDualStack": true
453            }
454        },
455        {
456            "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
457            "expect": {
458                "endpoint": {
459                    "url": "https://greengrass.us-isob-east-1.sc2s.sgov.gov"
460                }
461            },
462            "params": {
463                "Region": "us-isob-east-1",
464                "UseFIPS": false,
465                "UseDualStack": false
466            }
467        },
468        {
469            "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
470            "expect": {
471                "endpoint": {
472                    "url": "https://example.com"
473                }
474            },
475            "params": {
476                "Region": "us-east-1",
477                "UseFIPS": false,
478                "UseDualStack": false,
479                "Endpoint": "https://example.com"
480            }
481        },
482        {
483            "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
484            "expect": {
485                "endpoint": {
486                    "url": "https://example.com"
487                }
488            },
489            "params": {
490                "UseFIPS": false,
491                "UseDualStack": false,
492                "Endpoint": "https://example.com"
493            }
494        },
495        {
496            "documentation": "For custom endpoint with fips enabled and dualstack disabled",
497            "expect": {
498                "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
499            },
500            "params": {
501                "Region": "us-east-1",
502                "UseFIPS": true,
503                "UseDualStack": false,
504                "Endpoint": "https://example.com"
505            }
506        },
507        {
508            "documentation": "For custom endpoint with fips disabled and dualstack enabled",
509            "expect": {
510                "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
511            },
512            "params": {
513                "Region": "us-east-1",
514                "UseFIPS": false,
515                "UseDualStack": true,
516                "Endpoint": "https://example.com"
517            }
518        },
519        {
520            "documentation": "Missing region",
521            "expect": {
522                "error": "Invalid Configuration: Missing Region"
523            }
524        }
525    ],
526    "version": "1.0"
527}