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