• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "version": "1.0",
3    "parameters": {
4        "Region": {
5            "builtIn": "AWS::Region",
6            "required": false,
7            "documentation": "The AWS region used to dispatch the request.",
8            "type": "String"
9        },
10        "UseDualStack": {
11            "builtIn": "AWS::UseDualStack",
12            "required": true,
13            "default": false,
14            "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
15            "type": "Boolean"
16        },
17        "UseFIPS": {
18            "builtIn": "AWS::UseFIPS",
19            "required": true,
20            "default": false,
21            "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
22            "type": "Boolean"
23        },
24        "Endpoint": {
25            "builtIn": "SDK::Endpoint",
26            "required": false,
27            "documentation": "Override the endpoint used to send this request",
28            "type": "String"
29        }
30    },
31    "rules": [
32        {
33            "conditions": [
34                {
35                    "fn": "isSet",
36                    "argv": [
37                        {
38                            "ref": "Endpoint"
39                        }
40                    ]
41                }
42            ],
43            "type": "tree",
44            "rules": [
45                {
46                    "conditions": [
47                        {
48                            "fn": "booleanEquals",
49                            "argv": [
50                                {
51                                    "ref": "UseFIPS"
52                                },
53                                true
54                            ]
55                        }
56                    ],
57                    "error": "Invalid Configuration: FIPS and custom endpoint are not supported",
58                    "type": "error"
59                },
60                {
61                    "conditions": [
62                        {
63                            "fn": "booleanEquals",
64                            "argv": [
65                                {
66                                    "ref": "UseDualStack"
67                                },
68                                true
69                            ]
70                        }
71                    ],
72                    "error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
73                    "type": "error"
74                },
75                {
76                    "conditions": [],
77                    "endpoint": {
78                        "url": {
79                            "ref": "Endpoint"
80                        },
81                        "properties": {},
82                        "headers": {}
83                    },
84                    "type": "endpoint"
85                }
86            ]
87        },
88        {
89            "conditions": [
90                {
91                    "fn": "isSet",
92                    "argv": [
93                        {
94                            "ref": "Region"
95                        }
96                    ]
97                }
98            ],
99            "type": "tree",
100            "rules": [
101                {
102                    "conditions": [
103                        {
104                            "fn": "aws.partition",
105                            "argv": [
106                                {
107                                    "ref": "Region"
108                                }
109                            ],
110                            "assign": "PartitionResult"
111                        }
112                    ],
113                    "type": "tree",
114                    "rules": [
115                        {
116                            "conditions": [
117                                {
118                                    "fn": "stringEquals",
119                                    "argv": [
120                                        {
121                                            "fn": "getAttr",
122                                            "argv": [
123                                                {
124                                                    "ref": "PartitionResult"
125                                                },
126                                                "name"
127                                            ]
128                                        },
129                                        "aws"
130                                    ]
131                                },
132                                {
133                                    "fn": "booleanEquals",
134                                    "argv": [
135                                        {
136                                            "ref": "UseFIPS"
137                                        },
138                                        false
139                                    ]
140                                },
141                                {
142                                    "fn": "booleanEquals",
143                                    "argv": [
144                                        {
145                                            "ref": "UseDualStack"
146                                        },
147                                        false
148                                    ]
149                                }
150                            ],
151                            "endpoint": {
152                                "url": "https://support.us-east-1.amazonaws.com",
153                                "properties": {
154                                    "authSchemes": [
155                                        {
156                                            "name": "sigv4",
157                                            "signingName": "support",
158                                            "signingRegion": "us-east-1"
159                                        }
160                                    ]
161                                },
162                                "headers": {}
163                            },
164                            "type": "endpoint"
165                        },
166                        {
167                            "conditions": [
168                                {
169                                    "fn": "stringEquals",
170                                    "argv": [
171                                        {
172                                            "fn": "getAttr",
173                                            "argv": [
174                                                {
175                                                    "ref": "PartitionResult"
176                                                },
177                                                "name"
178                                            ]
179                                        },
180                                        "aws-cn"
181                                    ]
182                                },
183                                {
184                                    "fn": "booleanEquals",
185                                    "argv": [
186                                        {
187                                            "ref": "UseFIPS"
188                                        },
189                                        false
190                                    ]
191                                },
192                                {
193                                    "fn": "booleanEquals",
194                                    "argv": [
195                                        {
196                                            "ref": "UseDualStack"
197                                        },
198                                        false
199                                    ]
200                                }
201                            ],
202                            "endpoint": {
203                                "url": "https://support.cn-north-1.amazonaws.com.cn",
204                                "properties": {
205                                    "authSchemes": [
206                                        {
207                                            "name": "sigv4",
208                                            "signingName": "support",
209                                            "signingRegion": "cn-north-1"
210                                        }
211                                    ]
212                                },
213                                "headers": {}
214                            },
215                            "type": "endpoint"
216                        },
217                        {
218                            "conditions": [
219                                {
220                                    "fn": "stringEquals",
221                                    "argv": [
222                                        {
223                                            "fn": "getAttr",
224                                            "argv": [
225                                                {
226                                                    "ref": "PartitionResult"
227                                                },
228                                                "name"
229                                            ]
230                                        },
231                                        "aws-us-gov"
232                                    ]
233                                },
234                                {
235                                    "fn": "booleanEquals",
236                                    "argv": [
237                                        {
238                                            "ref": "UseFIPS"
239                                        },
240                                        false
241                                    ]
242                                },
243                                {
244                                    "fn": "booleanEquals",
245                                    "argv": [
246                                        {
247                                            "ref": "UseDualStack"
248                                        },
249                                        false
250                                    ]
251                                }
252                            ],
253                            "endpoint": {
254                                "url": "https://support.us-gov-west-1.amazonaws.com",
255                                "properties": {
256                                    "authSchemes": [
257                                        {
258                                            "name": "sigv4",
259                                            "signingName": "support",
260                                            "signingRegion": "us-gov-west-1"
261                                        }
262                                    ]
263                                },
264                                "headers": {}
265                            },
266                            "type": "endpoint"
267                        },
268                        {
269                            "conditions": [
270                                {
271                                    "fn": "stringEquals",
272                                    "argv": [
273                                        {
274                                            "fn": "getAttr",
275                                            "argv": [
276                                                {
277                                                    "ref": "PartitionResult"
278                                                },
279                                                "name"
280                                            ]
281                                        },
282                                        "aws-iso"
283                                    ]
284                                },
285                                {
286                                    "fn": "booleanEquals",
287                                    "argv": [
288                                        {
289                                            "ref": "UseFIPS"
290                                        },
291                                        false
292                                    ]
293                                },
294                                {
295                                    "fn": "booleanEquals",
296                                    "argv": [
297                                        {
298                                            "ref": "UseDualStack"
299                                        },
300                                        false
301                                    ]
302                                }
303                            ],
304                            "endpoint": {
305                                "url": "https://support.us-iso-east-1.c2s.ic.gov",
306                                "properties": {
307                                    "authSchemes": [
308                                        {
309                                            "name": "sigv4",
310                                            "signingName": "support",
311                                            "signingRegion": "us-iso-east-1"
312                                        }
313                                    ]
314                                },
315                                "headers": {}
316                            },
317                            "type": "endpoint"
318                        },
319                        {
320                            "conditions": [
321                                {
322                                    "fn": "stringEquals",
323                                    "argv": [
324                                        {
325                                            "fn": "getAttr",
326                                            "argv": [
327                                                {
328                                                    "ref": "PartitionResult"
329                                                },
330                                                "name"
331                                            ]
332                                        },
333                                        "aws-iso-b"
334                                    ]
335                                },
336                                {
337                                    "fn": "booleanEquals",
338                                    "argv": [
339                                        {
340                                            "ref": "UseFIPS"
341                                        },
342                                        false
343                                    ]
344                                },
345                                {
346                                    "fn": "booleanEquals",
347                                    "argv": [
348                                        {
349                                            "ref": "UseDualStack"
350                                        },
351                                        false
352                                    ]
353                                }
354                            ],
355                            "endpoint": {
356                                "url": "https://support.us-isob-east-1.sc2s.sgov.gov",
357                                "properties": {
358                                    "authSchemes": [
359                                        {
360                                            "name": "sigv4",
361                                            "signingName": "support",
362                                            "signingRegion": "us-isob-east-1"
363                                        }
364                                    ]
365                                },
366                                "headers": {}
367                            },
368                            "type": "endpoint"
369                        },
370                        {
371                            "conditions": [
372                                {
373                                    "fn": "booleanEquals",
374                                    "argv": [
375                                        {
376                                            "ref": "UseFIPS"
377                                        },
378                                        true
379                                    ]
380                                },
381                                {
382                                    "fn": "booleanEquals",
383                                    "argv": [
384                                        {
385                                            "ref": "UseDualStack"
386                                        },
387                                        true
388                                    ]
389                                }
390                            ],
391                            "type": "tree",
392                            "rules": [
393                                {
394                                    "conditions": [
395                                        {
396                                            "fn": "booleanEquals",
397                                            "argv": [
398                                                true,
399                                                {
400                                                    "fn": "getAttr",
401                                                    "argv": [
402                                                        {
403                                                            "ref": "PartitionResult"
404                                                        },
405                                                        "supportsFIPS"
406                                                    ]
407                                                }
408                                            ]
409                                        },
410                                        {
411                                            "fn": "booleanEquals",
412                                            "argv": [
413                                                true,
414                                                {
415                                                    "fn": "getAttr",
416                                                    "argv": [
417                                                        {
418                                                            "ref": "PartitionResult"
419                                                        },
420                                                        "supportsDualStack"
421                                                    ]
422                                                }
423                                            ]
424                                        }
425                                    ],
426                                    "type": "tree",
427                                    "rules": [
428                                        {
429                                            "conditions": [],
430                                            "endpoint": {
431                                                "url": "https://support-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
432                                                "properties": {},
433                                                "headers": {}
434                                            },
435                                            "type": "endpoint"
436                                        }
437                                    ]
438                                },
439                                {
440                                    "conditions": [],
441                                    "error": "FIPS and DualStack are enabled, but this partition does not support one or both",
442                                    "type": "error"
443                                }
444                            ]
445                        },
446                        {
447                            "conditions": [
448                                {
449                                    "fn": "booleanEquals",
450                                    "argv": [
451                                        {
452                                            "ref": "UseFIPS"
453                                        },
454                                        true
455                                    ]
456                                }
457                            ],
458                            "type": "tree",
459                            "rules": [
460                                {
461                                    "conditions": [
462                                        {
463                                            "fn": "booleanEquals",
464                                            "argv": [
465                                                true,
466                                                {
467                                                    "fn": "getAttr",
468                                                    "argv": [
469                                                        {
470                                                            "ref": "PartitionResult"
471                                                        },
472                                                        "supportsFIPS"
473                                                    ]
474                                                }
475                                            ]
476                                        }
477                                    ],
478                                    "type": "tree",
479                                    "rules": [
480                                        {
481                                            "conditions": [],
482                                            "endpoint": {
483                                                "url": "https://support-fips.{Region}.{PartitionResult#dnsSuffix}",
484                                                "properties": {},
485                                                "headers": {}
486                                            },
487                                            "type": "endpoint"
488                                        }
489                                    ]
490                                },
491                                {
492                                    "conditions": [],
493                                    "error": "FIPS is enabled but this partition does not support FIPS",
494                                    "type": "error"
495                                }
496                            ]
497                        },
498                        {
499                            "conditions": [
500                                {
501                                    "fn": "booleanEquals",
502                                    "argv": [
503                                        {
504                                            "ref": "UseDualStack"
505                                        },
506                                        true
507                                    ]
508                                }
509                            ],
510                            "type": "tree",
511                            "rules": [
512                                {
513                                    "conditions": [
514                                        {
515                                            "fn": "booleanEquals",
516                                            "argv": [
517                                                true,
518                                                {
519                                                    "fn": "getAttr",
520                                                    "argv": [
521                                                        {
522                                                            "ref": "PartitionResult"
523                                                        },
524                                                        "supportsDualStack"
525                                                    ]
526                                                }
527                                            ]
528                                        }
529                                    ],
530                                    "type": "tree",
531                                    "rules": [
532                                        {
533                                            "conditions": [],
534                                            "endpoint": {
535                                                "url": "https://support.{Region}.{PartitionResult#dualStackDnsSuffix}",
536                                                "properties": {},
537                                                "headers": {}
538                                            },
539                                            "type": "endpoint"
540                                        }
541                                    ]
542                                },
543                                {
544                                    "conditions": [],
545                                    "error": "DualStack is enabled but this partition does not support DualStack",
546                                    "type": "error"
547                                }
548                            ]
549                        },
550                        {
551                            "conditions": [],
552                            "endpoint": {
553                                "url": "https://support.{Region}.{PartitionResult#dnsSuffix}",
554                                "properties": {},
555                                "headers": {}
556                            },
557                            "type": "endpoint"
558                        }
559                    ]
560                }
561            ]
562        },
563        {
564            "conditions": [],
565            "error": "Invalid Configuration: Missing Region",
566            "type": "error"
567        }
568    ]
569}